168 assert( p<mpr.mextent );
169 assert( r<mrr.mextent );
170 assert( c<mcr.mextent );
179 mpr.mstart + p*mpr.mstride +
180 mrr.mstart + r*mrr.mstride +
181 mcr.mstart + c*mcr.mstride );
274 assert( p<mpr.mextent );
275 assert( r<mrr.mextent );
276 assert( c<mcr.mextent );
285 mpr.mstart + p*mpr.mstride +
286 mrr.mstart + r*mrr.mstride +
287 mcr.mstart + c*mcr.mstride );
291 const Numeric *get_c_array()
const;
384 double (&my_func)(
double),
405 #endif // matpackIII_h INDEX Index
The type to use for all integer numbers and indices.
const ConstMatrixView * operator->() const
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
void swap(Vector &v1, Vector &v2)
Swaps two objects.
ConstMatrixView msv
Current position.
Numeric & operator()(Index p, Index r, Index c)
Plain non-const index operator.
Const version of Iterator4D.
A constant view of a Tensor7.
Index mstart
The start index.
MatrixView & operator*()
Dereferencing.
Numeric * mdata
Pointer to the plain C array that holds the data.
Range mcr
The column range of mdata that is actually used.
Implementation of Tensors of Rank 4.
A constant view of a Tensor6.
Numeric min(const ConstTensor3View &x)
Min function, tensor version.
Numeric debug_tensor3view_get_elem(Tensor3View &tv, Index p, Index r, Index c)
Helper function to access tensor elements.
MatrixView * operator->()
The -> operator is needed, so that we can write i->begin() to get the 1D iterators.
Numeric max(const ConstTensor3View &x)
Max function, tensor version.
Range mpr
The page range of mdata that is actually used.
Numeric operator()(Index p, Index r, Index c) const
Plain const index operator.
Index nrows() const
Returns the number of rows.
A constant view of a Tensor4.
void copy(ConstIterator3D origin, const ConstIterator3D &end, Iterator3D target)
Copy data between begin and end to target.
Iterator3D & operator++()
Prefix increment operator.
Iterator3D()
Default constructor.
Range mrr
The row range of mdata that is actually used.
Index ncols() const
Returns the number of columns.
MatrixView msv
Current position.
virtual ~ConstTensor3View()
Destructor.
bool operator!=(const ConstIterator3D &other) const
Not equal operator, needed for algorithms like copy.
void transform(Tensor3View y, double(&my_func)(double), ConstTensor3View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...
A constant view of a Tensor5.
const ConstMatrixView & operator*() const
Dereferencing.
NUMERIC Numeric
The type to use for all floating point numbers.
Range mcr
The column range of mdata that is actually used.
Index npages() const
Returns the number of pages.
std::ostream & operator<<(std::ostream &os, const ConstTensor3View &v)
Output operator.
bool operator!=(const Iterator3D &other) const
Not equal operator, needed for algorithms like copy.
A constant view of a Tensor3.
A constant view of a Vector.
ConstIterator3D(const ConstMatrixView &x, Index stride)
Explicit constructor.
void mult(Tensor3View A, const ConstVectorView B, const ConstMatrixView C)
mult Tensor3
ConstTensor3View operator()(const Range &p, const Range &r, const Range &c) const
Const index operator for subrange.
Iterator3D(const MatrixView &x, Index stride)
Explicit constructor.
Numeric * mdata
Pointer to the plain C array that holds the data.
A constant view of a Matrix.
Implementation of Tensors of Rank 3.
Numeric operator()(Index p, Index r, Index c) const
Plain const index operator.
Range mrr
The row range of mdata that is actually used.
virtual ~Tensor3View()
Destructor.
ConstIterator3D & operator++()
Prefix increment operator.
Const version of Iterator3D.
Numeric get(Index p, Index r, Index c) const
Get element implementation without assertions.
ConstIterator3D()
Default constructor.