select all rows (resp. columns) out of matrix
H. S. Teoh
hsteoh at quickfur.ath.cx
Thu Nov 14 15:18:39 PST 2013
On Fri, Nov 15, 2013 at 12:13:11AM +0100, bearophile wrote:
> Ali Çehreli:
>
> >transversal() is useful too: :)
> >
> > http://dlang.org/phobos/std_range.html#transversal
>
> transversal() is sometimes useful, but if you need a significant
> amount of matrix processing, slicing and dicing matrices all the
> time in scientific code, then probably it's better to use a custom
> matrix library for D. Eventually one "winner" of such libraries
> should come out for D (as NumPy is in Python world). But to
> implement such libraries D should improve its management of "$" and
> "..." more for user-defined types.
[...]
'$' already works for multidimensional arrays, you just have to
implement opDollar appropriately.
Slicing syntax isn't, though. Kenji has a pull for it, but it hasn't
been merged yet for whatever reason.
T
--
Once bitten, twice cry...
More information about the Digitalmars-d-learn
mailing list