﻿DoubleCsrSparseMatrix Class

# DoubleCsrSparseMatrix Class

Class DoubleCsrSparseMatrix stores a general sparse matrix using Compressed Row (CSR) storage format.
Inheritance Hierarchy

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
```[SerializableAttribute]
public class DoubleCsrSparseMatrix : SparseMatrixData<CompressedSparseRow<double>, double>,
IEquatable<DoubleCsrSparseMatrix>, ICloneable```

The DoubleCsrSparseMatrix type exposes the following members.

Constructors
NameDescription
DoubleCsrSparseMatrix Constructs an empty DoubleCsrSparseMatrix.
DoubleCsrSparseMatrix(CompressedSparseRowDouble) Constructs a DoubleCsrSparseMatrix instance with the given data.
DoubleCsrSparseMatrix(IDictionaryIntPair, Double, Int32) Constructs a DoubleCsrSparseMatrix instance from the given coordinate map format.
Top
Properties
NameDescription
Cols Gets the number of columns in the matrix.
(Inherited from SparseMatrixDataStorage, Type)
Data Gets and sets the formatted data for the matrix.
(Inherited from SparseMatrixDataStorage, Type)
Item Gets and sets the value at the given matrix position.
(Inherited from SparseMatrixDataStorage, Type)
Rows Gets the number of rows in the matrix.
(Inherited from SparseMatrixDataStorage, Type)
Top
Methods
NameDescription
Add(DoubleCsrSparseMatrix, DoubleCsrSparseMatrix) Compute the sum of two sparse matrices. Performs the operation C = A + B, where C[i,j] = A[i,j] + B[i,j].
Add(DoubleCsrSparseMatrix, DoubleCsrSparseMatrix, Double) Computes the some of a sparse matrix with the scalar multiple of another. Performs the operation C = A + beta*B where C[i,j] = A[i,j] + beta*B[i,j].
Clone Creates a deep copy of self.
Divide Divides a sparse matrix by a scalar.
Equals(DoubleCsrSparseMatrix) Equals function for Compressed Row (CSR) formatted sparse matrices.
Equals(Object) Equals function for Compressed Row (CSR) formatted sparse matrices.
(Overrides SparseMatrixDataStorage, TypeEquals(Object))
GetHashCode Gets the hash code for this instance.
(Overrides SparseMatrixDataStorage, TypeGetHashCode)
Multiply(Double, DoubleCsrSparseMatrix) Multiply a scalar and a sparse matrix.
Multiply(DoubleCsrSparseMatrix, Double) Multiply a scalar and a sparse matrix.
Scale Scales each element in the matrix by the specified value.
Subtract Subtracts two sparse matrices.
ToCommaSeparated Returns a formatted string representation of this matrix using commas and newlines.
(Inherited from SparseMatrixDataStorage, Type)
ToCommaSeparated(String) Returns a formatted string representation of this matrix using commas and newlines. Numbers are formatted using the specified format string.
(Inherited from SparseMatrixDataStorage, Type)
ToDenseMatrix Converts this sparse matrix to a dense matrix.
ToString Returns a formatted string representation of this matrix.
(Inherited from SparseMatrixDataStorage, Type)
ToString(String) Returns a formatted string representation of this matrix. Numbers are displayed using the specified format.
(Inherited from SparseMatrixDataStorage, Type)
ToTabDelimited Returns a formatted string representation of this matrix using tabs and newlines.
(Inherited from SparseMatrixDataStorage, Type)
ToTabDelimited(String) Returns a formatted string representation of this matrix using tabs and newlines. Numbers are formatted using the specified format string.
(Inherited from SparseMatrixDataStorage, Type)
TransposeAdd(DoubleCsrSparseMatrix, DoubleCsrSparseMatrix) Computes the sum of the transpose of one sparse matrix with another sparse matrix. Performs the operation C = A' + B, where ' denotes transpose and C[i,j] = A[j,i] + B[i,j].
TransposeAdd(DoubleCsrSparseMatrix, DoubleCsrSparseMatrix, Double) Computes the sum of the transpose of one sparse matrix with a scalar multiple another sparse matrix. Performs the operation C = A' + beta*B, where ' denotes transpose and C[i,j] = A[j,i] + B[i,j].
Top
Operators
NameDescription
Division(DoubleCsrSparseMatrix, Double) Divides a sparse matrix by a scalar.
Equality(DoubleCsrSparseMatrix, DoubleCsrSparseMatrix) Equality operator for sparse matrices in compressed row (CSR) format.
Inequality(DoubleCsrSparseMatrix, DoubleCsrSparseMatrix) Not equals operator for sparse matrices in compressed row (CSR) format.
Multiply(Double, DoubleCsrSparseMatrix) Multiply a scalar and a sparse matrix.
Multiply(DoubleCsrSparseMatrix, Double) Multiply a scalar and a sparse matrix.
Subtraction(DoubleCsrSparseMatrix, DoubleCsrSparseMatrix) Subtracts two sparse matrices.
Top
Fields
NameDescription
data_ The matrix data.
(Inherited from SparseMatrixDataStorage, Type)
Top