SLAMflex SE
0.1.0
SLAMflex provides detection and tracking of dominant planes for smartphone devices. This plane can then be used to show AR content relative to the plane orientation. The detection of plane is performed in the field of view of the smartphone camera. In subsequent frames it is tracked. The interface returns the plane position and orientation.
|
#include <SymEigen.h>
Public Member Functions | |
SymEigen () | |
SymEigen (int m) | |
template<int R, int C, typename B > | |
SymEigen (const Matrix< R, C, Precision, B > &m) | |
template<int R, int C, typename B > | |
void | compute (const Matrix< R, C, Precision, B > &m) |
Perform the eigen decomposition of a matrix. More... | |
template<int S, typename P , typename B > | |
Vector< Size, Precision > | backsub (const Vector< S, P, B > &rhs) const |
template<int R, int C, typename P , typename B > | |
Matrix< Size, C, Precision > | backsub (const Matrix< R, C, P, B > &rhs) const |
Matrix< Size, Size, Precision > | get_pinv (const double condition=Internal::symeigen_condition_no) const |
Vector< Size, Precision > | get_inv_diag (const double condition) const |
Matrix< Size, Size, Precision > & | get_evectors () |
const Matrix< Size, Size, Precision > & | get_evectors () const |
Vector< Size, Precision > & | get_evalues () |
const Vector< Size, Precision > & | get_evalues () const |
bool | is_posdef () const |
Is the matrix positive definite? More... | |
bool | is_negdef () const |
Is the matrix negative definite? More... | |
Precision | get_determinant () const |
Get the determinant of the matrix. More... | |
Matrix< Size, Size, Precision > | get_sqrtm () const |
Matrix< Size, Size, Precision > | get_isqrtm (const double condition=Internal::symeigen_condition_no) const |
Private Attributes | |
Matrix< Size, Size, Precision > | my_evectors |
Vector< Size, Precision > | my_evalues |
Performs eigen decomposition of a matrix. Real symmetric (and hence square matrices) can be decomposed into
where is an orthogonal matrix (and hence ) whose columns are the eigenvectors of and is a diagonal matrix whose entries are the eigenvalues of . These quantities are often of use directly, and can be obtained as follows:
Further, provided the eigenvalues are nonnegative, the square root of a matrix and its inverse can also be obtained,
This decomposition is very similar to the SVD (q.v.), and can be used to solve equations using backsub() or get_pinv(), with the same treatment of condition numbers.
SymEigen<> (= SymEigen<-1>) can be used to create an eigen decomposition whose size is determined at run-time.
Definition at line 260 of file SymEigen.h.
|
inline |
Definition at line 262 of file SymEigen.h.
|
inline |
Initialise this eigen decomposition but do no immediately perform a decomposition.
m | The size of the matrix to perform the eigen decomposition on. |
Definition at line 268 of file SymEigen.h.
|
inline |
Construct the eigen decomposition of a matrix. This initialises the class, and performs the decomposition immediately.
Definition at line 273 of file SymEigen.h.
|
inline |
Calculate result of multiplying the (pseudo-)inverse of M by a vector. For a vector , this calculates by back substitution (i.e. without explictly calculating the (pseudo-)inverse). See the SVD detailed description for a description of condition variables.
Definition at line 290 of file SymEigen.h.
|
inline |
Calculate result of multiplying the (pseudo-)inverse of M by another matrix. For a matrix , this calculates by back substitution (i.e. without explictly calculating the (pseudo-)inverse). See the SVD detailed description for a description of condition variables.
Definition at line 299 of file SymEigen.h.
|
inline |
Perform the eigen decomposition of a matrix.
Definition at line 279 of file SymEigen.h.
|
inline |
Get the determinant of the matrix.
Definition at line 370 of file SymEigen.h.
|
inline |
Returns the eigenvalues of the matrix. The eigenvalues are listed in order, from the smallest to the largest. These are also the diagonal values of the matrix .
Definition at line 346 of file SymEigen.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 349 of file SymEigen.h.
|
inline |
Returns the eigenvectors of the matrix. This returns , so that the rows of the matrix are the eigenvectors, which can be extracted using usual Matrix::operator[]() subscript operator. They are returned in order of the size of the corresponding eigenvalue, i.e. the vector with the largest eigenvalue is first.
Definition at line 336 of file SymEigen.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 340 of file SymEigen.h.
|
inline |
Calculates the reciprocals of the eigenvalues of the matrix. The vector invdiag
lists the eigenvalues in order, from the largest (i.e. smallest reciprocal) to the smallest. These are also the diagonal values of the matrix . Any eigenvalues which are too small are set to zero (see the SVD detailed description for a description of the and condition variables).
Definition at line 318 of file SymEigen.h.
|
inline |
Calculate the inverse square root of a matrix which is a matrix M such that M.T*M=A^-1. Any square-rooted eigenvalues which are too small are set to zero (see the SVD detailed description for a description of the condition variables).
Definition at line 396 of file SymEigen.h.
|
inline |
Calculate (pseudo-)inverse of the matrix. This is not usually needed: if you need the inverse just to multiply it by a matrix or a vector, use one of the backsub() functions, which will be faster. See the SVD detailed description for a description of the pseudo-inverse and condition variables.
Definition at line 308 of file SymEigen.h.
|
inline |
Calculate the square root of a matrix which is a matrix M such that M.T*M=A.
Definition at line 380 of file SymEigen.h.
|
inline |
Is the matrix negative definite?
Definition at line 361 of file SymEigen.h.
|
inline |
Is the matrix positive definite?
Definition at line 352 of file SymEigen.h.
|
private |
Definition at line 418 of file SymEigen.h.
|
private |
Definition at line 416 of file SymEigen.h.