Class SymmetricSparseMatrix
Basic sparse-symmetric-matrix class. Stores upper-triangular portion.
Uses Dictionary as sparsifying data structure, which is probably
not a good option. But it is easy.
Inheritance
SymmetricSparseMatrix
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class SymmetricSparseMatrix : IMatrix
Constructors
SymmetricSparseMatrix(DenseMatrix)
Declaration
public SymmetricSparseMatrix(DenseMatrix m)
Parameters
SymmetricSparseMatrix(SymmetricSparseMatrix)
Declaration
public SymmetricSparseMatrix(SymmetricSparseMatrix m)
Parameters
SymmetricSparseMatrix(Int32)
Declaration
public SymmetricSparseMatrix(int setN = 0)
Parameters
Type |
Name |
Description |
Int32 |
setN |
|
Properties
Columns
Declaration
public int Columns { get; }
Property Value
Item[Int32, Int32]
Declaration
public double this[int r, int c] { get; set; }
Parameters
Property Value
Rows
Declaration
Property Value
Size
Declaration
public Index2i Size { get; }
Property Value
Methods
EpsilonEqual(SymmetricSparseMatrix, Double)
Declaration
public bool EpsilonEqual(SymmetricSparseMatrix B, double eps = 2.2204460492503131E-16)
Parameters
Returns
Multiply(SymmetricSparseMatrix)
Declaration
public SymmetricSparseMatrix Multiply(SymmetricSparseMatrix M2)
Parameters
Returns
Multiply(SymmetricSparseMatrix, ref SymmetricSparseMatrix, Boolean)
Declaration
public void Multiply(SymmetricSparseMatrix M2, ref SymmetricSparseMatrix R, bool bParallel = true)
Parameters
Multiply(Double[], Double[])
Declaration
public void Multiply(double[] X, double[] Result)
Parameters
NonZeroIndices()
Declaration
public IEnumerable<Index2i> NonZeroIndices()
Returns
NonZeros()
Declaration
public IEnumerable<KeyValuePair<Index2i, double>> NonZeros()
Returns
Set(Int32, Int32, Double)
Declaration
public void Set(int r, int c, double value)
Parameters
Square(Boolean)
Declaration
public SymmetricSparseMatrix Square(bool bParallel = true)
Parameters
Type |
Name |
Description |
Boolean |
bParallel |
|
Returns
SquarePackedParallel()
Returns this*this, as a packed sparse matrix. Computes in parallel.
Declaration
public PackedSparseMatrix SquarePackedParallel()
Returns
Implements