Class CompressedRow
Class defining a sparse matrix with a compressed row storage.
Implements
Inherited Members
Namespace: BRIDGES.LinearAlgebra.Matrices.Sparse
Assembly: BRIDGES.dll
Syntax
public class CompressedRow : SparseMatrix, IGroupAction<Matrix, double>, IGroupAction<SparseMatrix, double>, IGroupAction<CompressedRow, double>
Constructors
| Improve this Doc View SourceCompressedRow(CompressedRow)
Initialises a new instance of the CompressedRow class from another CompressedRow.
Declaration
public CompressedRow(CompressedRow crs)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | crs | CompressedRow to deep copy. |
CompressedRow(Int32, Int32, DictionaryOfKeys)
Initialises a new instance of the CompressedRow class by defining its size, and by giving its values in a DictionaryOfKeys.
Declaration
public CompressedRow(int rowCount, int columnCount, DictionaryOfKeys dok)
Parameters
Type | Name | Description |
---|---|---|
Int32 | rowCount | Number of rows of the CompressedRow. |
Int32 | columnCount | Number of columns of the CompressedRow. |
DictionaryOfKeys | dok | Values of the CompressedRow. |
Properties
| Improve this Doc View SourceColumnCount
Gets the number of columns in this matrix.
Declaration
public override int ColumnCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceItem[Int32]
Gets or sets the non-zero value of this sparse matrix at a given index.
Declaration
public override double this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index of the non-zero value to get. |
Property Value
Type | Description |
---|---|
Double | The non-zero value of this sparse matrix at the given index. |
Overrides
| Improve this Doc View SourceNonZerosCount
Gets the number of non-zero values in this sparse matrix.
Declaration
public override int NonZerosCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceRowCount
Gets the number of rows in this matrix.
Declaration
public override int RowCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Methods
| Improve this Doc View SourceAdd(CompressedColumn, CompressedRow)
Computes the left addition of a CompressedRow with a CompressedColumn.
Declaration
public static CompressedRow Add(CompressedColumn left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
CompressedColumn | left | Left CompressedColumn for the addition. |
CompressedRow | right | Right CompressedRow for the addition. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the addition. |
Add(CompressedRow, DenseMatrix)
Computes the right addition of a CompressedRow with a DenseMatrix.
Declaration
public static DenseMatrix Add(CompressedRow left, DenseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the addition. |
DenseMatrix | right | Right DenseMatrix for the addition. |
Returns
Type | Description |
---|---|
DenseMatrix | The new DenseMatrix resulting from the addition. |
Add(CompressedRow, Matrix)
Computes the right addition of a CompressedRow with a Matrix on the right.
Declaration
public static Matrix Add(CompressedRow left, Matrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the addition. |
Matrix | right | Right Matrix for the addition. |
Returns
Type | Description |
---|---|
Matrix | The new Matrix resulting from the addition. |
Add(CompressedRow, CompressedColumn)
Computes the right addition of a CompressedRow with a CompressedColumn.
Declaration
public static CompressedRow Add(CompressedRow left, CompressedColumn right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the addition. |
CompressedColumn | right | Right CompressedColumn for the addition. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedColumn resulting from the addition. |
Add(CompressedRow, CompressedRow)
Computes the addition of two CompressedRow.
Declaration
public static CompressedRow Add(CompressedRow left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the addition. |
CompressedRow | right | Right CompressedRow for the addition. |
Returns
Type | Description |
---|---|
CompressedRow | The CompressedRow resulting from the addition. |
Add(CompressedRow, SparseMatrix)
Computes the right addition of a CompressedRow with a SparseMatrix.
Declaration
public static CompressedRow Add(CompressedRow left, SparseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the addition. |
SparseMatrix | right | Right SparseMatrix for the addition. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the addition. |
Add(SparseMatrix, CompressedRow)
Computes the left addition of a CompressedRow with a SparseMatrix.
Declaration
public static CompressedRow Add(SparseMatrix left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
SparseMatrix | left | Left SparseMatrix for the addition. |
CompressedRow | right | Right CompressedRow for the addition. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the addition. |
At(Int32, Int32)
Get the value of the matrix at the given row and column index.
Declaration
public override double At(int row, int column)
Parameters
Type | Name | Description |
---|---|---|
Int32 | row | Row index of the value to get. |
Int32 | column | Column index of the value to get. |
Returns
Type | Description |
---|---|
Double | The value at the given row and column index. |
Overrides
| Improve this Doc View SourceColumnIndex(Int32)
Returns the column index of a non-zero value at a given index.
Declaration
public int ColumnIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index of the non-zero value whose column index to get. |
Returns
Type | Description |
---|---|
Int32 | The column index of this CompressedRow sparse matrix at the given index. |
Divide(CompressedRow, Double)
Computes the scalar division of a CompressedRow with a
Declaration
public static CompressedRow Divide(CompressedRow operand, double divisor)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | operand | CompressedRow to divide. |
Double | divisor |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the scalar division. |
Identity(Int32)
Returns the neutral CompressedRow for the multiplication.
Declaration
public static CompressedRow Identity(int size)
Parameters
Type | Name | Description |
---|---|---|
Int32 | size | Number of rows and columns of the CompressedRow. |
Returns
Type | Description |
---|---|
CompressedRow | The CompressedRow of the given size, with ones on the diagonal and zeros elsewhere. |
Insert(Int32, Int32, Double)
Inserts a value at the given row and column index. If a non-zero value already exists, the value replaces the existing one.
Declaration
public int Insert(int rowIndex, int columnIndex, double value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | rowIndex | Row index of the value to insert. |
Int32 | columnIndex | Column index of the value to insert. |
Double | value | Value to insert. |
Returns
Type | Description |
---|---|
Int32 | The index of the inserted non-zero value. |
Remarks
This operation can be time consuming.
Multiply(CompressedColumn, CompressedRow)
Computes the left multiplication of a CompressedRow with a CompressedColumn.
Declaration
public static CompressedRow Multiply(CompressedColumn left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
CompressedColumn | left | Left CompressedColumn for the multiplication. |
CompressedRow | right | Right CompressedRow for the multiplication. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the multiplication. |
Multiply(CompressedRow, DenseMatrix)
Computes the right multiplication of a CompressedRow with a DenseMatrix.
Declaration
public static DenseMatrix Multiply(CompressedRow left, DenseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the multiplication. |
DenseMatrix | right | Right DenseMatrix for the multiplication. |
Returns
Type | Description |
---|---|
DenseMatrix | The new DenseMatrix resulting from the multiplication. |
Multiply(CompressedRow, Matrix)
Computes the right multiplication of a CompressedRow with a Matrix.
Declaration
public static Matrix Multiply(CompressedRow left, Matrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the multiplication. |
Matrix | right | Right Matrix for the multiplication. |
Returns
Type | Description |
---|---|
Matrix | The new Matrix resulting from the multiplication. |
Multiply(CompressedRow, CompressedColumn)
Computes the right multiplication of a CompressedRow with a CompressedColumn.
Declaration
public static CompressedRow Multiply(CompressedRow left, CompressedColumn right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the multiplication. |
CompressedColumn | right | Right CompressedColumn for the multiplication. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedColumn resulting from the multiplication. |
Multiply(CompressedRow, CompressedRow)
Computes the multiplication of two CompressedRow.
Declaration
public static CompressedRow Multiply(CompressedRow left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the multiplication. |
CompressedRow | right | Right CompressedRow for the multiplication. |
Returns
Type | Description |
---|---|
CompressedRow | The CompressedRow resulting from the multiplication. |
Multiply(CompressedRow, SparseMatrix)
Computes the right multiplication of a CompressedRow with a SparseMatrix.
Declaration
public static CompressedRow Multiply(CompressedRow left, SparseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the multiplication. |
SparseMatrix | right | Right SparseMatrix for the multiplication. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the multiplication. |
Multiply(CompressedRow, DenseVector)
Computes the right multiplication of a CompressedRow with a DenseVector : A*V
.
Declaration
public static DenseVector Multiply(CompressedRow matrix, DenseVector vector)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | matrix | CompressedRow to multiply on the right. |
DenseVector | vector | DenseVector to multiply with. |
Returns
Type | Description |
---|---|
DenseVector | The new DenseVector resulting from the multiplication. |
Multiply(CompressedRow, SparseVector)
Computes the right multiplication of a CompressedRow with a SparseVector : A*V
.
Declaration
public static SparseVector Multiply(CompressedRow matrix, SparseVector vector)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | matrix | CompressedRow to multiply on the right. |
SparseVector | vector | SparseVector to multiply with. |
Returns
Type | Description |
---|---|
SparseVector | The new DenseVector resulting from the multiplication. |
Multiply(CompressedRow, Vector)
Computes the right multiplication of a CompressedRow with a Vector : A*V
.
Declaration
public static Vector Multiply(CompressedRow matrix, Vector vector)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | matrix | CompressedRow to multiply on the right. |
Vector | vector | Vector to multiply with. |
Returns
Type | Description |
---|---|
Vector | The new Vector resulting from the multiplication. |
Multiply(CompressedRow, Double)
Computes the right scalar multiplication of a CompressedRow with a
Declaration
public static CompressedRow Multiply(CompressedRow operand, double factor)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | operand | CompressedRow to multiply on the right. |
Double | factor |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the right scalar multiplication. |
Multiply(SparseMatrix, CompressedRow)
Computes the left multiplication of a CompressedRow with a SparseMatrix.
Declaration
public static CompressedRow Multiply(SparseMatrix left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
SparseMatrix | left | Left SparseMatrix for the multiplication. |
CompressedRow | right | Right CompressedRow for the multiplication. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the multiplication. |
Multiply(Double, CompressedRow)
Computes the left scalar multiplication of a CompressedRow with a
Declaration
public static CompressedRow Multiply(double factor, CompressedRow operand)
Parameters
Type | Name | Description |
---|---|---|
Double | factor | |
CompressedRow | operand | CompressedRow to multiply on the left. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the left scalar multiplication. |
NonZero(Int32)
Returns the non-zero value at a given index.
Declaration
public double NonZero(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index of the non-zero value to get. |
Returns
Type | Description |
---|---|
Double | The non-zero value of this CompressedRow sparse matrix at the given index. |
NonZeros()
Provides an enumerable collection to iterate on the non-zero entries of the SparseMatrix non-zero entries.
Declaration
public override IEnumerable<(int rowIndex, int columnIndex, double value)> NonZeros()
Returns
Type | Description |
---|---|
IEnumerable<(, , )<Int32, Int32, Double>> | The enumerable collection containing row index, the column index and the value of the SparseMatrix non-zero entries. |
Overrides
| Improve this Doc View SourceRowPointer(Int32)
Returns the row pointers at a given index.
Declaration
public int RowPointer(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index row pointer to get. |
Returns
Type | Description |
---|---|
Int32 | The row pointers of this CompressedRow sparse matrix. |
SolveCholesky(Vector)
Solve the system
Ax=y
using Cholesky decomposition.
Declaration
public DenseVector SolveCholesky(Vector vector)
Parameters
Type | Name | Description |
---|---|---|
Vector | vector | The vector y in the system. |
Returns
Type | Description |
---|---|
DenseVector | The vector x in the system. |
Subtract(CompressedColumn, CompressedRow)
Computes the subtraction of a CompressedRow on a CompressedColumn.
Declaration
public static CompressedRow Subtract(CompressedColumn left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
CompressedColumn | left | Left CompressedColumn to subtract with. |
CompressedRow | right | Right CompressedRow to subtract. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the subtraction. |
Subtract(CompressedRow, DenseMatrix)
Computes the right subtraction of a CompressedRow with a DenseMatrix.
Declaration
public static DenseMatrix Subtract(CompressedRow left, DenseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow to subtract. |
DenseMatrix | right | Right DenseMatrix to subtract with. |
Returns
Type | Description |
---|---|
DenseMatrix | The new DenseMatrix resulting from the subtraction. |
Subtract(CompressedRow, Matrix)
Computes the right subtraction of a CompressedRow with a Matrix.
Declaration
public static Matrix Subtract(CompressedRow left, Matrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow to subtract. |
Matrix | right | Right Matrix to subtract with. |
Returns
Type | Description |
---|---|
Matrix | The new Matrix resulting from the subtraction. |
Subtract(CompressedRow, CompressedColumn)
Computes the right subtraction of a CompressedRow with a CompressedColumn.
Declaration
public static CompressedRow Subtract(CompressedRow left, CompressedColumn right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow to subtract. |
CompressedColumn | right | Right CompressedColumn to subtract with. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedColumn resulting from the subtraction. |
Subtract(CompressedRow, CompressedRow)
Computes the subtraction of two CompressedRow.
Declaration
public static CompressedRow Subtract(CompressedRow left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow to subtract. |
CompressedRow | right | Right CompressedRow to subtract with. |
Returns
Type | Description |
---|---|
CompressedRow | The CompressedRow resulting from the subtraction. |
Subtract(CompressedRow, SparseMatrix)
Computes the right subtraction of a CompressedRow with a SparseMatrix.
Declaration
public static CompressedRow Subtract(CompressedRow left, SparseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow to subtract. |
SparseMatrix | right | Right SparseMatrix to subtract with. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the subtraction. |
Subtract(SparseMatrix, CompressedRow)
Computes the subtraction of a CompressedRow on a SparseMatrix.
Declaration
public static CompressedRow Subtract(SparseMatrix left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
SparseMatrix | left | Left SparseMatrix to subtract with. |
CompressedRow | right | Right CompressedRow to subtract. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the subtraction. |
Transpose(CompressedRow)
Transposes the CompressedRow
Declaration
public static CompressedRow Transpose(CompressedRow matrix)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | matrix | CompressedRow to tranpose. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow, transposed of the initial one. |
TransposeMultiply(CompressedRow, DenseVector)
Computes the right multiplication of a transposed CompressedRow with a DenseVector : At·V
.
Declaration
public static DenseVector TransposeMultiply(CompressedRow matrix, DenseVector vector)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | matrix | CompressedRow to transpose then multiply on the right. |
DenseVector | vector | DenseVector to multiply with. |
Returns
Type | Description |
---|---|
DenseVector | The new DenseVector resulting from the multiplication. |
TransposeMultiply(CompressedRow, SparseVector)
Computes the right multiplication of a transposed CompressedRow with a SparseVector : At·V
.
Declaration
public static SparseVector TransposeMultiply(CompressedRow matrix, SparseVector vector)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | matrix | CompressedRow to transpose then multiply on the right. |
SparseVector | vector | SparseVector to multiply with. |
Returns
Type | Description |
---|---|
SparseVector | The new SparseVector resulting from the multiplication. |
TransposeMultiply(CompressedRow, Vector)
Computes the right multiplication of a transposed CompressedRow with a Vector : At·V
.
Declaration
public static Vector TransposeMultiply(CompressedRow matrix, Vector vector)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | matrix | CompressedRow to transpose then multiply on the right. |
Vector | vector | Vector to multiply with. |
Returns
Type | Description |
---|---|
Vector | The new Vector resulting from the multiplication. |
TransposeMultiplySelf(CompressedRow)
Computes the left multiplication of a CompressedRow with its transposition : At·A
.
Declaration
public static CompressedRow TransposeMultiplySelf(CompressedRow operand)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | operand | CompressedRow for the operation. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the operation. |
Zero(Int32, Int32)
Returns the neutral CompressedRow for the addition.
Declaration
public static CompressedRow Zero(int rowCount, int columnCount)
Parameters
Type | Name | Description |
---|---|---|
Int32 | rowCount | Number of rows of the CompressedRow. |
Int32 | columnCount | Number of columns of the CompressedRow. |
Returns
Type | Description |
---|---|
CompressedRow | The CompressedRow of the given size, with zeros on every coordinates. |
Operators
| Improve this Doc View SourceAddition(CompressedRow, DenseMatrix)
Computes the right addition of a CompressedRow with a DenseMatrix.
Declaration
public static DenseMatrix operator +(CompressedRow left, DenseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the addition. |
DenseMatrix | right | Right DenseMatrix for the addition. |
Returns
Type | Description |
---|---|
DenseMatrix | The new DenseMatrix resulting from the addition. |
Addition(CompressedRow, Matrix)
Computes the right addition of a CompressedRow with a Matrix on the right.
Declaration
public static Matrix operator +(CompressedRow left, Matrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the addition. |
Matrix | right | Right Matrix for the addition. |
Returns
Type | Description |
---|---|
Matrix | The new Matrix resulting from the addition. |
Addition(CompressedRow, CompressedColumn)
Computes the right addition of a CompressedRow with a CompressedColumn.
Declaration
public static CompressedRow operator +(CompressedRow left, CompressedColumn right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the addition. |
CompressedColumn | right | Right CompressedColumn for the addition. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedColumn resulting from the addition. |
Addition(CompressedRow, CompressedRow)
Computes the addition of two CompressedRow.
Declaration
public static CompressedRow operator +(CompressedRow left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the addition. |
CompressedRow | right | Right CompressedRow for the addition. |
Returns
Type | Description |
---|---|
CompressedRow | The CompressedRow resulting from the addition. |
Addition(CompressedRow, SparseMatrix)
Computes the right addition of a CompressedRow with a SparseMatrix.
Declaration
public static CompressedRow operator +(CompressedRow left, SparseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the addition. |
SparseMatrix | right | Right SparseMatrix for the addition. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the addition. |
Division(CompressedRow, Double)
Computes the scalar division of a CompressedRow with a
Declaration
public static CompressedRow operator /(CompressedRow operand, double divisor)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | operand | CompressedRow to divide. |
Double | divisor |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the scalar division. |
Explicit(CompressedColumn to CompressedRow)
Converts a CompressedColumn number into a CompressedRow.
Declaration
public static explicit operator CompressedRow(CompressedColumn ccs)
Parameters
Type | Name | Description |
---|---|---|
CompressedColumn | ccs | CompressedRow to convert. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the conversion. |
Multiply(CompressedRow, DenseMatrix)
Computes the right multiplication of a CompressedRow with a DenseMatrix.
Declaration
public static DenseMatrix operator *(CompressedRow left, DenseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the multiplication. |
DenseMatrix | right | Right DenseMatrix for the multiplication. |
Returns
Type | Description |
---|---|
DenseMatrix | The new DenseMatrix resulting from the multiplication. |
Multiply(CompressedRow, Matrix)
Computes the right multiplication of a CompressedRow with a Matrix.
Declaration
public static Matrix operator *(CompressedRow left, Matrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the multiplication. |
Matrix | right | Right Matrix for the multiplication. |
Returns
Type | Description |
---|---|
Matrix | The new Matrix resulting from the multiplication. |
Multiply(CompressedRow, CompressedColumn)
Computes the right multiplication of a CompressedRow with a CompressedColumn.
Declaration
public static CompressedRow operator *(CompressedRow left, CompressedColumn right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the multiplication. |
CompressedColumn | right | Right CompressedColumn for the multiplication. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedColumn resulting from the multiplication. |
Multiply(CompressedRow, CompressedRow)
Computes the multiplication of two CompressedRow.
Declaration
public static CompressedRow operator *(CompressedRow left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the multiplication. |
CompressedRow | right | Right CompressedRow for the multiplication. |
Returns
Type | Description |
---|---|
CompressedRow | The CompressedRow resulting from the multiplication. |
Multiply(CompressedRow, SparseMatrix)
Computes the right multiplication of a CompressedRow with a SparseMatrix.
Declaration
public static CompressedRow operator *(CompressedRow left, SparseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow for the multiplication. |
SparseMatrix | right | Right SparseMatrix for the multiplication. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the multiplication. |
Multiply(CompressedRow, DenseVector)
Computes the right multiplication of a CompressedRow with a DenseVector : A*V
.
Declaration
public static DenseVector operator *(CompressedRow matrix, DenseVector vector)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | matrix | CompressedRow to multiply on the right. |
DenseVector | vector | DenseVector to multiply with. |
Returns
Type | Description |
---|---|
DenseVector | The new DenseVector resulting from the multiplication. |
Multiply(CompressedRow, SparseVector)
Computes the right multiplication of a CompressedRow with a SparseVector : A*V
.
Declaration
public static SparseVector operator *(CompressedRow matrix, SparseVector vector)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | matrix | CompressedRow to multiply on the right. |
SparseVector | vector | SparseVector to multiply with. |
Returns
Type | Description |
---|---|
SparseVector | The new SparseVector resulting from the multiplication. |
Multiply(CompressedRow, Vector)
Computes the right multiplication of a CompressedRow with a Vector : A*V
.
Declaration
public static Vector operator *(CompressedRow matrix, Vector vector)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | matrix | CompressedRow to multiply on the right. |
Vector | vector | Vector to multiply with. |
Returns
Type | Description |
---|---|
Vector | The new Vector resulting from the multiplication. |
Multiply(CompressedRow, Double)
Computes the right scalar multiplication of a CompressedRow with a
Declaration
public static CompressedRow operator *(CompressedRow operand, double factor)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | operand | CompressedRow to multiply on the right. |
Double | factor |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the right scalar multiplication. |
Multiply(Double, CompressedRow)
Computes the left scalar multiplication of a CompressedRow with a
Declaration
public static CompressedRow operator *(double factor, CompressedRow operand)
Parameters
Type | Name | Description |
---|---|---|
Double | factor | |
CompressedRow | operand | CompressedRow to multiply on the left. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the left scalar multiplication. |
Subtraction(CompressedRow, DenseMatrix)
Computes the right subtraction of a CompressedRow with a DenseMatrix.
Declaration
public static DenseMatrix operator -(CompressedRow left, DenseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow to subtract. |
DenseMatrix | right | Right DenseMatrix to subtract with. |
Returns
Type | Description |
---|---|
DenseMatrix | The new DenseMatrix resulting from the subtraction. |
Subtraction(CompressedRow, Matrix)
Computes the right subtraction of a CompressedRow with a Matrix.
Declaration
public static Matrix operator -(CompressedRow left, Matrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow to subtract. |
Matrix | right | Right Matrix to subtract with. |
Returns
Type | Description |
---|---|
Matrix | The new Matrix resulting from the subtraction. |
Subtraction(CompressedRow, CompressedColumn)
Computes the right subtraction of a CompressedRow with a CompressedColumn.
Declaration
public static CompressedRow operator -(CompressedRow left, CompressedColumn right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow to subtract. |
CompressedColumn | right | Right CompressedColumn to subtract with. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedColumn resulting from the subtraction. |
Subtraction(CompressedRow, CompressedRow)
Computes the subtraction of two CompressedRow.
Declaration
public static CompressedRow operator -(CompressedRow left, CompressedRow right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow to subtract. |
CompressedRow | right | Right CompressedRow to subtract with. |
Returns
Type | Description |
---|---|
CompressedRow | The CompressedRow resulting from the subtraction. |
Subtraction(CompressedRow, SparseMatrix)
Computes the right subtraction of a CompressedRow with a SparseMatrix.
Declaration
public static CompressedRow operator -(CompressedRow left, SparseMatrix right)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | left | Left CompressedRow to subtract. |
SparseMatrix | right | Right SparseMatrix to subtract with. |
Returns
Type | Description |
---|---|
CompressedRow | The new CompressedRow resulting from the subtraction. |
UnaryNegation(CompressedRow)
Computes the opposite of the CompressedRow.
Declaration
public static CompressedRow operator -(CompressedRow operand)
Parameters
Type | Name | Description |
---|---|---|
CompressedRow | operand | CompressedRow whose opposite is to be computed. |
Returns
Type | Description |
---|---|
CompressedRow | The CompressedRow, opposite of the initial one. |
Explicit Interface Implementations
| Improve this Doc View SourceIGroupAction<CompressedRow, Double>.Divide(Double)
Computes the right scalar division of the current element.
Declaration
CompressedRow IGroupAction<CompressedRow, double>.Divide(double divisor)
Parameters
Type | Name | Description |
---|---|---|
Double | divisor |
Returns
Type | Description |
---|---|
CompressedRow | The new element resulting from the scalar dividion. |
IGroupAction<CompressedRow, Double>.Multiply(Double)
Computes the right scalar multiplication of the current element.
Declaration
CompressedRow IGroupAction<CompressedRow, double>.Multiply(double factor)
Parameters
Type | Name | Description |
---|---|---|
Double | factor |
Returns
Type | Description |
---|---|
CompressedRow | The new element resulting from the scalar multiplication. |