File kernel/src/utils/SiconosAlgebra/EigenProblems.hpp

Go to the source code of this file

Functions to compute eigenvalues/vectors of a matrix.

Based on boost ublas bindings to lapack. Usage : see EigenProblemsTest.cpp.

namespace Siconos
namespace eigenproblems

Functions

int geev(SiconosMatrix &input_mat, complex_vector &eigenval, complex_matrix &left_eigenvec, complex_matrix &right_eigenvec, bool withLeft = false, bool withRight = true)

Compute eigenvalues and eigenvectors of a nonsymmetrix complex matrix See examples of use in test/EigenProblemsTest.cpp.

Return
int : return value from lapack routine. 0 if succesful.
Parameters
  • input_mat: SiconosMatrix : input matrix.
  • eigenval: complex_vector : eigenvalues of the matrix
  • left_eigenvec: complex_matrix : matrix of the left eigenvectors
  • right_eigenvec: complex_matrix : matrix of the right eigenvectors
  • withLeft: : true if left eigenvectors are to be computed (default = false).
  • withRight: : true if right eigenvectors are to be computed (default = true).

int syev(SiconosVector &eigenval, SiconosMatrix &eigenvec, bool withVect = true)

Compute eigenvalues and eigenvectors of a real symmetric matrix A See examples of use in test/EigenProblemsTest.cpp.

Return
int : return value from lapack routine. 0 if successful.
Parameters
  • eigenval: : eigenvalues of the matrix
  • eigenvec: : input matrix A, replace with eigenvectors (columns) in output.
  • withVect: : true if eigenvectors are to be computed (default = true). eigenvector.