Multidimensional slice

Nekroze nekroze at eturnilnetwork.com
Wed Dec 19 02:17:27 PST 2012


On Wednesday, 19 December 2012 at 09:58:37 UTC, Rafael wrote:
> //Then I want to do something like
> x = S[0..$, 1]; //get column
> S[0..$, 2] = A[0..$, 2]; //get and set column
> auto B = A[0..10, 0..10]; //get submatrix block of matrix A

Warning the following is my total noob opinion.

Instead of using [0..$,2] for example, try [0..$][2] and see how 
that works out. D doesn't use multiple indexes in the same [] 
section as far as i know so give that a go.


More information about the Digitalmars-d-learn mailing list