CGAL::Taucs_matrix<T>

Definition

The class Taucs_matrix is a C++ wrapper around TAUCS' matrix type taucs_ccs_matrix.

This kind of matrix can be either symmetric or not. Symmetric matrices store only the lower triangle.

#include <CGAL/Taucs_matrix.h>

Is Model for the Concepts

Model of the SparseLinearAlgebraTraits_d::Matrix concept.

Parameters

The full template declaration is:

template<
class T>
struct Taucs_matrix;

Types

Taucs_matrix<T>::NT

Creation

Taucs_matrix<T> M ( int dim, bool is_symmetric = false);
Create a square matrix initialized with zeros.

Parameters:
dim
Matrix dimension.
is_symmetric
Symmetric/hermitian?
Taucs_matrix<T> M ( int rows, int columns, bool is_symmetric = false);
Create a rectangular matrix initialized with zeros.

Parameters:
rows
Matrix dimensions.
is_symmetric
Symmetric/hermitian?

Operations

int M.row_dimension () Return the matrix number of rows.
int M.column_dimension () Return the matrix number of columns.
T M.get_coef ( int i, int j) Read access to a matrix coefficient. Preconditions:
  • 0 <= i < row_dimension().
  • 0 <= j < column_dimension().
void M.set_coef ( int i, int j, T val) Write access to a matrix coefficient: a_ij <- val. Optimization: For symmetric matrices, Taucs_matrix stores only the lower triangle set_coef() does nothing if (i, j) belongs to the upper triangle. Preconditions:
  • 0 <= i < row_dimension().
  • 0 <= j < column_dimension().
void M.add_coef ( int i, int j, T val) Write access to a matrix coefficient: a_ij <- a_ij + val. Optimization: For symmetric matrices, Taucs_matrix stores only the lower triangle add_coef() does nothing if (i, j) belongs to the upper triangle. Preconditions:
  • 0 <= i < row_dimension().
  • 0 <= j < column_dimension().
const taucs_ccs_matrix* M.get_taucs_matrix () Construct and return the TAUCS matrix wrapped by this object. Note: the TAUCS matrix returned by this method is valid only until the next call to set_coef(), add_coef() or get_taucs_matrix().

See Also

CGAL::Taucs_solver_traits<T>
CGAL::Taucs_symmetric_solver_traits<T>
CGAL::Taucs_symmetric_matrix<T>
CGAL::Taucs_vector<T>