Go to the documentation of this file.
117 const Range& c)
const
135 const Range& c)
const
153 const Range& c)
const
213 const Range& c)
const
234 const Range& c)
const
276 const Range& c)
const
297 const Range& c)
const
318 const Range& c)
const
360 const Range& c)
const
453 const Range& c)
const
477 const Range& c)
const
573 const Range& c)
const
597 const Range& c)
const
729 const Range& c)
const
764 throw runtime_error(
"A Tensor5View can only be converted to a plain C-array if mbr.mstart == 0 and mbr.mstride == mrp.extent*mrr.extent*mcr.extent and mpr.mstart == 0 and mpr.mstride == mrr.extent*mcr.extent and mrr.mstart == 0 and mrr.mstride == mcr.extent and mcr.mstart == 0 and mcr.mstride == 1");
782 throw runtime_error(
"A Tensor5View can only be converted to a plain C-array if mbr.mstart == 0 and mbr.mstride == mrp.extent*mrr.extent*mcr.extent and mpr.mstart == 0 and mpr.mstride == mrr.extent*mcr.extent and mrr.mstart == 0 and mrr.mstride == mcr.extent and mcr.mstart == 0 and mcr.mstride == 1");
891 if ( is != end_shelf ) {
896 for ( ; is != end_shelf; ++is ) {
916 const Range& c)
const
942 const Range& c)
const
955 const Range& c)
const
968 const Range& c)
const
981 const Range& c)
const
1020 const Range& c)
const
1033 const Range& c)
const
1059 const Range& c)
const
1072 const Range& c)
const
1085 const Range& c)
const
1111 const Range& c)
const
1163 const Range& c)
const
1176 const Range& c)
const
1228 const Range& c)
const
1241 const Range& c)
const
1306 const Range& c)
const
2148 for ( ; s != es ; ++s, ++xs )
2166 for ( ; s != es ; ++s, ++xs )
2184 for ( ; s != es ; ++s, ++xs )
2202 for ( ; s != es ; ++s, ++xs )
2278 ConstTensor5View(data, ps, pb, pp, pr, pc,
ns, nb, np, nr, nc)
2291 for ( ; origin != end ; ++origin, ++target )
2304 for ( ; target != end ; ++target )
2330 Range( 0, s, b*p*r*c ),
2331 Range( 0, b, p*r*c ),
2342 Range( 0, s, b*p*r*c ),
2343 Range( 0, b, p*r*c ),
2359 Range( 0, m.nshelves(), m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
2360 Range( 0, m.nbooks(), m.npages()*m.nrows()*m.ncols() ),
2361 Range( 0, m.npages(), m.nrows()*m.ncols() ),
2362 Range( 0, m.nrows(), m.ncols() ),
2363 Range( 0, m.ncols() ) )
2372 Range( 0, m.nshelves(), m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
2373 Range( 0, m.nbooks(), m.npages()*m.nrows()*m.ncols() ),
2374 Range( 0, m.npages(), m.nrows()*m.ncols() ),
2375 Range( 0, m.nrows(), m.ncols() ),
2376 Range( 0, m.ncols() ) )
2500 double (&my_func)(
double),
2513 for ( ; xi != xe; ++xi, ++yi )
2531 for ( ; xi != xe ; ++xi )
2536 if ( maxi > themax )
2553 for ( ; xi != xe ; ++xi )
2558 if ( mini < themin )
2588 return tv(s, b, p, r, c);
Index nbooks() const
Returns the number of books.
The declarations of all the exception classes.
ConstIterator4D end() const
Return const iterator behind last book.
Tensor5View & operator+=(Numeric x)
Addition of scalar.
Tensor5()
Default constructor.
Tensor5View & operator-=(Numeric x)
Subtraction of scalar.
Index ncols() const
Returns the number of columns.
Range mbr
The book range of mdata that is actually used.
ConstTensor5View operator()(const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
Const index operator for subrange.
Tensor5 & operator=(const Tensor5 &x)
Assignment operator from another tensor.
Index mstart
The start index.
Range msr
The shelf range of mdata that is actually used.
Implementation of Tensors of Rank 5.
Index npages() const
Returns the number of pages.
ConstIterator5D begin() const
Return const iterator to first shelf.
A constant view of a Tensor4.
ConstTensor5View operator()(const Range &s, const Range &b, const Range &p, const Range &r, const Range &c) const
Const index operator for subrange.
Tensor5View & operator/=(Numeric x)
Division by scalar.
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
void transform(Tensor5View y, double(&my_func)(double), ConstTensor5View x)
A generic transform function for tensors, which can be used to implement mathematical functions opera...
const Numeric * get_c_array() const
Conversion to plain C-array.
virtual ~Tensor5()
Destructor for Tensor5.
Range mrr
The row range of mdata that is actually used.
ConstIterator5D begin() const
Return const iterator to first shelf.
ConstIterator4D begin() const
Return const iterator to first book.
NUMERIC Numeric
The type to use for all floating point numbers.
ConstIterator5D end() const
Return const iterator behind last shelf.
ConstIterator4D end() const
Return const iterator behind last book.
ConstTensor5View()
Default constructor.
void copy(ConstIterator5D origin, const ConstIterator5D &end, Iterator5D target)
Copy data between begin and end to target.
Range mcr
The column range of mdata that is actually used.
Numeric max(const ConstTensor5View &x)
Max function, tensor version.
A constant view of a Matrix.
ConstIterator4D begin() const
Return const iterator to first book.
Tensor5View()
Default constructor.
Numeric debug_tensor5view_get_elem(Tensor5View &tv, Index s, Index b, Index p, Index r, Index c)
Helper function to access tensor elements.
Index mextent
The number of elements.
Index nrows() const
Returns the number of rows.
Tensor5View & operator=(const ConstTensor5View &v)
Assignment operator.
Range mpr
The page range of mdata that is actually used.
Index nshelves() const
Returns the number of shelves.
A constant view of a Tensor3.
Numeric * mdata
Pointer to the plain C array that holds the data.
ostream & operator<<(ostream &os, const ConstTensor5View &v)
Output operator.
Numeric min(const ConstTensor5View &x)
Min function, tensor version.
INDEX Index
The type to use for all integer numbers and indices.
Const version of Iterator5D.
A constant view of a Vector.
ConstIterator5D end() const
Return const iterator behind last shelf.
Tensor5View & operator*=(Numeric x)
Multiplication by scalar.
A constant view of a Tensor5.