Free Electron
|
Dense array of sparse rows. More...
#include <ListSparseMatrix.h>
Public Member Functions | |
SparseMatrix (U32 rows, U32 columns) | |
SparseMatrix (const SparseMatrix< T > &rhs) | |
SparseMatrix< T > & | operator= (const SparseMatrix< T > &rhs) |
T | operator() (U32 i, U32 j) const |
T & | operator() (U32 i, U32 j) |
void | reset (U32 rows, U32 columns) |
void | clear (void) |
U32 | rows (void) const |
U32 | columns (void) const |
void | setTranspose (const SparseMatrix< T > &rhs) |
void | setSum (const SparseMatrix< T > &rhs) |
void | setDifference (const SparseMatrix< T > &rhs) |
void | premultiplyDiagonal (const SparseMatrix< T > &diag, SparseMatrix< T > &b) const |
void | scale (const F32 scalar, SparseMatrix< T > &result) const |
void | transform (const DenseVector< T > &x, DenseVector< T > &b) const |
void | transposeTransform (const DenseVector< T > &x, DenseVector< T > &b) const |
SparseMatrix (U32 rows, U32 columns) | |
SparseMatrix (const SparseMatrix< T, ROW > &rhs) | |
SparseMatrix< T, ROW > & | operator= (const SparseMatrix< T, ROW > &rhs) |
T | operator() (U32 i, U32 j) const |
T & | operator() (U32 i, U32 j) |
void | reset (U32 rows, U32 columns) |
void | clear (void) |
U32 | rows (void) const |
U32 | columns (void) const |
void | setTranspose (const SparseMatrix< T, ROW > &rhs) |
void | setSum (const SparseMatrix< T, ROW > &rhs) |
void | setDifference (const SparseMatrix< T, ROW > &rhs) |
void | setProduct (const SparseMatrix< T, ROW > &lhs, const SparseMatrix< T, ROW > &rhs) |
void | premultiplyDiagonal (const SparseMatrix< T, ROW > &diag, SparseMatrix< T, ROW > &b) const |
void | premultiplyDiagonal (const DenseVector< T > &diag, SparseMatrix< T, ROW > &b) const |
void | premultiplyInverseDiagonal (const SparseMatrix< T, ROW > &diag, SparseMatrix< T, ROW > &b) const |
void | premultiplyInverseDiagonal (const DenseVector< T > &diag, SparseMatrix< T, ROW > &b) const |
void | postmultiplyDiagonal (const DenseVector< T > &diag, SparseMatrix< T, ROW > &b) const |
void | postmultiplyInverseDiagonal (const SparseMatrix< T, ROW > &diag, SparseMatrix< T, ROW > &b) const |
void | postmultiplyInverseDiagonal (const DenseVector< T > &diag, SparseMatrix< T, ROW > &b) const |
void | scale (const F32 scalar) |
void | scale (const F32 scalar, SparseMatrix< T, ROW > &result) const |
void | transform (const DenseVector< T > &x, DenseVector< T > &b) const |
void | transposeTransform (const DenseVector< T > &x, DenseVector< T > &b) const |
Protected Member Functions | |
BWORD | seek (U32 i, U32 j) const |
Protected Attributes | |
U32 | m_rows |
U32 | m_columns |
Row * | m_pRow |
Row * | m_pCurrent |
ListCore::Context | m_context |
ROW * | m_pRow |
Related Functions | |
(Note that these are not member functions.) | |
template<class T > | |
BWORD | isSquare (const SparseMatrix< T > &matrix) |
Return true is matrix is square, otherwise return false. More... | |
template<class T > | |
SparseMatrix< T > & | setIdentity (SparseMatrix< T > &matrix) |
Set matrix to identity matrix. More... | |
template<class T > | |
SparseMatrix< T > | transpose (const SparseMatrix< T > &matrix) |
Return transpose of matrix. More... | |
template<class T > | |
SparseMatrix< T > | operator+ (const SparseMatrix< T > &lhs, const SparseMatrix< T > &rhs) |
SparseMatrix add. More... | |
template<class T > | |
SparseMatrix< T > | operator- (const SparseMatrix< T > &lhs, const SparseMatrix< T > &rhs) |
SparseMatrix subtract. More... | |
template<class T > | |
SparseMatrix< T > | premultiplyDiagonal (const SparseMatrix< T > &lhs, const SparseMatrix< T > &rhs) |
SparseMatrix-SparseMatrix multiply where first matrix is a diagonal. More... | |
template<class T > | |
DenseVector< T > | operator* (const SparseMatrix< T > &lhs, const DenseVector< T > &rhs) |
SparseMatrix-Vector multiply. More... | |
template<class T > | |
DenseVector< T > | transposeMultiply (const SparseMatrix< T > &lhs, const DenseVector< T > &rhs) |
SparseMatrix-Vector multiply with matrix transposed. More... | |
template<class T > | |
SparseMatrix< T > | operator* (const SparseMatrix< T > &matrix, const F32 scalar) |
SparseMatrix-Scalar post-multiply. More... | |
template<class T > | |
SparseMatrix< T > | operator* (const F32 scalar, const SparseMatrix< T > &matrix) |
SparseMatrix-Scalar pre-multiply. More... | |
template<class T > | |
String | print (const SparseMatrix< T > &matrix) |
SparseMatrix print. More... | |
template<class T , class ROW > | |
U32 | width (const SparseMatrix< T, ROW > &matrix) |
Return the horizonatal dimension. More... | |
template<class T , class ROW > | |
U32 | height (const SparseMatrix< T, ROW > &matrix) |
Return the vertical dimension. More... | |
template<class T , class ROW > | |
void | premultiplyDiagonal (DenseVector< T > &result, const SparseMatrix< T, ROW > &diagonal, const DenseVector< T > &vector) |
Compute the per-element product of the vector and the diagonal entries. More... | |
template<class T , class ROW > | |
void | premultiplyInverseDiagonal (DenseVector< T > &result, const SparseMatrix< T, ROW > &diagonal, const DenseVector< T > &vector) |
Compute the per-element product of the vector and the inverse diagonal entries. More... | |
template<class T , class ROW > | |
BWORD | isSquare (const SparseMatrix< T, ROW > &matrix) |
Return true is matrix is square, otherwise return false. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > & | setIdentity (SparseMatrix< T, ROW > &matrix) |
Set matrix to identity matrix. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > | transpose (const SparseMatrix< T, ROW > &matrix) |
Return transpose of matrix. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > | operator+ (const SparseMatrix< T, ROW > &lhs, const SparseMatrix< T, ROW > &rhs) |
SparseMatrix add. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > | operator- (const SparseMatrix< T, ROW > &lhs, const SparseMatrix< T, ROW > &rhs) |
SparseMatrix subtract. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > & | operator+= (SparseMatrix< T, ROW > &lhs, const SparseMatrix< T, ROW > &rhs) |
SparseMatrix add in place. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > & | operator-= (SparseMatrix< T, ROW > &lhs, const SparseMatrix< T, ROW > &rhs) |
SparseMatrix subtract in place. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > & | premultiplyDiagonal (SparseMatrix< T, ROW > &result, const DenseVector< T > &lhs, const SparseMatrix< T, ROW > &rhs) |
SparseMatrix-SparseMatrix multiply where first matrix is presumed diagonal. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > & | premultiplyDiagonal (SparseMatrix< T, ROW > &result, const SparseMatrix< T, ROW > &lhs, const SparseMatrix< T, ROW > &rhs) |
SparseMatrix-SparseMatrix multiply where first matrix is presumed diagonal. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > & | premultiplyInverseDiagonal (SparseMatrix< T, ROW > &result, const SparseMatrix< T, ROW > &lhs, const SparseMatrix< T, ROW > &rhs) |
SparseMatrix-SparseMatrix multiply where first matrix is presumed diagonal. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > & | premultiplyInverseDiagonal (SparseMatrix< T, ROW > &result, const DenseVector< T > &lhs, const SparseMatrix< T, ROW > &rhs) |
SparseMatrix-SparseMatrix multiply where first matrix is a diagonal represented with a vector. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > & | postmultiplyDiagonal (SparseMatrix< T, ROW > &result, const SparseMatrix< T, ROW > &lhs, const DenseVector< T > &rhs) |
SparseMatrix-SparseMatrix multiply where second matrix is a diagonal. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > & | postmultiplyInverseDiagonal (SparseMatrix< T, ROW > &result, const SparseMatrix< T, ROW > &lhs, const SparseMatrix< T, ROW > &rhs) |
SparseMatrix-SparseMatrix multiply where second matrix is presumed diagonal. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > & | postmultiplyInverseDiagonal (SparseMatrix< T, ROW > &result, const SparseMatrix< T, ROW > &lhs, const DenseVector< T > &rhs) |
SparseMatrix-SparseMatrix multiply where second matrix is a diagonal represented by a vector. More... | |
template<class T , class ROW > | |
DenseVector< T > | operator* (const SparseMatrix< T, ROW > &lhs, const DenseVector< T > &rhs) |
SparseMatrix-Vector multiply. More... | |
template<class T , class ROW > | |
void | transformVector (const SparseMatrix< T, ROW > &lhs, const DenseVector< T > &in, DenseVector< T > &out) |
SparseMatrix-Vector multiply with matrix. More... | |
template<class T , class ROW > | |
void | transposeTransformVector (const SparseMatrix< T, ROW > &lhs, const DenseVector< T > &in, DenseVector< T > &out) |
SparseMatrix-Vector multiply with matrix transposed. More... | |
template<class T , class ROW , class U > | |
SparseMatrix< T, ROW > | operator* (const SparseMatrix< T, ROW > &matrix, const U scalar) |
SparseMatrix-Scalar post-multiply. More... | |
template<class T , class ROW , class U > | |
SparseMatrix< T, ROW > | operator* (const U scalar, const SparseMatrix< T, ROW > &matrix) |
SparseMatrix-Scalar pre-multiply. More... | |
template<class T , class ROW > | |
SparseMatrix< T, ROW > & | operator*= (SparseMatrix< T, ROW > &lhs, const F32 scalar) |
SparseMatrix-Scalar multiply in place. More... | |
Dense array of sparse rows.
SparseMatrix has some similar functionailty to Matrix through overloaded non-member operations.
Only a small number of operations are implemented for SparseMatrix. Others may be added as needed.
SparseMatrix has some similar functionality to Matrix through overloaded non-member operations.
Only a small number of operations are implemented for SparseMatrix. Others may be added as needed.
|
related |
Return the vertical dimension.
|
related |
Return true is matrix is square, otherwise return false.
|
related |
Return true is matrix is square, otherwise return false.
|
related |
SparseMatrix-Vector multiply.
|
related |
SparseMatrix-Scalar post-multiply.
|
related |
SparseMatrix-Scalar pre-multiply.
|
related |
SparseMatrix-Vector multiply.
|
related |
SparseMatrix-Scalar post-multiply.
|
related |
SparseMatrix-Scalar pre-multiply.
|
related |
SparseMatrix-Scalar multiply in place.
|
related |
SparseMatrix add.
|
related |
SparseMatrix add.
|
related |
SparseMatrix add in place.
|
related |
SparseMatrix subtract.
|
related |
SparseMatrix subtract.
|
related |
SparseMatrix subtract in place.
|
related |
SparseMatrix-SparseMatrix multiply where second matrix is a diagonal.
The diagonal matrix is represented as a vector.
The result argument can be used to avoid the expensive allocation of a temporary. The same object is returned by reference for efficient operation in a compound expression.
|
related |
SparseMatrix-SparseMatrix multiply where second matrix is presumed diagonal.
Diagonal elements of the first matrix are inverted during the multiply. Non-diagonal elements of the first matrix are ignored and treated as zero.
The result argument can be used to avoid the expensive allocation of a temporary. The same object is returned by reference for efficient operation in a compound expression.
|
related |
SparseMatrix-SparseMatrix multiply where second matrix is a diagonal represented by a vector.
Diagonal elements of the first matrix are inverted during the multiply. Non-diagonal elements of the first matrix are ignored and treated as zero.
The result argument can be used to avoid the expensive allocation of a temporary. The same object is returned by reference for efficient operation in a compound expression.
|
related |
SparseMatrix-SparseMatrix multiply where first matrix is a diagonal.
|
related |
Compute the per-element product of the vector and the diagonal entries.
Only the diagonal elements are used. The non-diagonal values are not read and treated as zero.
|
related |
SparseMatrix-SparseMatrix multiply where first matrix is presumed diagonal.
The diagonal matrix is represented as a vector.
The result argument can be used to avoid the expensive allocation of a temporary. The same object is returned by reference for efficient operation in a compound expression.
|
related |
SparseMatrix-SparseMatrix multiply where first matrix is presumed diagonal.
Non-diagonal elements of the first matrix are ignored and treated as zero.
The result argument can be used to avoid the expensive allocation of a temporary. The same object is returned by reference for efficient operation in a compound expression.
|
related |
Compute the per-element product of the vector and the inverse diagonal entries.
Only the diagonal elements are used. The non-diagonal values are not read and treated as zero.
|
related |
SparseMatrix-SparseMatrix multiply where first matrix is presumed diagonal.
Diagonal elements of the first matrix are inverted during the multiply. Non-diagonal elements of the first matrix are ignored and treated as zero.
The result argument can be used to avoid the expensive allocation of a temporary. The same object is returned by reference for efficient operation in a compound expression.
|
related |
SparseMatrix-SparseMatrix multiply where first matrix is a diagonal represented with a vector.
Diagonal elements of the first matrix are inverted during the multiply. Non-diagonal elements of the first matrix are ignored and treated as zero.
The result argument can be used to avoid the expensive allocation of a temporary. The same object is returned by reference for efficient operation in a compound expression.
|
related |
SparseMatrix print.
The output isn't sparse.
|
related |
Set matrix to identity matrix.
|
related |
Set matrix to identity matrix.
|
related |
SparseMatrix-Vector multiply with matrix.
|
related |
Return transpose of matrix.
|
related |
Return transpose of matrix.
|
related |
SparseMatrix-Vector multiply with matrix transposed.
|
related |
SparseMatrix-Vector multiply with matrix transposed.
|
related |
Return the horizonatal dimension.