SparseLinearAlgebra_d::Matrix

Definition

SparseLinearAlgebraTraits_d::Matrix is a concept of a sparse matrix class.

Refines

This is a sub-concept of LinearAlgebraTraits_d::Matrix.

Types

SparseLinearAlgebra_d::Matrix::NT

Creation

SparseLinearAlgebra_d::Matrix M ( int dimension);
Create a square matrix initialized with zeros.

SparseLinearAlgebra_d::Matrix M ( int rows, int columns);
Create a rectangular matrix initialized with zeros.

Operations

int M.row_dimension () Return the matrix number of rows.
int M.column_dimension () Return the matrix number of columns.
NT M.get_coef ( int row, int column) Read access to a matrix coefficient. Preconditions:
  • 0 <= row < row_dimension().
  • 0 <= column < column_dimension().
void M.add_coef ( int row, int column, NT value)
Write access to a matrix coefficient: a_ij <- a_ij + val. Preconditions:
  • 0 <= row < row_dimension().
  • 0 <= column < column_dimension().
void M.set_coef ( int row, int column, NT value)
Write access to a matrix coefficient. Preconditions:
  • 0 <= row < row_dimension().
  • 0 <= column < column_dimension().

Has Models

Taucs_matrix<T>
Taucs_symmetric_matrix<T>
OpenNL::SparseMatrix<T> in OpenNL package

See Also

SparseLinearAlgebraTraits_d
SparseLinearAlgebraTraits_d::Vector