Sparse matrix class
Constructor | Description |
Full Usage:
SparseMatrix(m, n)
Parameters:
int
-
Number of rows
n : int
-
Number of columns
|
Constructor for SparseMatrix class
|
Full Usage:
SparseMatrix(m, n, matrixItems, matrixIndices, _count)
Parameters:
int
n : int
matrixItems : float[][]
matrixIndices : int[][]
_count : int[]
|
|
Instance member | Description |
Full Usage:
this.ColumnDimension
Returns: int
n, the number of columns.
|
Get column dimension.
|
|
|
Full Usage:
this.Count
Returns: int[]
|
|
|
Dense version of a sparse matrix
|
Full Usage:
this.IsLowerTriangular
Returns: bool
true or false
|
Check if the current matrix is lower triangular
|
Full Usage:
this.[arg1, arg2]
Parameters:
int
Returns: int
(i,j)th element
|
Accessor method for (i,j)th element
|
Full Usage:
this.[arg1]
Returns: int
The ith row as a SparseVector
|
Accessor method for ith row
|
Full Usage:
this.Mul
Parameters:
float
-
Scaling factor
Returns: SparseMatrix
Scaled sparse matrix
|
Matrix multiplication by a scalar
|
Full Usage:
this.RowDimension
Returns: int
m, the number of rows
|
Get row dimension.
|
Full Usage:
this.ScaleRow
Parameters:
int
-
Index of the row to be scaled
j1 : int
-
Lowest column entry to scale
j2 : int
-
High column entry to scale
sf : float
-
Scale factor
|
Method to rescale a row of a Sparse Matrix
|
|
Gaussian elimination method for A*x=b with partial pivoting
|
|
Forward substitution routine for solving Lx = b, where L is a lower-triangular matrix
|
Full Usage:
this.SwitchRows
Parameters:
int
j : int
|
Switch rows of a sparse matrix
|
|
Tranpose of sparse matrix
|
Full Usage:
this.minus B
Parameters:
SparseMatrix
-
The matrix to subtract
Returns: SparseMatrix
The result A - B
|
Matrix subtraction for a sparse matrix
|
Full Usage:
this.plus B
Parameters:
SparseMatrix
-
The matrix to add
Returns: SparseMatrix
The result A + B
|
Matrix addition for a sparse matrix
|
|
Matrix multiplication
|
|
Matrix multiplication by a scalar
|
Full Usage:
this.times B
Parameters:
SparseMatrix
-
Scaling factor
Returns: SparseMatrix
A * B where A is current sparce matrix
|
Matrix right multiplication by a matrix
|
|
Matrix multiplication, y = v * A
|
Static member | Description |
Full Usage:
m * v
Parameters:
SparseMatrix
-
First factor
v : Vector
-
Second factor
Returns: Vector
|
Matrix multiplication
|
|
Matrix multiplication
|
Full Usage:
A * s
Parameters:
SparseMatrix
-
Sparse Matrix
s : float
-
Scalar
Returns: SparseMatrix
Scaled sparse matrix
|
Matrix multiplication by a scalar
|
|
|
Full Usage:
A + B
Parameters:
SparseMatrix
-
first matrix
B : SparseMatrix
-
another matrix
Returns: SparseMatrix
A + B
|
C = A + B
|
Full Usage:
A - B
Parameters:
SparseMatrix
-
The matrix from which to subtract
B : SparseMatrix
-
The matrix to subtract
Returns: SparseMatrix
The result A - B
|
Matrix subtraction for a sparse matrix
|
Full Usage:
SparseMatrix.Identity(m, n)
Parameters:
int
-
Row dimension
n : int
-
Column dimension
Returns: SparseMatrix
An m x n sparse identity matrix
|
Identity matrix in sparse form
|