Collaboration diagram for Mimas linear algebra operations.:
![]() |
Functions | |
template<typename T> | |
boost::numeric::ublas::vector< T > | mimas::unit (const boost::numeric::ublas::vector< T > &x) |
Compute unit vector. | |
template<typename T> | |
T | mimas::scalar_cross_product (const boost::numeric::ublas::vector< T > &a, const boost::numeric::ublas::vector< T > &b) |
Scalar cross product. | |
template<typename T> | |
angle | mimas::getAngle (const boost::numeric::ublas::vector< T > &a, const boost::numeric::ublas::vector< T > &b) |
Compute angle between two 2-dimensional vectors. | |
template<typename T> | |
boost::numeric::ublas::vector< T > | mimas::rotate (const boost::numeric::ublas::vector< T > &v, const angle &a) |
2-dimensional rotation in the mathematical direction. | |
template<typename T> | |
boost::numeric::ublas::vector< T > | mimas::crossProduct (boost::numeric::ublas::vector< T > &a, boost::numeric::ublas::vector< T > &b) |
Cross product for 3-dimensional vectors. | |
template<typename T> | |
boost::numeric::ublas::vector< T > | mimas::rodrigues (boost::numeric::ublas::vector< T > const &u, boost::numeric::ublas::vector< T > const &v, double angle) |
Rodrigues' rotation formula. | |
template<typename T> | |
double | mimas::determinant (boost::numeric::ublas::matrix< T > const &M) |
Determinant of a matrix using the LU factorization. |
All functionality provided by mimas::vector
formerly, should be provided here.
boost::numeric::ublas::vector< T > mimas::crossProduct | ( | boost::numeric::ublas::vector< T > & | a, | |
boost::numeric::ublas::vector< T > & | b | |||
) |
Cross product for 3-dimensional vectors.
Compute
a | first vector. | |
b | second vector. |
a
and b
. double mimas::determinant | ( | boost::numeric::ublas::matrix< T > const & | M | ) |
Determinant of a matrix using the LU factorization.
The decomposition used is the one provided by uBLAS.
M | the matrix to compute the determinant of. |
angle mimas::getAngle | ( | const boost::numeric::ublas::vector< T > & | a, | |
const boost::numeric::ublas::vector< T > & | b | |||
) |
boost::numeric::ublas::vector< T > mimas::rodrigues | ( | boost::numeric::ublas::vector< T > const & | u, | |
boost::numeric::ublas::vector< T > const & | v, | |||
double | angle | |||
) |
Rodrigues' rotation formula.
Computes the rotation of a point around an axis of given vector, and passing through the origin.
u | the axis of the rotation (must be a unit 3-D vector) | |
v | the vector to rotate | |
angle | the angle of the rotation |
boost::numeric::ublas::vector< T > mimas::rotate | ( | const boost::numeric::ublas::vector< T > & | v, | |
const angle & | a | |||
) |
2-dimensional rotation in the mathematical direction.
Attention! The direction of rotation is oposite to the one of vector::rotate
.
T mimas::scalar_cross_product | ( | const boost::numeric::ublas::vector< T > & | a, | |
const boost::numeric::ublas::vector< T > & | b | |||
) |
boost::numeric::ublas::vector< T > mimas::unit | ( | const boost::numeric::ublas::vector< T > & | x | ) |