45 template<
int RowStr
ide,
int ColStr
ide>
struct Slice
48 template<
int Rows,
int Cols,
class Precision>
struct MLayout:
public GenericMBase<Rows, Cols, Precision, RowStride, ColStride, MatrixSlice<Rows, Cols, Precision> >
51 :
GenericMBase<Rows,Cols,Precision,RowStride,ColStride,
MatrixSlice<Rows, Cols, Precision> >(p, rows, cols, rowstride, colstride)
58 template<
int Rows,
int Cols,
bool D = (Rows == Dynamic || Cols == Dynamic)>
63 template<
int Rows,
int Cols>
66 static const int size = (Rows<Cols?Rows:Cols);
69 template<
int Rs,
int Cs,
bool D = (Rs == Dynamic || Cs == Dynamic)>
74 template<
int Rs,
int Cs>
81 template<
int Rows,
int Cols,
class Precision,
int RowStr
ide,
int ColStr
ide,
class Mem>
struct GenericMBase
149 return (*
this)(index.first, index.second);
152 const Precision&
operator[](
const std::pair<int, int>& index)
const {
155 return (*
this)(index.first, index.second);
174 template<
int Rstart,
int Cstart,
int Rlength,
int Clength>
188 template<
int Rstart,
int Cstart,
int Rlength,
int Clength>
203 template<
int Rstart,
int Cstart,
int Rlength,
int Clength>
209 return slice<Rstart, Cstart, Rlength, Clength>(Rstart, Cstart, Rlength, Clength);
212 template<
int Rstart,
int Cstart,
int Rlength,
int Clength>
217 return slice<Rstart, Cstart, Rlength, Clength>(Rstart, Cstart, Rlength, Clength);
221 return slice<Dynamic, Dynamic, Dynamic, Dynamic>(rs, cs, rl, cl);
225 return slice<Dynamic, Dynamic, Dynamic, Dynamic>(rs, cs, rl, cl);
260 template<
int Rows,
int Cols,
class Precision>
struct MLayout:
public Internal::GenericMBase<Rows, Cols, Precision, (Cols==-1?-2:Cols), 1, Internal::MatrixAlloc<Rows, Cols, Precision> >
267 :Internal::
GenericMBase<Rows, Cols, Precision, (Cols == -1 ? -2 : Cols), 1, Internal::
MatrixAlloc<Rows, Cols, Precision> >(rows, cols)
272 :Internal::
GenericMBase<Rows, Cols, Precision, (Cols == -1 ? -2 : Cols), 1, Internal::
MatrixAlloc<Rows, Cols, Precision> >(op)
280 template<
int Rows,
int Cols,
class Precision>
struct MLayout:
public Internal::GenericMBase<Rows, Cols, Precision, 1, (Rows==-1?-2:Rows), Internal::MatrixAlloc<Rows, Cols, Precision> >
287 :Internal::
GenericMBase<Rows, Cols, Precision, 1, (Rows == -1 ? -2 : Rows), Internal::
MatrixAlloc<Rows, Cols, Precision> >(rows, cols)
292 :Internal::
GenericMBase<Rows, Cols, Precision, 1, (Rows == -1 ? -2 : Rows), Internal::
MatrixAlloc<Rows, Cols, Precision> >(op)
MLayout(int rows, int cols)
const Matrix<-1,-1, const Precision, Slice< SliceRowStride, SliceColStride > > slice(int rs, int cs, int rl, int cl) const
Precision & operator[](const std::pair< int, int > &index)
Matrix< Cols, Rows, Precision, Slice< SliceColStride, SliceRowStride > > T()
Vector< Cols, const Precision, SliceVBase< SliceColStride > > CVec
Vector< Cols, Precision, SliceVBase< SliceColStride > > Vec
GenericMBase(Precision *p)
const Matrix< Rlength, Clength, const Precision, Slice< SliceRowStride, SliceColStride > > slice() const
Vector< DiagSize, Precision, SliceVBase< DiagStride > > diagonal_slice()
Everything lives inside this namespace.
Matrix< Rlength, Clength, Precision, Slice< SliceRowStride, SliceColStride > > slice()
static const int Dynamic
Template size value used to indicate dynamically sized vectors and matrices.
const Matrix< Rlength, Clength, const Precision, Slice< SliceRowStride, SliceColStride > > slice(int rs, int cs, int rl, int cl) const
GenericMBase(const Operator< Op > &op)
MLayout(Precision *p, int rows, int cols, int rowstride, int colstride)
static const int SliceColStride
GenericMBase(int r, int c)
const CVec operator[](int r) const
MLayout(int rows, int cols)
MLayout(const Operator< Op > &op)
Matrix< Rlength, Clength, Precision, Slice< SliceRowStride, SliceColStride > > slice(int rs, int cs, int rl, int cl)
MLayout(const Operator< Op > &op)
Vector< DiagSize, const Precision, SliceVBase< DiagStride > > diagonal_slice() const
Precision & operator()(int r, int c)
const Precision & operator()(int r, int c) const
static void check_index(int, int)
Matrix<-1,-1, Precision, Slice< SliceRowStride, SliceColStride > > slice(int rs, int cs, int rl, int cl)
GenericMBase(Precision *p, int r, int c, int rowstride, int colstride)
static const int SliceRowStride
const Precision & operator[](const std::pair< int, int > &index) const
const Matrix< Cols, Rows, const Precision, Slice< SliceColStride, SliceRowStride > > T() const