Browse Source
Merge pull request #545 from jnyrup/Capacity
Initialize list with known capacity
spatial
Christoph Ruegg
9 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
4 additions and
4 deletions
-
src/Numerics/LinearAlgebra/Complex/Solvers/MlkBiCgStab.cs
-
src/Numerics/LinearAlgebra/Complex32/Solvers/MlkBiCgStab.cs
-
src/Numerics/LinearAlgebra/Double/Solvers/MlkBiCgStab.cs
-
src/Numerics/LinearAlgebra/Single/Solvers/MlkBiCgStab.cs
|
|
|
@ -193,7 +193,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex.Solvers |
|
|
|
var orthogonalMatrix = gs.Q; |
|
|
|
|
|
|
|
// Now transfer this to vectors
|
|
|
|
var result = new List<Vector<Complex>>(); |
|
|
|
var result = new List<Vector<Complex>>(orthogonalMatrix.ColumnCount); |
|
|
|
for (var i = 0; i < orthogonalMatrix.ColumnCount; i++) |
|
|
|
{ |
|
|
|
result.Add(orthogonalMatrix.Column(i)); |
|
|
|
|
|
|
|
@ -186,7 +186,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32.Solvers |
|
|
|
var orthogonalMatrix = gs.Q; |
|
|
|
|
|
|
|
// Now transfer this to vectors
|
|
|
|
var result = new List<Vector<Numerics.Complex32>>(); |
|
|
|
var result = new List<Vector<Numerics.Complex32>>(orthogonalMatrix.ColumnCount); |
|
|
|
for (var i = 0; i < orthogonalMatrix.ColumnCount; i++) |
|
|
|
{ |
|
|
|
result.Add(orthogonalMatrix.Column(i)); |
|
|
|
|
|
|
|
@ -186,7 +186,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double.Solvers |
|
|
|
var orthogonalMatrix = gs.Q; |
|
|
|
|
|
|
|
// Now transfer this to vectors
|
|
|
|
var result = new List<Vector<double>>(); |
|
|
|
var result = new List<Vector<double>>(orthogonalMatrix.ColumnCount); |
|
|
|
for (var i = 0; i < orthogonalMatrix.ColumnCount; i++) |
|
|
|
{ |
|
|
|
result.Add(orthogonalMatrix.Column(i)); |
|
|
|
|
|
|
|
@ -189,7 +189,7 @@ namespace MathNet.Numerics.LinearAlgebra.Single.Solvers |
|
|
|
var orthogonalMatrix = gs.Q; |
|
|
|
|
|
|
|
// Now transfer this to vectors
|
|
|
|
var result = new List<Vector<float>>(); |
|
|
|
var result = new List<Vector<float>>(orthogonalMatrix.ColumnCount); |
|
|
|
for (var i = 0; i < orthogonalMatrix.ColumnCount; i++) |
|
|
|
{ |
|
|
|
result.Add(orthogonalMatrix.Column(i)); |
|
|
|
|