TooN::SL< N, Precision > Class Template Reference
[Transformation matrices]
#include <sl.h>
List of all members.
Classes |
struct | Invert |
Public Member Functions |
const Matrix< N, N, Precision > & | get_matrix () const |
| returns the represented matrix
|
SL | inverse () const |
| returns the inverse using LU
|
SL | operator* (const SL &rhs) const |
| multiplies to SLs together by multiplying the underlying matrices
|
SL | operator*= (const SL &rhs) |
| right multiplies this SL with another one
|
template<int R, int C, typename P , typename A > |
| SL (const Matrix< R, C, P, A > &M) |
| copy constructor from a matrix, coerces matrix to be of determinant = 1
|
template<int S, typename P , typename B > |
| SL (const Vector< S, P, B > &v) |
| exp constructor, creates element through exponentiation of Lie algebra vector. see SL::exp.
|
| SL () |
| default constructor, creates identity element
|
Static Public Member Functions |
template<int S, typename P , typename B > |
static SL | exp (const Vector< S, P, B > &) |
static Matrix< N, N, Precision > | generator (int) |
Static Public Attributes |
static const int | dim = N*N - 1 |
| dimension of the vector space represented by SL<N>
|
static const int | size = N |
| size of the matrices represented by SL<N>
|
Private Member Functions |
void | coerce () |
| SL (const SL &a, const SL &b) |
| SL (const SL &from, struct Invert) |
Private Attributes |
Matrix< N, N, Precision > | my_matrix |
| }
|
Static Private Attributes |
static const int | COUNT_ASYMM = COUNT_SYMM |
static const int | COUNT_DIAG = N - 1 |
static const int | COUNT_SYMM = (dim - COUNT_DIAG)/2 |
static const int | DIAG_LIMIT = COUNT_DIAG |
static const int | SYMM_LIMIT = COUNT_SYMM + DIAG_LIMIT |
Friends |
std::istream & | operator>> (std::istream &, SL &) |
Detailed Description
template<int N, typename Precision = double>
class TooN::SL< N, Precision >
represents an element from the group SL(n), the NxN matrices M with det(M) = 1. This can be used to conveniently estimate homographies on n-1 dimentional spaces. The implementation uses the matrix exponential function exp for exponentiation from an element in the Lie algebra and LU to compute an inverse.
The Lie algebra are the NxN matrices M with trace(M) = 0. The N*N-1 generators used to represent this vector space are the following:
- diag(...,1,-1,...), n-1 along the diagonal
- symmetric generators for every pair of off-diagonal elements
- anti-symmetric generators for every pair of off-diagonal elements This choice represents the fact that SL(n) can be interpreted as the product of all symmetric matrices with det() = 1 times SO(n).
Definition at line 59 of file sl.h.
Constructor & Destructor Documentation
template<int N, typename Precision = double>
default constructor, creates identity element
Definition at line 66 of file sl.h.
template<int N, typename Precision = double>
template<int S, typename P , typename B >
exp constructor, creates element through exponentiation of Lie algebra vector. see SL::exp.
Definition at line 70 of file sl.h.
template<int N, typename Precision = double>
template<int R, int C, typename P , typename A >
copy constructor from a matrix, coerces matrix to be of determinant = 1
Definition at line 74 of file sl.h.
template<int N, typename Precision = double>
TooN::SL< N, Precision >::SL |
( |
const SL< N, Precision > & |
from, |
|
|
struct Invert |
| |
|
) |
| | [inline, private] |
Definition at line 98 of file sl.h.
template<int N, typename Precision = double>
TooN::SL< N, Precision >::SL |
( |
const SL< N, Precision > & |
a, |
|
|
const SL< N, Precision > & |
b | |
|
) |
| | [inline, private] |
Definition at line 102 of file sl.h.
Member Function Documentation
template<int N, typename Precision = double>
void TooN::SL< N, Precision >::coerce |
( |
|
) |
[inline, private] |
Definition at line 104 of file sl.h.
template<int N, typename Precision >
template<int S, typename P , typename B >
SL< N, Precision > TooN::SL< N, Precision >::exp |
( |
const Vector< S, P, B > & |
v |
) |
[inline, static] |
exponentiates a vector in the Lie algebra to compute the corresponding element
Definition at line 127 of file sl.h.
template<int N, typename Precision >
Matrix< N, N, Precision > TooN::SL< N, Precision >::generator |
( |
int |
i |
) |
[inline, static] |
returns one generator of the group. see SL for a detailed description of the generators used.
- i number of the generator between 0 and SL::dim -1 inclusive
Definition at line 138 of file sl.h.
template<int N, typename Precision = double>
const Matrix<N,N,Precision>& TooN::SL< N, Precision >::get_matrix |
( |
|
) |
const [inline] |
returns the represented matrix
Definition at line 77 of file sl.h.
template<int N, typename Precision = double>
SL TooN::SL< N, Precision >::inverse |
( |
|
) |
const [inline] |
returns the inverse using LU
Definition at line 79 of file sl.h.
template<int N, typename Precision = double>
SL TooN::SL< N, Precision >::operator* |
( |
const SL< N, Precision > & |
rhs |
) |
const [inline] |
multiplies to SLs together by multiplying the underlying matrices
Definition at line 82 of file sl.h.
template<int N, typename Precision = double>
SL TooN::SL< N, Precision >::operator*= |
( |
const SL< N, Precision > & |
rhs |
) |
[inline] |
right multiplies this SL with another one
Definition at line 84 of file sl.h.
Friends And Related Function Documentation
template<int N, typename Precision = double>
std::istream& operator>> |
( |
std::istream & |
, |
|
|
SL< N, Precision > & |
| |
|
) |
| | [friend] |
Member Data Documentation
template<int N, typename Precision = double>
Definition at line 117 of file sl.h.
template<int N, typename Precision = double>
these constants indicate which parts of the parameter vector map to which generators {
Definition at line 115 of file sl.h.
template<int N, typename Precision = double>
Definition at line 116 of file sl.h.
template<int N, typename Precision = double>
Definition at line 118 of file sl.h.
template<int N, typename Precision = double>
const int TooN::SL< N, Precision >::dim = N*N - 1 [static] |
dimension of the vector space represented by SL<N>
Definition at line 63 of file sl.h.
template<int N, typename Precision = double>
}
Definition at line 122 of file sl.h.
template<int N, typename Precision = double>
size of the matrices represented by SL<N>
Definition at line 62 of file sl.h.
template<int N, typename Precision = double>
Definition at line 119 of file sl.h.
The documentation for this class was generated from the following file: