Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Eigen matrix: get_coef function and matrix deallocation

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Eigen matrix: get_coef function and matrix deallocation


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Eigen matrix: get_coef function and matrix deallocation
  • Date: Fri, 29 Jun 2012 07:52:33 +0200

On 06/28/2012 03:43 PM,

wrote:
Hi,
until now I was using the CGAL 3.9 version with the TAUCS library in order
to solve a large sparse system. As recommended in the installation manual
I replaced TAUCS with Eigen in the 4.0 version.
I need to write end read some auxiliary matrices in order to build the
final large matrix which is solved with the available linear solver. With
TAUCS I used the functions set_coef and get_coef . I don't find the
equivalent of the get_function in the class Eigen matrix. How can I have
a read access to the matrix coefficient in Eigen?
Eigen_sparse_matrix and Eigen_sparse_symmetric_matrix are model of the
concep SparseLinearAlgebraTraits_d::Matrix documented in [1].

The class Eigen_matrix is not documented. Look at the end of the file
CGAL/Eigen_matrix.h for details (the documentation is roughly [2]

Moreover, what is the
suggested method to free memory? (I'm just using the new and delete
operators to allocate and deallocate auxiliary matrices at main level).
In the class Eigen_sparse_matrix and Eigen_sparse_symmetric_matrix, you have the method eigen_object() that returns the internal matrix for eigen used (of type Eigen::SparseMatrix<T>). You can use Eigen methods to reserve memory and clear it see [3].


Thanks in advance!




[1] http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Surface_mesh_parameterization_ref/Concept_SparseLinearAlgebraTraits_d--Matrix.html
[2] http://eigen.tuxfamily.org/dox/classEigen_1_1Matrix.html
[3] http://eigen.tuxfamily.org/dox/classEigen_1_1SparseMatrix.html





Archive powered by MHonArc 2.6.18.

Top of Page