Class

CGAL::Eigen_solver_traits<T>

Definition

The class Eigen_solver_traits provides an interface to the sparse solvers of Eigen. The version 3.1 (or greater) of Eigen must be available on the system.

#include <CGAL/Eigen_solver_traits.h>

Is Model for the Concepts

SparseLinearAlgebraTraits_d.

Parameters

T: a sparse solver of Eigen. The default solver is the iterative bi-congugate gradient stabilized solver Eigen::BiCGSTAB for double.

Types

typedef typename T::Scalar NT;

typedef CGAL::Eigen_vector<NT> Vector;

Eigen_solver_traits<T>::Matrix
If T is Eigen::ConjugateGradient<M> or Eigen::SimplicialCholesky<M>, Matrix is CGAL::Eigen_sparse_symmetric_matrix<T> and CGAL::Eigen_sparse_matrix<T> otherwise.

Operations

T& st.solver () Returns a reference to the internal Eigen solver. This function can be used for example to set specific parameters of the solver.

See Also

CGAL::Eigen_sparse_matrix<T>
CGAL::Eigen_sparse_symmetric_matrix<T>
CGAL::Eigen_vector<T>
http://eigen.tuxfamily.org

Example

The instantiation of this class assumes an Eigen sparse solver is provided. Here are few examples:

typedef CGAL::Eigen_sparse_matrix<double>::EigenType EigenMatrix;

//iterative general solver
typedef CGAL::Eigen_solver_traits< Eigen::BiCGSTAB<EigenMatrix> > Iterative_general_solver;

//iterative symmetric solver
typedef CGAL::Eigen_solver_traits< Eigen::ConjugateGradient<EigenMatrix> > Iterative_symmetric_solver;

//direct symmetric solver
typedef CGAL::Eigen_solver_traits< Eigen::SimplicialCholesky<EigenMatrix> > Direct_symmetric_solver;