matrix Namespace Reference

namespace for the matrix library More...

Classes

class  Matrix
 Matrix type. More...
class  SparseArray
class  SparseMatrix
 sparse matrix which uses an HashTable first (fast implemented) version More...

Typedefs

typedef unsigned int I
 type for matrix indices
typedef double D
 type for matrix elements
typedef std::vector< MatrixMatrices

Functions

int cmpdouble (const void *a, const void *b)
std::ostream & operator<< (std::ostream &str, const Matrix &mat)
gsl_matrix * toGSL (const Matrix &src)
 copies our matrix into a gsl matrix (don't forget gsl_matrix_free)
Matrix fromGSL (const gsl_matrix *src)
 copies gsl matrix to our matrix
Matrix fromGSL (const gsl_vector *src)
 copies gsl vector to our matrix (column-vector)
Matrix fromGSL_real (const gsl_matrix_complex *src)
 copies the real part of gsl matrix_complex to our matrix
Matrix fromGSL_imag (const gsl_matrix_complex *src)
 copies the imag part of gsl matrix_complex to our matrix
Matrix eigenValuesRealSym (const Matrix &m)
 calculates the eigenvalues of the real and symmetric matrix m and returns them as a column vector in descending order
bool eigenValuesVectorsRealSym (const Matrix &m, Matrix &eigenvalues, Matrix &eigenvectors)
 calculates the eigenvalues and corresponding eigenvectors of the the real and symmetric matrix m.
bool eigenValues (const Matrix &m, Matrix &vals_real, Matrix &vals_imag)
 calculates the eigenvalues of the matrix m and returns them as a column vectors seperated to real and imaginary part in descending order.
bool eigenValuesVectors (const Matrix &m, Matrix &vals_real, Matrix &vals_imag, Matrix &vecs_real, Matrix &vecs_imag)
 calculates the eigenvalues and corresponding eigenvectors of the matrix m.

Variables

const int T = 0xFF
 integer constant for use with exp function and (^) operator to transpose the matrix

Detailed Description

namespace for the matrix library

Array which uses an HashTable for elements stored in this array.

Author:
Georg Martius

Can be used as an base class of SparseMatrix. first (fast implemented) version.


Typedef Documentation

typedef double D

type for matrix elements

typedef unsigned int I

type for matrix indices

typedef std::vector<Matrix> Matrices

Function Documentation

int matrix::cmpdouble ( const void *  a,
const void *  b 
)
bool eigenValues ( const Matrix &  m,
Matrix &  real,
Matrix &  imag 
)

calculates the eigenvalues of the matrix m and returns them as a column vectors seperated to real and imaginary part in descending order.

Matrix eigenValuesRealSym ( const Matrix &  m  ) 

calculates the eigenvalues of the real and symmetric matrix m and returns them as a column vector in descending order

bool eigenValuesVectors ( const Matrix &  m,
Matrix &  vals_real,
Matrix &  vals_imag,
Matrix &  vecs_real,
Matrix &  vecs_imag 
)

calculates the eigenvalues and corresponding eigenvectors of the matrix m.

The eigenvalues are returned them as a column vector in descending order and the belonging eigenvectors are stored in the columns of the matrix eigenvectors. Both are seperated into real and imaginary part.

bool eigenValuesVectorsRealSym ( const Matrix &  m,
Matrix &  eigenvalues,
Matrix &  eigenvectors 
)

calculates the eigenvalues and corresponding eigenvectors of the the real and symmetric matrix m.

The eigenvalues are returned them as a column vector in descending order and the belonging eigenvectors are stored in the columns of the matrix eigenvectors.

Matrix fromGSL ( const gsl_vector *  src  ) 

copies gsl vector to our matrix (column-vector)

Matrix fromGSL ( const gsl_matrix *  src  ) 

copies gsl matrix to our matrix

Matrix fromGSL_imag ( const gsl_matrix_complex *  src  ) 

copies the imag part of gsl matrix_complex to our matrix

Matrix fromGSL_real ( const gsl_matrix_complex *  src  ) 

copies the real part of gsl matrix_complex to our matrix

std::ostream& matrix::operator<< ( std::ostream &  str,
const Matrix &  mat 
)
gsl_matrix * toGSL ( const Matrix &  src  ) 

copies our matrix into a gsl matrix (don't forget gsl_matrix_free)


Variable Documentation

const int T = 0xFF

integer constant for use with exp function and (^) operator to transpose the matrix

Examples:
matrix/matrixexample.cpp.
Generated on Thu Jun 28 14:49:08 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3