Constructs a sparse matrix from SparseArray data.

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
public SparseMatrix(
	int nRows,
	int nColumns,
	int[][] index,
	double[][] values
)
Visual Basic (Declaration)
Public Sub New ( _
	nRows As Integer, _
	nColumns As Integer, _
	index As Integer()(), _
	values As Double()() _
)
Visual C++
public:
SparseMatrix(
	int nRows, 
	int nColumns, 
	array<array<int>^>^ index, 
	array<array<double>^>^ values
)

Parameters

nRows
Type: System..::.Int32
An int specifying the number of rows in the sparse matrix.
nColumns
Type: System..::.Int32
An int specifying the number of columns in the sparse matrix.
index
Type: array< array< System..::.Int32 >[]()[] >[]()[]
An int jagged array containing the column indices of all nonzero elements corresponding to the compressed representation of the sparse matrix in values. The size of index must be identical to the size of values. The i-th row contains the column indices of all nonzero elements of row i of the sparse matrix. The j-th element of row i is the column index of the value located at the same position in values.
values
Type: array< array< System..::.Double >[]()[] >[]()[]
A double jagged array containing the compressed representation of a real sparse matrix of size nRows by nColumns. The number of rows in values must be nRows. The i-th row contains all nonzero elements of row i of the full sparse matrix.

See Also