A set of functions that operate on sparse matrices and sparse structures.
More...
|
template<class T > |
Array< T > | jem::numeric::diag (const SparseMatrix< T > &a) |
| Returns the diagonal values of a sparse matrix. More...
|
|
template<class T > |
void | jem::numeric::sortRows (SparseMatrix< T > &a) |
| performs a jem::sort on each row of a sparse matrix More...
|
|
template<class T , class F > |
SparseMatrix< T > | jem::numeric::filter (const SparseMatrix< T > &a, const SparseFilter< T, F > &f) |
| Returns a copy of a sparse matrix with certain elements filtered out. More...
|
|
template<class T , class A > |
SparseMatrix< T > | jem::numeric::toMatrix (const util::SparseArray< T, 2, A > &a) |
| creates a sparse matrix from a two-dimensional sparse array. More...
|
|
template<class T , class A > |
util::SparseArray< T, 2, A > & | jem::numeric::toArray (util::SparseArray< T, 2, A > &out, const SparseMatrix< T > &in) |
| creates a two-dimensional sparse array from a sparse matrix. More...
|
|
#include <jem/numeric/sparse/utilities.h>
Returns an array that contains the diagonal values of the sparse matrix
- Parameters
-
- Returns
- an array containing the diagonal values of the matrix
sorts the column indices of each row based on the values. The sparse matrix still represents the same mathematical matrix after the function call, however the data is stored differently.
- Parameters
-
a | - sparse matrix that is adapted |
template<class T , class F >
Returns a sparse matrix that is identical to the input matrix, but for the elements that have been filtered out using a sparse filter object.
- Parameters
-
a | - sparse matrix |
f | - a sparse filter |
- Returns
- a sparse matrix
template<class T , class A >
Returns a sparse matrix representation of a two-dimenstional sparse array object
- Parameters
-
a | - two-dimenstional sparse aray |
- Returns
- a sparse matrix
template<class T , class A >
Fills the sparse array parameter out with a copy of the sparse matrix in. The existing data in the sparse array out will be deleted. The function returns a reference to the sparse array parameter out.
- Parameters
-
out | - two-dimenstional sparse aray |
in | - parse matrix |
- Returns
- a reference to the parameter out