Browse Source

LA: sparse matrix OfColumnMajor to accept IList instead of just array

pull/112/head
Christoph Ruegg 14 years ago
parent
commit
96f66e8ca4
  1. 2
      src/Numerics/LinearAlgebra/Complex/SparseMatrix.cs
  2. 2
      src/Numerics/LinearAlgebra/Complex32/SparseMatrix.cs
  3. 2
      src/Numerics/LinearAlgebra/Double/SparseMatrix.cs
  4. 2
      src/Numerics/LinearAlgebra/Single/SparseMatrix.cs

2
src/Numerics/LinearAlgebra/Complex/SparseMatrix.cs

@ -131,7 +131,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
/// A new memory block will be allocated for storing the matrix.
/// </summary>
/// <seealso href="http://en.wikipedia.org/wiki/Row-major_order"/>
public static SparseMatrix OfColumnMajor(int rows, int columns, Complex[] columnMajor)
public static SparseMatrix OfColumnMajor(int rows, int columns, IList<Complex> columnMajor)
{
return new SparseMatrix(SparseCompressedRowMatrixStorage<Complex>.OfColumnMajorList(rows, columns, columnMajor));
}

2
src/Numerics/LinearAlgebra/Complex32/SparseMatrix.cs

@ -131,7 +131,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
/// A new memory block will be allocated for storing the matrix.
/// </summary>
/// <seealso href="http://en.wikipedia.org/wiki/Row-major_order"/>
public static SparseMatrix OfColumnMajor(int rows, int columns, Complex32[] columnMajor)
public static SparseMatrix OfColumnMajor(int rows, int columns, IList<Complex32> columnMajor)
{
return new SparseMatrix(SparseCompressedRowMatrixStorage<Complex32>.OfColumnMajorList(rows, columns, columnMajor));
}

2
src/Numerics/LinearAlgebra/Double/SparseMatrix.cs

@ -130,7 +130,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double
/// A new memory block will be allocated for storing the matrix.
/// </summary>
/// <seealso href="http://en.wikipedia.org/wiki/Row-major_order"/>
public static SparseMatrix OfColumnMajor(int rows, int columns, double[] columnMajor)
public static SparseMatrix OfColumnMajor(int rows, int columns, IList<double> columnMajor)
{
return new SparseMatrix(SparseCompressedRowMatrixStorage<double>.OfColumnMajorList(rows, columns, columnMajor));
}

2
src/Numerics/LinearAlgebra/Single/SparseMatrix.cs

@ -130,7 +130,7 @@ namespace MathNet.Numerics.LinearAlgebra.Single
/// A new memory block will be allocated for storing the matrix.
/// </summary>
/// <seealso href="http://en.wikipedia.org/wiki/Row-major_order"/>
public static SparseMatrix OfColumnMajor(int rows, int columns, float[] columnMajor)
public static SparseMatrix OfColumnMajor(int rows, int columns, IList<float> columnMajor)
{
return new SparseMatrix(SparseCompressedRowMatrixStorage<float>.OfColumnMajorList(rows, columns, columnMajor));
}

Loading…
Cancel
Save