Mimas linear algebra operations.
[Linear Algebra]

Collaboration diagram for Mimas linear algebra operations.:

This group contains Mimas operations, for vectors and matrices. More...

Functions

template<typename T>
boost::numeric::ublas::vector<
T > 
mimas::unit (const boost::numeric::ublas::vector< T > &x)
 Compute unit vector.
template<typename 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.

Detailed Description

This group contains Mimas operations, for vectors and matrices.

All functionality provided by mimas::vector formerly, should be provided here.

Author:
Stuart Meikle (stu@stumeikle.org)
Date:
Sat Mar 1 2003 BST

Function Documentation

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.

Compute $a\times b:=(a_2\,b_3-a_3\,b_2,a_3\,b_1-a_1\,b_3, a_1\,b_2-a_2\,b_1)^\top$

Parameters:
a first vector.
b second vector.
Returns:
cross product of a and b.

template<typename T>
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.

Parameters:
M the matrix to compute the determinant of.
Author:
Julien Faucher (faucherj@gmail.com)

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.

Parameters:
a first vector.
b second vector.
Returns:
angle to rotate a onto b

Definition at line 64 of file linalg.h.

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.

Computes the rotation of a point around an axis of given vector, and passing through the origin.

Parameters:
u the axis of the rotation (must be a unit 3-D vector)
v the vector to rotate
angle the angle of the rotation
Author:
Julien Faucher (faucherj@gmail.com)

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.

Attention! The direction of rotation is oposite to the one of vector::rotate.

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.

The scalar cross product for 2-dimensional vectors is $a\times b:=a_1\,b_2-a_2\,b_1$. It is rotational invariant.

For scalar product see boost::inner_prod.

Parameters:
a first vector.
b second vector.

Definition at line 51 of file linalg.h.

template<typename T>
boost::numeric::ublas::vector< T > mimas::unit ( const boost::numeric::ublas::vector< T > &  x  ) 

Compute unit vector.

Compute unit vector $\frac{\vec{x}}{|\vec{x}|}$.

Parameters:
x input vector (non-zero).
Returns:
Vector scaled to length 1.

Definition at line 37 of file linalg.h.


[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:21 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...