Go to the documentation of this file.
28 using std::runtime_error;
102 const Range& c)
const
120 const Range& c)
const
138 const Range& c)
const
156 const Range& c)
const
216 const Range& c)
const
237 const Range& c)
const
279 const Range& c)
const
300 const Range& c)
const
321 const Range& c)
const
363 const Range& c)
const
456 const Range& c)
const
480 const Range& c)
const
576 const Range& c)
const
600 const Range& c)
const
732 const Range& c)
const
767 throw std::runtime_error(
"A Tensor5View can only be converted to a plain C-array if it's pointing to a continuous block of data");
785 throw std::runtime_error(
"A Tensor5View can only be converted to a plain C-array if it's pointing to a continuous block of data");
894 if ( is != end_shelf ) {
899 for ( ; is != end_shelf; ++is ) {
919 const Range& c)
const
945 const Range& c)
const
958 const Range& c)
const
971 const Range& c)
const
984 const Range& c)
const
1023 const Range& c)
const
1036 const Range& c)
const
1062 const Range& c)
const
1075 const Range& c)
const
1088 const Range& c)
const
1114 const Range& c)
const
1166 const Range& c)
const
1179 const Range& c)
const
1231 const Range& c)
const
1244 const Range& c)
const
1309 const Range& c)
const
2151 for ( ; s != es ; ++s, ++xs )
2169 for ( ; s != es ; ++s, ++xs )
2187 for ( ; s != es ; ++s, ++xs )
2205 for ( ; s != es ; ++s, ++xs )
2281 ConstTensor5View(data, ps, pb, pp, pr, pc,
ns, nb, np, nr, nc)
2294 for ( ; origin != end ; ++origin, ++target )
2307 for ( ; target != end ; ++target )
2333 Range( 0, s, b*p*r*c ),
2334 Range( 0, b, p*r*c ),
2345 Range( 0, s, b*p*r*c ),
2346 Range( 0, b, p*r*c ),
2362 Range( 0, m.nshelves(), m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
2363 Range( 0, m.nbooks(), m.npages()*m.nrows()*m.ncols() ),
2364 Range( 0, m.npages(), m.nrows()*m.ncols() ),
2365 Range( 0, m.nrows(), m.ncols() ),
2366 Range( 0, m.ncols() ) )
2375 Range( 0, m.nshelves(), m.nbooks()*m.npages()*m.nrows()*m.ncols() ),
2376 Range( 0, m.nbooks(), m.npages()*m.nrows()*m.ncols() ),
2377 Range( 0, m.npages(), m.nrows()*m.ncols() ),
2378 Range( 0, m.nrows(), m.ncols() ),
2379 Range( 0, m.ncols() ) )
2508 double (&my_func)(
double),
2521 for ( ; xi != xe; ++xi, ++yi )
2539 for ( ; xi != xe ; ++xi )
2544 if ( maxi > themax )
2561 for ( ; xi != xe ; ++xi )
2566 if ( mini < themin )
2596 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.
void swap(Tensor5 &t1, Tensor5 &t2)
Swaps two objects.
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.
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.
friend void swap(Tensor5 &t1, Tensor5 &t2)
Swaps two objects.
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.
std::ostream & operator<<(std::ostream &os, const ConstTensor5View &v)
Output operator.
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.
Tensor5 & operator=(Tensor5 x)
Assignment operator from another tensor.
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.
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.