28 using std::runtime_error;
233 for ( ; ip!=end_page; ++ip )
252 const Range& c)
const 274 const Range& c)
const 285 const Range& c)
const 296 const Range& c)
const 444 throw std::runtime_error(
"A Tensor3View can only be converted to a plain C-array if it's pointing to a continuous block of data");
460 throw std::runtime_error(
"A Tensor3View can only be converted to a plain C-array if it's pointing to a continuous block of data");
611 for ( ; p!=ep ; ++p,++xp )
627 for ( ; p!=ep ; ++p,++xp )
643 for ( ; p!=ep ; ++p,++xp )
659 for ( ; p!=ep ; ++p,++xp )
732 for ( ; origin!=
end ; ++origin,++target )
747 for ( ; target!=
end ; ++target )
926 double (&my_func)(
double),
937 for ( ; xi!=xe; ++xi, ++yi )
955 for ( ; xi!=xe ; ++xi )
977 for ( ; xi!=xe ; ++xi )
INDEX Index
The type to use for all integer numbers and indices.
void swap(Tensor3 &t1, Tensor3 &t2)
Swaps two objects.
Index mstart
The start index.
ConstIterator2D begin() const
Return const iterator to first row.
Range mcr
The column range of mdata that is actually used.
ConstIterator2D end() const
Return const iterator behind last row.
void copy(ConstIterator3D origin, const ConstIterator3D &end, Iterator3D target)
Copy data between begin and end to target.
Range mpr
The page range of mdata that is actually used.
Numeric max(const ConstTensor3View &x)
Max function, tensor version.
Index nrows() const
Returns the number of rows.
Tensor3View & operator-=(Numeric x)
Subtraction of scalar.
ConstTensor3View operator()(const Range &p, const Range &r, const Range &c) const
Const index operator for subrange.
Index nelem() const
Returns the number of elements.
virtual ~Tensor3()
Destructor for Tensor3.
ConstIterator2D begin() const
Return const iterator to first row.
Index ncols() const
Returns the number of columns.
ConstIterator3D end() const
Return const iterator behind last page.
Tensor3View & operator/=(Numeric x)
Division by scalar.
Tensor3()
Default constructor.
ConstTensor3View()
Default constructor.
Index ncols() const
Returns the number of columns.
Tensor3View & operator*=(Numeric x)
Multiplication by scalar.
The declarations of all the exception classes.
ConstIterator2D end() const
Return const iterator behind last row.
Numeric debug_tensor3view_get_elem(Tensor3View &tv, Index p, Index r, Index c)
Helper function to access tensor elements.
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...
friend void swap(Tensor3 &t1, Tensor3 &t2)
Swaps two objects.
NUMERIC Numeric
The type to use for all floating point numbers.
Index mextent
The number of elements.
void resize(Index p, Index r, Index c)
Resize function.
Numeric min(const ConstTensor3View &x)
Min function, tensor version.
Index npages() const
Returns the number of pages.
ConstIterator3D begin() const
Return const iterator to first page.
A constant view of a Tensor3.
A constant view of a Vector.
Tensor3View & operator+=(Numeric x)
Addition of scalar.
ConstTensor3View operator()(const Range &p, const Range &r, const Range &c) const
Const index operator for subrange.
Numeric * mdata
Pointer to the plain C array that holds the data.
A constant view of a Matrix.
ConstIterator3D begin() const
Return const iterator to first row.
Implementation of Tensors of Rank 3.
Tensor3View & operator=(const ConstTensor3View &v)
Assignment operator.
Range mrr
The row range of mdata that is actually used.
Tensor3View()
Default constructor.
const Numeric * get_c_array() const
Conversion to plain C-array.
std::ostream & operator<<(std::ostream &os, const ConstTensor3View &v)
Output operator.
Const version of Iterator3D.
Tensor3 & operator=(Tensor3 x)
Assignment operator from another tensor.
Index nrows() const
Returns the number of rows.
ConstIterator3D end() const
Return const iterator behind last row.
void mult(Tensor3View A, const ConstVectorView B, const ConstMatrixView C)
mult Tensor3
Numeric add(Numeric x, Numeric y)