Reputation: 1257
When using a DenseMatrix from Math .NET, and I want to access the second column, third row, do I write matrix[1,2]
or matrix[2,1]
in other words, does the first index determine the row or the column?
Upvotes: 0
Views: 2479
Reputation: 50235
A quick search yields this documentation:
http://api.mathdotnet.com/Numerics/MathNet.Numerics.LinearAlgebra.Double/DenseMatrix.htm
While it's lacking in what you're asking, it does have a RowCount property you can interrogate to find your answer.
Running a test now
It's [row, column]
.
public virtual T this[int row, int column]
{
get
{
RangeCheck(row, column);
return At(row, column);
}
set
{
RangeCheck(row, column);
At(row, column, value);
}
}
Upvotes: 2