Matrix.Create Sparse Method
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Create | Constructs a new sparse matrix. |
Create | Constructs a new sparse matrix. |
Create | Constructs a new sparse matrix. |
Create | Constructs a new sparse matrix. |
CreateSparse<T>(Int32, Int32)
Constructs a new sparse matrix.
public static SparseCompressedColumnMatrix<T> CreateSparse<T>(
int rowCount,
int columnCount
)
Parameters
Type Parameters
- T
Return Value
SparseCompressedColumnMatrix<T>A SparseCompressedColumnMatrix<T>.
Exceptions
Argument | rowCount is less than zero. -or- columnCount is less than zero. |
CreateSparse<T>(Int32, Int32, Double)
Constructs a new sparse matrix.
public static SparseCompressedColumnMatrix<T> CreateSparse<T>(
int rowCount,
int columnCount,
double fillFactor
)
Parameters
- rowCount Int32
- The number of rows.
- columnCount Int32
- The number of columns.
- fillFactor Double
- A value between 0 and 1 that specifies the initial capacity of nonzero elements as a proportion of the total number of elements of the matrix.
Type Parameters
- T
Return Value
SparseCompressedColumnMatrix<T>A SparseCompressedColumnMatrix<T>.
Exceptions
Argument | rowCount is less than zero. -or- columnCount is less than zero. -or- fillFactor is less than or equal to zero or greater than 1. |
CreateSparse<T>(Int32, Int32, Int32)
Constructs a new sparse matrix.
public static SparseCompressedColumnMatrix<T> CreateSparse<T>(
int rowCount,
int columnCount,
int nonzeroCount
)
Parameters
- rowCount Int32
- The number of rows.
- columnCount Int32
- The number of columns.
- nonzeroCount Int32
- The expected number of nonzero elements.
Type Parameters
- T
Return Value
SparseCompressedColumnMatrix<T>A SparseCompressedColumnMatrix<T>.
Exceptions
Argument | rowCount is less than zero. -or- columnCount is less than zero. -or- nonzeroCount is less than zero. |
CreateSparse<T>(Int32, Int32, Int32[], Int32[], T[])
Constructs a new sparse matrix.
public static SparseCompressedColumnMatrix<T> CreateSparse<T>(
int rowCount,
int columnCount,
int[] rowIndexes,
int[] columnIndexes,
T[] values
)
Parameters
- rowCount Int32
- The number of rows.
- columnCount Int32
- The number of columns.
- rowIndexes Int32[]
- An integer array that contains the row indexes of the nonzero elements.
- columnIndexes Int32[]
- An integer array that contains the column indexes of the nonzero elements.
- values T[]
- An array that contains the values of the nonzero elements.
Type Parameters
- T
Return Value
SparseCompressedColumnMatrix<T>A SparseCompressedColumnMatrix<T>.
Exceptions
Argument | rowCount is less than zero. -or- columnCount is less than zero. |
Argument | values is null -or- rowIndexes is null -or- columnIndexes is null |
Dimension | The length of rowIndexes is not equal to the length of values. -or- The length of columnIndexes is not equal to the length of values. |