Mat and Vec are template class which takes 2 template parameters, defined in Mat.h.
template<class Rep, class ErrChecker> class Mat; template<class Rep, class ErrChecker> class Vec;
Rep
is the concrete data structure for Mat / Vec, it can be a Container or an expression.ErrChecker
can be one of the 3 error checker provided (see Error handling).
To define a matrix, you can do something like this:
First include the header file needed
#include <exmat.h>
using namespace exmat;
Mat<DenseMatCon<float,4,4>, FullErrorChecker> A, B, C;
typedef Mat<DenseMatCon<float,4,4>, FullErrorChecker> Mat4x4f;
Mat4x4f A, B, C;
Vec<DenseColVecCon<float, 3> > u, v;
At this point, you may want to have a look on some examples:
Examples
Example: A very simple example
The Mat / Vec will be inherited from it's representation, Rep
, which means you can directly call the container's member functions, for example:
Defines a dynamic vector
Vec<DenseColVecCon<float, 0> > v;
v.resize(10);
Go to the next section : Container