Do we need Mat, Vec, TMmat, Diag, Sym and other matrix types?

jmh530 john.michael.hall at gmail.com
Tue Mar 13 12:16:27 UTC 2018


On Tuesday, 13 March 2018 at 10:39:29 UTC, 9il wrote:
> On Tuesday, 13 March 2018 at 05:36:06 UTC, J-S Caux wrote:
>>
>> Your suggestion [4] that matrix[i] returns a Vec is perhaps 
>> too inflexible. What one needs sometimes is to return a row, 
>> or a column of a matrix, so a notation like matrix[i, ..] or 
>> matrix[.., j] returning respectively a row or column would be 
>> useful.
>
> auto row = matrix[i]; // or matrix[i, 0 .. $];
> auto col = matrix[0 .. $, j];

Some kind of improvement that replaces 0 .. $ with some shorter 
syntax has been brought up in the past.
https://github.com/libmir/mir-algorithm/issues/53


More information about the Digitalmars-d mailing list