#include <boost/qvm/mat.hpp>
namespace boost
{
namespace qvm
{
template <class T,int Rows,int Cols>
struct mat
{
T a[Rows][Cols];
template <class R>
operator R() const
{
R r;
assign(r,*this);
return r;
}
};
template <class Matrix>
struct m_traits;
template <class T,int Rows,int Cols>
struct m_traits< mat<T,Rows,Cols> >
{
typedef T scalar_type;
static int const rows=Rows;
static int const cols=Cols;
template <int Row,int Col> static scalar_type r( mat<T,Rows,Cols> const & x ) { return x.a[Row][Col]; }
template <int Row,int Col> static scalar_type & w( mat<T,Rows,Cols> & x ) { return x.a[Row][Col]; }
static scalar_type ir( int row, int col, mat<T,Rows,Cols> const & x ) { return x.a[row][col]; }
static scalar_type & iw( int row, int col, mat<T,Rows,Cols> & x ) { return x.a[row][col]; }
};
}
}