Assignments
Assignments
|
#include <geometry.h>
Public Member Functions | |
Matrix (void) | |
Matrix (const Matrix< Dim+1, Dim+1 > &m) | |
Matrix (const Matrix< Dim-1, Dim-1 > &m, Point< Dim-1 > p=Point< Dim-1 >()) | |
double | subDeterminant (int r, int c) const |
double | determinant (void) const |
double | trace (void) const |
Matrix | inverse (void) const |
bool | setInverse (Matrix &m) const |
Point< Dim-1 > | operator* (const Point< Dim-1 > &p) const |
void | SVD (Matrix &r1, Matrix &diagonal, Matrix &r2) const |
Matrix | symmetrize (void) const |
Matrix | skewSymmetrize (void) const |
Matrix | closestRotation (void) const |
template<unsigned int Cols> | |
Matrix< Dim, Cols > | operator* (const Matrix< Dim, Cols > &m) const |
![]() | |
_BaseMatrix (void) | |
double & | operator() (int r, int c) |
const double & | operator() (int r, int c) const |
Matrix< Dim, Dim > | transpose (void) const |
Point< Rows > | operator* (const Point< Cols > &p) const |
Matrix< Dim, Dim > | operator* (double s) const |
Matrix< Dim, Dim > | operator+ (const Matrix< Dim, Dim > &m) const |
double | dot (const _BaseMatrix &p) const |
![]() | |
double | squareNorm (void) const |
double | length (void) const |
Element | unit (void) const |
Static Public Member Functions | |
static Matrix | Identity (void) |
static Matrix | Log (const Matrix &m, double eps=0.0001) |
static Matrix | SquareRoot (const Matrix &m, double eps=0.000001) |
static Matrix | Exp (const Matrix &m, int terms=100) |
![]() | |
static double | Dot (const Element &e1, const Element &e2) |
static double | SquareNorm (const Element &e) |
static double | Length (const Element &e) |
static double | SquareDistance (const Element &e1, const Element &e2) |
static double | Distance (const Element &e1, const Element &e2) |
Specialization of the matrix class for the case when it is square.
Util::SquareMatrix::Matrix | ( | void | ) |
The default constructor that initializes the matrix to zero.
Util::Matrix< Dim, Dim >::Matrix | ( | const Matrix< Dim+1, Dim+1 > & | m | ) |
This constructor generates a matrix by slicing out the top left sub-matrix
Util::Matrix< Dim, Dim >::Matrix | ( | const Matrix< Dim-1, Dim-1 > & | m, |
Point< Dim-1 > | p = Point< Dim-1 >() |
||
) |
This constructor generates matrix by projectivizing the input matrix, using m as the linear part and p as the translation.
Matrix< Dim, Dim > Util::Matrix< Dim, Dim >::closestRotation | ( | void | ) | const |
This method returns the closest rotation matrix
double Util::SquareMatrix::determinant | ( | void | ) | const |
This method returns the determinant of the matrix.
|
static |
This method returns the exponent of a matrix using a Taylor approximation with the specified number of terms.
|
static |
This static method returns the identity matrix.
SquareMatrix< Dim > Util::SquareMatrix::inverse | ( | void | ) | const |
This method returns the inverse of a matrix. The method throws an exception if the determinant is zero.
|
static |
This method returns the logarithm of a matrix, using the specified threshold to terminate the approxmation.
Matrix< Dim, Cols > Util::SquareMatrix::operator* | ( | const Matrix< Dim, Cols > & | m | ) | const |
Multiplication of matrices
Point< Dim-1 > Util::SquareMatrix::operator* | ( | const Point< Dim-1 > & | p | ) | const |
This method transforms a (Dim-1)-dimensional point by applying the projective transformation.
bool Util::SquareMatrix::setInverse | ( | Matrix< Dim, Dim > & | m | ) | const |
This method tries to set the reference to the inverse of the matrix. The boolean value indicates if it succeeded (i.e. if the matrix is non-singular).
SquareMatrix< Dim > Util::SquareMatrix::skewSymmetrize | ( | void | ) | const |
This method returns nearest skew-symmetric matrix
|
static |
This method returns the square-root of a matrix, using the specified threshold to terminate the approxmation.
double Util::SquareMatrix::subDeterminant | ( | int | r, |
int | c | ||
) | const |
This method returns the determinant of the sub-matrix with the prescribed columns and rows removed.
void Util::SquareMatrix::SVD | ( | Matrix< Dim, Dim > & | r1, |
Matrix< Dim, Dim > & | diagonal, | ||
Matrix< Dim, Dim > & | r2 | ||
) | const |
This method computes the SVD decomposition of the upper 3x3 matrix, such that r1 and r2 are rotations and the upper 3x3 matrix is equal to r1*diagonal*r2
SquareMatrix< Dim > Util::SquareMatrix::symmetrize | ( | void | ) | const |
This method returns nearest symmetric matrix
double Util::SquareMatrix::trace | ( | void | ) | const |
This method returns the trace of the matrix.