Quantcast
Channel: Math.NET Numerics - Math.NET
Viewing all articles
Browse latest Browse all 224

Best way to grow a matrix?

$
0
0

I have a routine where I am adding an unknown amount of rows to a Matrix. What is the fastest, most efficient way to grow the Matrix? Anything better than:

Matrix<double> origDb = Matrix.Build.Dense(22, 22);
...
int additionalRows = 22;
Matrix<double> newDb = Matrix.Build.Dense(origDb.RowCount + additionalRows, origDb.ColumnCount);
newDb.SetSubMatrix(0, 0, origDb);
origDb = newDb;

?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 224

Trending Articles