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.
Public Member Functions | Private Attributes | List of all members
TooN::Lapack_Cholesky< Size, Precision > Class Template Reference

#include <Lapack_Cholesky.h>

Public Member Functions

 Lapack_Cholesky ()
 
template<class P2 , class B2 >
 Lapack_Cholesky (const Matrix< Size, Size, P2, B2 > &m)
 
 Lapack_Cholesky (int size)
 Constructor for Size=Dynamic. More...
 
template<class P2 , class B2 >
void compute (const Matrix< Size, Size, P2, B2 > &m)
 
void do_compute ()
 
int rank () const
 
template<int Size2, typename P2 , typename B2 >
Vector< Size, Precision > backsub (const Vector< Size2, P2, B2 > &v) const
 
template<int Size2, int Cols2, typename P2 , typename B2 >
Matrix< Size, Cols2, Precision, ColMajorbacksub (const Matrix< Size2, Cols2, P2, B2 > &m) const
 
template<int Size2, typename P2 , typename B2 >
Precision mahalanobis (const Vector< Size2, P2, B2 > &v) const
 
Matrix< Size, Size, Precision > get_L () const
 
Precision determinant () const
 
Matrix get_inverse () const
 

Private Attributes

Matrix< Size, Size, Precision > my_cholesky
 
Matrix< Size, Size, Precision > my_cholesky_lapack
 
int my_rank
 

Detailed Description

template<int Size, typename Precision = DefaultPrecision>
class TooN::Lapack_Cholesky< Size, Precision >

Decomposes a positive-semidefinite symmetric matrix A (such as a covariance) into L*L^T, where L is lower-triangular. Also can compute A = S*S^T, with S lower triangular. The LDL^T form is faster to compute than the class Cholesky decomposition. The decomposition can be used to compute A^-1*x, A^-1*M, M*A^-1*M^T, and A^-1 itself, though the latter rarely needs to be explicitly represented. Also efficiently computes det(A) and rank(A). It can be used as follows:

// Declare some matrices.
Matrix<3> A = ...; // we'll pretend it is pos-def
Matrix<2,3> M;
Matrix<2> B;
Vector<3> y = make_Vector(2,3,4);
// create the Cholesky decomposition of A
Cholesky<3> chol(A);
// compute x = A^-1 * y
x = cholA.backsub(y);
//compute A^-1
Matrix<3> Ainv = cholA.get_inverse();

Cholesky decomposition of a symmetric matrix. Only the lower half of the matrix is considered This uses the non-sqrt version of the decomposition giving symmetric M = L*D*L.T() where the diagonal of L contains ones

Parameters
Sizethe size of the matrix
Precisionthe precision of the entries in the matrix and its decomposition

Definition at line 72 of file Lapack_Cholesky.h.

Constructor & Destructor Documentation

template<int Size, typename Precision = DefaultPrecision>
TooN::Lapack_Cholesky< Size, Precision >::Lapack_Cholesky ( )
inline

Definition at line 75 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
template<class P2 , class B2 >
TooN::Lapack_Cholesky< Size, Precision >::Lapack_Cholesky ( const Matrix< Size, Size, P2, B2 > &  m)
inline

Definition at line 78 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
TooN::Lapack_Cholesky< Size, Precision >::Lapack_Cholesky ( int  size)
inline

Constructor for Size=Dynamic.

Definition at line 85 of file Lapack_Cholesky.h.

Member Function Documentation

template<int Size, typename Precision = DefaultPrecision>
template<int Size2, typename P2 , typename B2 >
Vector<Size, Precision> TooN::Lapack_Cholesky< Size, Precision >::backsub ( const Vector< Size2, P2, B2 > &  v) const
inline

Definition at line 120 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
template<int Size2, int Cols2, typename P2 , typename B2 >
Matrix<Size, Cols2, Precision, ColMajor> TooN::Lapack_Cholesky< Size, Precision >::backsub ( const Matrix< Size2, Cols2, P2, B2 > &  m) const
inline

Definition at line 133 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
template<class P2 , class B2 >
void TooN::Lapack_Cholesky< Size, Precision >::compute ( const Matrix< Size, Size, P2, B2 > &  m)
inline

Definition at line 87 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
Precision TooN::Lapack_Cholesky< Size, Precision >::determinant ( ) const
inline

Definition at line 154 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
void TooN::Lapack_Cholesky< Size, Precision >::do_compute ( )
inline

Definition at line 96 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
Matrix TooN::Lapack_Cholesky< Size, Precision >::get_inverse ( ) const
inline

Definition at line 161 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
Matrix<Size,Size,Precision> TooN::Lapack_Cholesky< Size, Precision >::get_L ( ) const
inline

Definition at line 150 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
template<int Size2, typename P2 , typename B2 >
Precision TooN::Lapack_Cholesky< Size, Precision >::mahalanobis ( const Vector< Size2, P2, B2 > &  v) const
inline

Definition at line 146 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
int TooN::Lapack_Cholesky< Size, Precision >::rank ( ) const
inline

Definition at line 117 of file Lapack_Cholesky.h.

Member Data Documentation

template<int Size, typename Precision = DefaultPrecision>
Matrix<Size,Size,Precision> TooN::Lapack_Cholesky< Size, Precision >::my_cholesky
private

Definition at line 177 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
Matrix<Size,Size,Precision> TooN::Lapack_Cholesky< Size, Precision >::my_cholesky_lapack
private

Definition at line 178 of file Lapack_Cholesky.h.

template<int Size, typename Precision = DefaultPrecision>
int TooN::Lapack_Cholesky< Size, Precision >::my_rank
private

Definition at line 179 of file Lapack_Cholesky.h.


The documentation for this class was generated from the following file: