CGAL 4.12.1 - CGAL and Solvers
CGAL::Eigen_diagonalize_traits< FT, dim > Class Template Reference

#include <CGAL/Eigen_diagonalize_traits.h>

## Definition

### template<typename FT, unsigned int dim = 3> class CGAL::Eigen_diagonalize_traits< FT, dim >

The class Eigen_diagonalize_traits provides an interface to the diagonalization of covariance matrices of Eigen.

Eigen version 3.1 (or later) must be available on the system.

Template Parameters
 FT Number type dim Dimension of the matrices and vectors
Is Model Of:
DiagonalizeTraits
http://eigen.tuxfamily.org
Examples:
Solver_interface/diagonalize_matrix.cpp.

## Public Types

typedef cpp11::array< FT, dim > Vector

typedef cpp11::array< FT, dim *dim > Matrix

typedef cpp11::array< FT,(dim *(dim+1)/2)> Covariance_matrix

## Static Public Member Functions

static bool diagonalize_selfadjoint_covariance_matrix (const Covariance_matrix &cov, Vector &eigenvalues)
Fill eigenvalues with the eigenvalues of the covariance matrix represented by cov. More...

static bool diagonalize_selfadjoint_covariance_matrix (const Covariance_matrix &cov, Vector &eigenvalues, Matrix &eigenvectors)
Fill eigenvalues with the eigenvalues and eigenvectors with the eigenvectors of the covariance matrix represented by cov. More...

static bool extract_largest_eigenvector_of_covariance_matrix (const Covariance_matrix &cov, Vector &normal)
Extract the eigenvector associated to the largest eigenvalue of the covariance matrix represented by cov. More...

## Member Function Documentation

template<typename FT , unsigned int dim = 3>
 static bool CGAL::Eigen_diagonalize_traits< FT, dim >::diagonalize_selfadjoint_covariance_matrix ( const Covariance_matrix & cov, Vector & eigenvalues )
static

Fill eigenvalues with the eigenvalues of the covariance matrix represented by cov.

Eigenvalues are sorted by increasing order.

Returns
true if the operation was successful and false otherwise.

template<typename FT , unsigned int dim = 3>
 static bool CGAL::Eigen_diagonalize_traits< FT, dim >::diagonalize_selfadjoint_covariance_matrix ( const Covariance_matrix & cov, Vector & eigenvalues, Matrix & eigenvectors )
static

Fill eigenvalues with the eigenvalues and eigenvectors with the eigenvectors of the covariance matrix represented by cov.

Eigenvalues are sorted by increasing order.

Returns
true if the operation was successful and false otherwise.

## ◆ extract_largest_eigenvector_of_covariance_matrix()

template<typename FT , unsigned int dim = 3>
 static bool CGAL::Eigen_diagonalize_traits< FT, dim >::extract_largest_eigenvector_of_covariance_matrix ( const Covariance_matrix & cov, Vector & normal )
static

Extract the eigenvector associated to the largest eigenvalue of the covariance matrix represented by cov.

Returns
true if the operation was successful and false otherwise.