CSparse
Column ordering for AMD.
Natural ordering.
Minimum degree ordering of (A'+A).
Minimum degree ordering of (A'*A) with removal of dense rows (not suited for Cholesky).
Minimum degree ordering of (A'*A) (not suited for Cholesky).
Dense matrix stored in column major order.
Initializes a new instance of the DenseMatrix class.
Initializes a new instance of the DenseMatrix class.
Initializes a new instance of the SparseMatrix class.
Initializes a new instance of the SparseMatrix class.
Initializes a new instance of the SparseMatrix class.
Multiplies a (m-by-n) matrix by a vector, y = A*x.
Vector of length n (column count).
Vector of length m (row count), containing the result.
Multiplies a (m-by-n) matrix by a vector, y = alpha*A*x + beta*y.
Vector of length n (column count).
Vector of length m (row count), containing the result.
Scalar to multiply with matrix.
Scalar to multiply with vector y.
Input values of vector y will be accumulated.
Multiplies the transpose of a (m-by-n) matrix by a vector, y = A'*x.
Vector of length m (column count of A').
Vector of length n (row count of A'), containing the result.
Multiplies the transpose of a (m-by-n) matrix by a vector, y = alpha*A'*x + beta*y.
Vector of length m (column count of A').
Vector of length n (row count of A'), containing the result.
Scalar to multiply with matrix.
Scalar to multiply with vector y.
Input values of vector y will be accumulated.
Transpose this matrix (with complex conjugation) and store the result in given matrix.
Adds two matrices, C = alpha*A + beta*B, where A is current instance.
Scalar factor for A, current instance.
Scalar factor for B, other instance.
The matrix added to this instance.
Contains the sum.
The (result) matrix has to be fully initialized and provide enough space for
the nonzero entries of the sum. An upper bound is the sum of the nonzeros count
of (this) and (other).
Sparse matrix multiplication, C = A*B
column-compressed matrix
C = A*B, null on error
Evaluates whether this matrix is complex Hermitian.
Scatters and sums a sparse vector A(:,j) into a dense vector, x = x + beta * A(:,j).
the column of A to use
scalar multiplied by A(:,j)
size m, node i is marked if w[i] = mark
size m, ignored if null
mark value of w
pattern of x accumulated in C.i
pattern of x placed in C starting at C.i[nz]
new value of nz, -1 on error
Sparse Cholesky decomposition (only upper triangular part is used).
See Chapter 4 (Cholesky factorization) in "Direct Methods for Sparse Linear Systems"
by Tim Davis.
Creates a sparse Cholesky factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Creates a sparse Cholesky factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Creates a sparse Cholesky factorization.
Column-compressed matrix, symmetric positive definite.
Permutation.
Creates a sparse Cholesky factorization.
Column-compressed matrix, symmetric positive definite.
Permutation.
Gets the number of nonzeros of the L factor.
Solves a system of linear equations, Ax = b.
The right hand side vector, b.
The left hand side vector, x.
Sparse Cholesky update, L*L' + w*w'
The update matrix.
False, if updated matrix is not positive definite, otherwise true.
Sparse Cholesky downdate, L*L' - w*w'
The update matrix.
False, if updated matrix is not positive definite, otherwise true.
Sparse Cholesky update/downdate, L*L' + sigma*w*w'
1 = update or -1 = downdate
The update matrix.
False, if updated matrix is not positive definite, otherwise true.
Compute the Numeric Cholesky factorization, L = chol (A, [pinv parent cp]).
Numeric Cholesky factorization
Ordering and symbolic analysis for a Cholesky factorization.
Matrix to factorize.
Permutation.
Permutes a symmetric sparse matrix. C = PAP' where A and C are symmetric.
column-compressed matrix (only upper triangular part is used)
size n, inverse permutation
allocate pattern only if false, values and pattern otherwise
Permuted matrix, C = PAP'
Sparse LU decomposition.
See Chapter 6 (LU factorization) in "Direct Methods for Sparse Linear Systems"
by Tim Davis.
Creates a LU factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Partial pivoting tolerance (form 0.0 to 1.0).
Creates a LU factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Partial pivoting tolerance (form 0.0 to 1.0).
Creates a LU factorization.
Column-compressed matrix, symmetric positive definite.
Permutation.
Partial pivoting tolerance (form 0.0 to 1.0).
Creates a LU factorization.
Column-compressed matrix, symmetric positive definite.
Permutation.
Partial pivoting tolerance (form 0.0 to 1.0).
Gets the number of nonzeros in both L and U factors together.
Solves a system of linear equations, Ax = b.
The right hand side vector, b.
The left hand side vector, x.
Solves a system of linear equations, A'x = b.
The right hand side vector, b.
The left hand side vector, x.
[L,U,pinv] = lu(A, [q lnz unz]). lnz and unz can be guess.
Symbolic ordering and analysis for LU.
Permutation.
Solve Gx=b(:,k), where G is either upper (lo=false) or lower (lo=true)
triangular.
lower or upper triangular matrix in column-compressed form
right hand side, b=B(:,k)
use kth column of B as right hand side
size 2*n, nonzero pattern of x in xi[top..n-1]
size n, x in x[xi[top..n-1]]
mapping of rows to columns of G, ignored if null
true if lower triangular, false if upper
top, -1 in error
Sparse QR decomposition.
See Chapter 5 (Orthogonal methods) in "Direct Methods for Sparse Linear Systems"
by Tim Davis.
Creates a sparse QR factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Creates a sparse QR factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Solves a system of linear equations, Ax = b.
The right hand side vector, b.
The left hand side vector, x.
Let A be a m-by-n matrix. If m >= n a least-squares problem (min |Ax-b|)
is solved. If m < n the underdetermined system is solved.
Create a Householder reflection [v,beta,s]=house(x), overwrite x with v,
where (I-beta*v*v')*x = s*e1 and e1 = [1 0 ... 0]'.
Note that this CXSparse version is different than CSparse. See Higham,
Accuracy and Stability of Num Algorithms, 2nd ed, 2002, page 357.
Apply the ith Householder vector to x.
Solve a lower triangular system by forward elimination, Lx=b.
Solve L'x=b where x and b are dense.
Solve an upper triangular system by backward elimination, Ux=b.
Solve U'x=b where x and b are dense.
Vector helper methods.
Copy one vector to another.
The source array.
The destination array.
Copy one vector to another.
The source array.
The destination array.
Number of values to copy.
Create a new vector.
Clone the given vector.
Set vector values to zero.
Computes the dot product of two vectors.
Computes the pointwise product of two vectors.
Computes the norm of a vector.
Computes the norm of a vector avoiding overflow, sqrt( x' * x ).
Scales a vector by a given factor, x = alpha * x.
Add a scaled vector t o another vector, y = y + alpha * x.
Add two scaled vectors, z = alpha * x + beta * y.
Constants used in the library.
The size of an int in bytes.
The size of a double in bytes.
The default threshold used for matrix values comparision.
The size of a Complex in bytes (should be 2 * SizeOfDouble).
Dense matrix stored in column major order.
Initializes a new instance of the DenseMatrix class.
Initializes a new instance of the DenseMatrix class.
Initializes a new instance of the SparseMatrix class.
Initializes a new instance of the SparseMatrix class.
Initializes a new instance of the SparseMatrix class.
Multiplies a (m-by-n) matrix by a vector, y = A*x.
Vector of length n (column count).
Vector of length m (row count), containing the result.
Multiplies a (m-by-n) matrix by a vector, y = alpha*A*x + beta*y.
Vector of length n (column count).
Vector of length m (row count), containing the result.
Scalar to multiply with matrix.
Scalar to multiply with vector y.
Input values of vector y will be accumulated.
Multiplies the transpose of a (m-by-n) matrix by a vector, y = A'*x.
Vector of length m (column count of A').
Vector of length n (row count of A'), containing the result.
Multiplies the transpose of a (m-by-n) matrix by a vector, y = alpha*A'*x + beta*y.
Vector of length m (column count of A').
Vector of length n (row count of A'), containing the result.
Scalar to multiply with matrix.
Scalar to multiply with vector y.
Input values of vector y will be accumulated.
Adds two matrices, C = alpha*A + beta*B, where A is current instance.
Scalar factor for A, current instance.
Scalar factor for B, other instance.
The matrix added to this instance.
Contains the sum.
The (result) matrix has to be fully initialized and provide enough space for
the nonzero entries of the sum. An upper bound is the sum of the nonzeros count
of (this) and (other).
Sparse matrix multiplication, C = A*B
column-compressed matrix
C = A*B, null on error
Scatters and sums a sparse vector A(:,j) into a dense vector, x = x + beta * A(:,j).
the column of A to use
scalar multiplied by A(:,j)
size m, node i is marked if w[i] = mark
size m, ignored if null
mark value of w
pattern of x accumulated in C.i
pattern of x placed in C starting at C.i[nz]
new value of nz, -1 on error
Sparse Cholesky decomposition (only upper triangular part is used).
See Chapter 4 (Cholesky factorization) in "Direct Methods for Sparse Linear Systems"
by Tim Davis.
Creates a sparse Cholesky factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Creates a sparse Cholesky factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Creates a sparse Cholesky factorization.
Column-compressed matrix, symmetric positive definite.
Permutation.
Creates a sparse Cholesky factorization.
Column-compressed matrix, symmetric positive definite.
Permutation.
Gets the number of nonzeros of the L factor.
Solves a system of linear equations, Ax = b.
The right hand side vector, b.
The left hand side vector, x.
Sparse Cholesky update, L*L' + w*w'
The update matrix.
False, if updated matrix is not positive definite, otherwise true.
Sparse Cholesky downdate, L*L' - w*w'
The update matrix.
False, if updated matrix is not positive definite, otherwise true.
Sparse Cholesky update/downdate, L*L' + sigma*w*w'
1 = update or -1 = downdate
The update matrix.
False, if updated matrix is not positive definite, otherwise true.
Compute the Numeric Cholesky factorization, L = chol (A, [pinv parent cp]).
Numeric Cholesky factorization
Ordering and symbolic analysis for a Cholesky factorization.
Matrix to factorize.
Permutation.
Permutes a symmetric sparse matrix. C = PAP' where A and C are symmetric.
column-compressed matrix (only upper triangular part is used)
size n, inverse permutation
allocate pattern only if false, values and pattern otherwise
Permuted matrix, C = PAP'
Sparse LDL' factorization.
If A is positive definite then the factorization will be accurate. A can be
indefinite (with negative values on the diagonal D), but in this case no
guarantee of accuracy is provided, since no numeric pivoting is performed.
Only the diagonal and upper triangular part of A (or PAP' if a permutation
P is provided) is accessed. The lower triangular parts of the matrix A or
PAP' can be present, but they are ignored.
Gets the number of nonzeros of the L.
Solves a linear system Ax=b, where A is symmetric positive definite.
Right hand side b.
Solution vector x.
Ordering and symbolic analysis for a LDL' factorization.
Column ordering.
Matrix to factorize.
Compute the numeric LDL' factorization of PAP'.
Sparse LU decomposition.
See Chapter 6 (LU factorization) in "Direct Methods for Sparse Linear Systems"
by Tim Davis.
Creates a LU factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Partial pivoting tolerance (form 0.0 to 1.0).
Creates a LU factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Partial pivoting tolerance (form 0.0 to 1.0).
Creates a LU factorization.
Column-compressed matrix, symmetric positive definite.
Permutation.
Partial pivoting tolerance (form 0.0 to 1.0).
Creates a LU factorization.
Column-compressed matrix, symmetric positive definite.
Permutation.
Partial pivoting tolerance (form 0.0 to 1.0).
Gets the number of nonzeros in both L and U factors together.
Solves a system of linear equations, Ax = b.
The right hand side vector, b.
The left hand side vector, x.
Solves a system of linear equations, A'x = b.
The right hand side vector, b.
The left hand side vector, x.
[L,U,pinv] = lu(A, [q lnz unz]). lnz and unz can be guess.
Symbolic ordering and analysis for LU.
Permutation.
Solve Gx=b(:,k), where G is either upper (lo=false) or lower (lo=true)
triangular.
lower or upper triangular matrix in column-compressed form
right hand side, b=B(:,k)
use kth column of B as right hand side
size 2*n, nonzero pattern of x in xi[top..n-1]
size n, x in x[xi[top..n-1]]
mapping of rows to columns of G, ignored if null
true if lower triangular, false if upper
top, -1 in error
Sparse QR decomposition.
See Chapter 5 (Orthogonal methods) in "Direct Methods for Sparse Linear Systems"
by Tim Davis.
Creates a sparse QR factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Creates a sparse QR factorization.
Column-compressed matrix, symmetric positive definite.
Ordering method to use (natural or A+A').
Solves a system of linear equations, Ax = b.
The right hand side vector, b.
The left hand side vector, x.
Let A be a m-by-n matrix. If m >= n a least-squares problem (min |Ax-b|)
is solved. If m < n the underdetermined system is solved.
Create a Householder reflection [v,beta,s]=house(x), overwrite x with v,
where (I-beta*v*v')*x = s*e1 and e1 = [1 0 ... 0]'.
Note that this CXSparse version is different than CSparse. See Higham,
Accuracy and Stability of Num Algorithms, 2nd ed, 2002, page 357.
Apply the ith Householder vector to x.
Solve a lower triangular system by forward elimination, Lx=b.
Solve L'x=b where x and b are dense.
Solve an upper triangular system by backward elimination, Ux=b.
Solve U'x=b where x and b are dense.
Vector helper methods.
Copy one vector to another.
The source array.
The destination array.
Copy one vector to another.
The source array.
The destination array.
Number of values to copy.
Create a new vector.
Clone the given vector.
Set vector values to zero.
Computes the dot product of two vectors.
Computes the pointwise product of two vectors.
Computes the norm of a vector, sqrt( x' * x ).
Computes the norm of a vector avoiding overflow, sqrt( x' * x ).
Scales a vector by a given factor, x = alpha * x.
Add a scaled vector to another vector, y = y + alpha * x.
Add two scaled vectors, z = alpha * x + beta * y.
Classes that solve a system of linear equations, Ax = b.
Supported data types are double and .
Solves a system of linear equations, Ax = b.
Right hand side b
Solution vector x.
Interface for factorization methods.
Supported data types are double and .
Gets the total number of non-zero entries (all factors).
Sparse QR decomposition abstract base class.
Gets the number of nonzeros in both Q and R factors together.
Solves a linear system Ax=b.
Right hand side b.
Solution vector x.
Create a Householder reflection.
Apply the ith Householder vector to x.
Sparse QR factorization [V,beta,pinv,R] = qr(A)
Symbolic ordering and analysis for QR.
Matrix to factorize.
Permutation.
Compute nnz(V) = S.lnz, S.pinv, S.leftmost, S.m2 from A and S.parent
Permutes a sparse matrix, C = PAQ.
m-by-n, column-compressed matrix
a permutation vector of length m
a permutation vector of length n
C = PAQ, null on error
Symbolic Cholesky, LU, or QR factorization storage.
Linear operator interface.
Gets the number of rows.
Gets the number of columns.
Multiplies a (m-by-n) matrix by a vector, y = A*x.
Vector of length n (column count).
Vector of length m (row count), containing the result.
Multiplies a (m-by-n) matrix by a vector, y = alpha * A * x + beta * y.
Scaling factor fo vertor x.
Vector of length n (column count).
Scaling factor fo vertor y.
Vector of length m (row count), containing the result.
Multiplies the transpose of a (m-by-n) matrix by a vector, y = A'*x.
Vector of length m (column count of A').
Vector of length n (row count of A'), containing the result.
Multiplies the transpose of a (m-by-n) matrix by a vector, y = alpha * A^t * x + beta * y.
Scaling factor fo vertor x.
Vector of length m (column count of A').
Scaling factor fo vertor y.
Vector of length n (row count of A'), containing the result.
Read files in Matrix Market format (only supports coordinate storage).
Read a matrix from file.
Read a matrix from stream.
Read coordinate storage from a text reader.
Used to report progress of a factorization.
Reports a progress update.
The value of the updated progress (from 0.0 to 1.0).
Approximate Minimum Degree ordering.
Generate minimum degree ordering of A+A' (if A is symmetric) or A'A.
Column-compressed matrix
Column ordering method
amd(A+A') if A is symmetric, or amd(A'A) otherwise, null on
error or for natural ordering
See Chapter 7.1 (Fill-reducing orderings: Minimum degree ordering) in
"Direct Methods for Sparse Linear Systems" by Tim Davis.
Dulmage-Mendelsohn decomposition.
See Chapter 7.4 (Fill-reducing orderings: Dulmage-Mendelsohn decomposition)
in "Direct Methods for Sparse Linear Systems" by Tim Davis.
Create a new Decomposition instance.
Compute coarse and then fine Dulmage-Mendelsohn decomposition. seed
optionally selects a randomized algorithm.
column-compressed matrix
0: natural, -1: reverse, random order otherwise
Dulmage-Mendelsohn analysis
Finds the strongly connected components of a square matrix.
strongly connected components, null on error
Drops entries from a sparse matrix
Maximum matching of any matrix A (also called maximum transveral).
See Chapter 7.2 (Fill-reducing orderings: Maximum matching) in
"Direct Methods for Sparse Linear Systems" by Tim Davis.
Find a maximum transveral (zero-free diagonal). Seed optionally selects a
randomized algorithm.
column-compressed matrix
0: natural, -1: reverse, randomized otherwise
row and column matching, size m+n
Find an augmenting path starting at column k and extend the match if found.
Helper methods for sparse direct solvers.
Depth-first-search of the graph of a matrix, starting at node j.
starting node
graph to search (modified, then restored)
graph to search
stack[top..n-1] is used on input
size n, stack containing nodes traversed
size n, work array
the index of the first element in array pstack
mapping of rows to columns of G, ignored if null
new value of top, -1 on error
Compute the elimination tree of A or A'A (without forming A'A).
Number of rows.
Number of columns.
Column pointers of column-compressed matrix.
Row indices of column-compressed matrix.
analyze A if false, A'A oterwise
elimination tree, null on error
Postorders a tree of forest.
defines a tree of n nodes
length of parent
post[k]=i, null on error
Column counts for Cholesky (LL'=A or LL'=A'A) and QR, given parent and post ordering.
Determines if j is a leaf of the skeleton matrix and find lowest common
ancestor (lca).
Least common ancestor (jprev,j)
Depth-first search and postorder of a tree rooted at node j
postorder of a tree rooted at node j
number of nodes ordered so far
head[i] is first child of node i; -1 on output
next[i] is next sibling of i or -1 if none
postordering
size n, work array
new value of k, -1 on error
Find nonzero pattern of Cholesky L(k,1:k-1) using etree and triu(A(:,k))
Cumulative sum of given array.
Output: cumulative sum of counts
input array, overwritten with sum
length of counts
sum[size] (non-zeros)
Sets the value of 1.0 for type T.
The type to return the value of 1.0 of.
The value of 1.0 for type T.
Sets the value of 0.0 for type T.
The type to return the value of 0.0 of.
The value of 0.0 for type T.
Permutation helper methods.
Permutes a vector, x=P*b.
Permutation vector.
Input vector.
Output vector, x=P*b.
Length of p, b and x.
p = null denotes identity.
Permutes a vector, x = P'b.
Permutation vector.
Input vector.
Output vector, x = P'b.
Length of p, b, and x.
p = null denotes identity.
Returns a permutation vector of length n.
Length of the permutation.
0: identity, -1: reverse, seed > 0: random permutation
Permutation vector.
Inverts a permutation vector.
A permutation vector.
Returns pinv[i] = k if p[k] = i on input.
Checks whether the array represents a proper permutation.
An array which represents where each integer is permuted too: indices[i]
represents that integer i is permuted to location indices[i].
True if represents a proper permutation, false otherwise.
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to Invalid column ordering..
Looks up a localized string similar to Invalid matrix dimensions..
Looks up a localized string similar to Invalid permutation vector..
Looks up a localized string similar to Matrix dimension must not be a negative number..
Looks up a localized string similar to Matrix dimension must be a positive number..
Looks up a localized string similar to Matrix dimensions don't match..
Looks up a localized string similar to Matrix must be square..
Looks up a localized string similar to Matrix must be symmetric positive definite..
Looks up a localized string similar to Value must not be NaN..
Looks up a localized string similar to Vectors must have the same dimension..
Compressed sparse column storage.
Row pointers with last entry equal number of non-zeros (size = RowCount + 1)
Column indices (size >= NonZerosCount)
Numerical values (size >= NonZerosCount)
Gets the number of non-zero entries.
Initializes a new instance of the CompressedColumnStorage class.
Initializes a new instance of the CompressedColumnStorage class.
Initializes a new instance of the CompressedColumnStorage class. Based on other CCS arrays
Returns the transpose of this matrix.
Transpose this matrix and store the result in given matrix.
Adds two matrices in CSC format, C = A + B, where A is current instance.
Adds two matrices, C = alpha*A + beta*B, where A is current instance.
Scalar factor for A, current instance.
Scalar factor for B, other instance.
The matrix added to this instance.
Contains the sum.
The (result) matrix has to be fully initialized and provide enough space for
the nonzero entries of the sum. An upper bound is the sum of the nonzeros count
of (this) and (other).
Sparse matrix multiplication, C = A*B
column-compressed matrix
C = A*B, null on error
Filter matrix values.
Filter function returning true if value should be kept,
false if value should be discarded.
New number of non-zeros.
Filter function arguments:
1 = Row index i
2 = Column index j
3 = Value of entry (i,j)
Element a_{i,j} is dropped, if func(i, j, aij) returns false.
Removes numerically zero entries from a matrix.
Drop tolerance (default is 0.0)
The new number of nonzero entries.
Returns a clone of this matrix.
If true (default), the values are copied.
Evaluates whether this matrix is symmetric.
Permute the rows of the matrix.
Permutation matrix P.
The target storage (must be fully initialized to match the source storage).
Permute the rows of the matrix.
Permutation matrix P.
Permute the columns of the matrix.
Permutation matrix P.
The target storage (must be fully initialized to match the source storage).
Permute the columns of the matrix.
Permutation matrix P.
Returns the positions of the diagonal elements of a sparse matrix.
Permutes the columns of a matrix in CSC format, B = A * P, where P represents
a permutation matrix.
Input matrix values.
Input matrix row pointers.
Input matrix column indices.
Output matrix values.
Output matrix row pointers.
Output matrix column indices.
Permutation array of length ColumnCount.
The permutation P is defined through the array perm: for each j,
perm(j) represents the destination row number of row number j:
a(i,j) in the original matrix becomes a(perm(i),j) in the output matrix.
Permute the rows of a matrix in CSC format, B = P * A, where P represents
a permutation matrix.
Input matrix values.
Input matrix row pointers.
Input matrix column indices.
Output matrix values.
Output matrix row pointers.
Output matrix column indices.
Permutation array of length RowCount.
Copy matrix values (not needed if used 'in place').
The permutation matrix P maps column j into column perm(j), i.e.,
on return a(i,j) in the original matrix becomes a(i,perm(j)) in the
output matrix.
Notes:
1. This routine is in place: aj, bj can be the same.
2. If the matrix is initially sorted (by increasing column number)
then bx, bi, bj may not be on return.
Change the max # of entries sparse matrix
Serves as a hash function for a particular type.
A hash code for the current .
Coordinate storage sparse matrix format.
Row indices (size = NonZerosCount)
Column indices (size = NonZerosCount)
Numerical values (size = NonZerosCount)
Gets the number of rows.
Gets the number of columns.
Gets the number of non-zero entries.
Initializes a new instance of the CoordinateStorage class.
Adds an entry to the storage.
Row index of new entry
Column index of new entry
Numerical value of new entry
Duplicate entries will be added up, i.e. calling
storage.At(0, 0, 1.0);
storage.At(0, 0, 2.0);
will result in an entry with value 3.0 at index (0, 0) of the
resulting matrix.
Memory will be increased as necessary.
Returns the transposed coordinate storage.
If true, clone storage arrays, otherwise just swap the references and re-use the arrays.
The transposed storage.
Resize the storage arrays of the sparse matrix.
The new size of Values and ColumnIndices arrays.
Use size = 0 to automatically resize to non-zeros count.
Dense column-major matrix storage.
Gets the numerical values in column-major order.
Return the matrix value at position (i, j).
The row index.
The column index.
Initializes a new instance of the DenseColumnMajorStorage class.
Initializes a new instance of the DenseColumnMajorStorage class.
Sets the element without range checking.
Copy values from array to matrix row.
The row index.
The new values.
Copy values from array to matrix column.
The column index.
The new values.
Returns the transpose of this matrix.
Transpose this matrix and store the result in given matrix.
Adds two matrices in CSC format, C = A + B, where A is current instance.
Adds two matrices, C = A + B, where A is current instance.
The matrix added to this instance.
Contains the sum.
Dense matrix multiplication, C = A*B
Dense matrix
C = A*B, null on error
Dense matrix multiplication, C = A*B
The matrix multiplied to this instance.
The product matrix.
Pointwise multiplies this matrix with another matrix and stores the result into the result matrix.
The matrix to pointwise multiply with this one.
The matrix to store the result of the pointwise multiplication.
Returns a clone of this matrix.
Returns a new matrix containing the upper triangle of this matrix.
The upper triangle of this matrix.
Returns a new matrix containing the lower triangle of this matrix.
The lower triangle of this matrix.
Puts the lower triangle of this matrix into the result matrix.
Where to store the lower triangle.
If is .
If the result matrix's dimensions are not the same as this matrix.
Puts the upper triangle of this matrix into the result matrix.
Where to store the lower triangle.
If is .
If the result matrix's dimensions are not the same as this matrix.
Returns a sub-matrix with values in given range.
The row to start copying to.
The number of rows to copy. Must be positive.
The column to start copying to.
The number of columns to copy. Must be positive.
Copies the values of a given matrix into a region in this matrix.
The row to start copying to.
The column to start copying to.
The sub-matrix to copy from.
Copies the values of a given matrix into a region in this matrix.
The row to start copying to.
The number of rows to copy. Must be positive.
The column to start copying to.
The number of columns to copy. Must be positive.
The sub-matrix to copy from.
Represents the nonzero pattern of a column-compressed matrix.
Used for ordering and symbolic factorization.
Column pointers with last entry equal number of non-zeros (size = ColumnCount + 1)
Row indices (size = NonZerosCount)
Gets the number of rows.
Gets the number of columns.
Gets the number of non-zero entries.
Change the shape of the matrix (only used by Dulmage-Mendelsohn decomposition).
Change the max # of entries sparse matrix
Sort column indices using insertion sort.
Computes the transpose of a sparse matrix, C = A';
Transposed matrix, C = A'
Symbolic sum C = A + B
column-compressed matrix
Sum C = A + B
Sparse matrix multiplication, C = A*B
column-compressed matrix
C = A*B
Permutes a sparse matrix, C = PAQ.
Permutation vector of length m.
Permutation vector of length n.
Permuted matrix, C = PAQ.
Drops entries from a sparse matrix
Drop element a_{i,j} if func(i, j) is false.
New number of entries in A.
Scatters and sums a sparse vector A(:,j) into a dense vector, x = x + beta * A(:,j).
the column of A to use
size m, node i is marked if w[i] = mark
mark value of w
pattern of x accumulated in ci
pattern of x placed in C starting at C.i[nz]
new value of nz
Converter for different types of storages.
Convert a coordinate storage to compressed sparse column (CSC) format.
Coordinate storage.
Remove and sum duplicate entries.
Compressed sparse column storage.
Convert a 2D array to coordinate storage.
2D array storage.
Coordinate storage.
Convert a jagged array to compressed sparse column (CSC) format.
Jagged array storage.
Compressed sparse column storage.
Convert a column major array to coordinate storage.
Column major array storage.
Number of rows.
Number of columns.
Coordinate storage.
Convert a 2D jagged array to coordinate storage.
jagged array storage.
Coordinate storage.
All rows of the array are assumed to be equal in length
Convert a row major array to coordinate storage.
Row major array storage.
Number of rows.
Number of columns.
Coordinate storage.
Abstract base class for matrix implementations.
Zero value for T.
One value for T.
Initializes a new instance of the Matrix class.
Return the matrix value at position (row, column).
The row index.
The column index.
Matrix value
Clears all values form the matrix.
The method does not release memory.
Extract row from matrix.
The column index to extract.
Extract row from matrix.
The column index to extract.
Dense array.
Extract column from matrix.
The column index to extract.
Extract column from matrix.
The column index to extract.
Dense array.
Calculates the induced L1 norm of this matrix.
The maximum absolute column sum of the matrix.
Calculates the induced infinity norm of this matrix.
The maximum absolute row sum of the matrix.
Calculates the entry-wise Frobenius norm of this matrix.
The square root of the sum of the squared values.
Enumerates all values of the matrix.
Enumeration of tuples (i, j, a[i, j]).
Indicates whether the current object is equal to another object of the same type.
An object to compare with this object.
true if the current object is equal to the parameter; otherwise, false.
Check two matrices for equality.
Determines whether the specified is equal to the current .
true if the specified is equal to the current ; otherwise, false.
The to compare with the current .
Serves as a hash function for a particular type.
A hash code for the current .