Linear index to matrix index #830
Answered
by
cdrnet
MohammadrezaMC2
asked this question in
Q&A
-
Hello |
Beta Was this translation helpful? Give feedback.
Answered by
cdrnet
Jan 1, 2021
Replies: 1 comment
-
Linear indexing as e.g. in Matlab is very storage format specific. But it so happens that dense matrices in Numerics are organized the same way in column-major. So, if the matrix is dense, then |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cdrnet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Linear indexing as e.g. in Matlab is very storage format specific. But it so happens that dense matrices in Numerics are organized the same way in column-major. So, if the matrix is dense, then
m.AsColumnMajorArray()
will return the internal array (directly, not a copy) which you can then access in this linear way.