Rosetta
|
#include <MathNTensorBase.hh>
Public Types | |
typedef numeric::Size | Size |
Public Member Functions | |
MathNTensorBase () | |
Default constructor. More... | |
virtual | ~MathNTensorBase () |
Virtual destructor needed for polymorphism. More... | |
virtual MathNTensorBaseOP< T > | clone () const =0 |
Pure virtual clone function. More... | |
MathNTensorBase (Size const dimensionality_in) | |
Costructor with dimensionality value. More... | |
Size | dimensionality () const |
Get the dimensionality of derived classes. More... | |
virtual bool | is_valid_position (utility::vector1< Size > const &position) const =0 |
Is the given coordinate a valid position in the tensor? More... | |
virtual void | set_value (utility::vector1< Size > const &position, T const &value_in)=0 |
Set a value in a tensor. More... | |
virtual T const & | value (utility::vector1< Size > const &position) const =0 |
Get a value from a tensor. More... | |
virtual Size | n_bins (Size const dimension) const =0 |
Get the number of bins for the nth dimension. More... | |
virtual T | min () const =0 |
Get the minimum value stored in this tensor. More... | |
virtual T | max () const =0 |
Get the maximum value stored in this tensor. More... | |
Protected Member Functions | |
void | set_dimensionality (Size const dimensionality_in) |
Lets the derived class set the dimensionality stored in the base class. More... | |
Private Attributes | |
Size | dimensionality_ = 0 |
The dimensionality of the MathNTensor/. More... | |
typedef numeric::Size numeric::MathNTensorBase< T >::Size |
|
inline |
Default constructor.
|
inlinevirtual |
Virtual destructor needed for polymorphism.
|
inline |
Costructor with dimensionality value.
|
pure virtual |
Pure virtual clone function.
Creates a copy of this object and returns an owning pointer to the copy. Must be implemented by derived classes.
Implemented in numeric::MathNTensor< T, N >.
Referenced by numeric::deep_copy().
|
inline |
Get the dimensionality of derived classes.
Will need to store this in order to cast pointers to the appropriate type for the derived class.
References numeric::MathNTensorBase< T >::dimensionality_.
|
pure virtual |
Is the given coordinate a valid position in the tensor?
Returns false if out of range. Pure virtual; must be implemented by derived classes.
Implemented in numeric::MathNTensor< T, N >.
|
pure virtual |
Get the maximum value stored in this tensor.
pure virtual. Must be implemented by derived classes.
Implemented in numeric::MathNTensor< T, N >.
|
pure virtual |
Get the minimum value stored in this tensor.
pure virtual. Must be implemented by derived classes.
Implemented in numeric::MathNTensor< T, N >.
|
pure virtual |
Get the number of bins for the nth dimension.
Pure virtual. Must be implemented by derived classes.
Implemented in numeric::MathNTensor< T, N >.
|
inlineprotected |
Lets the derived class set the dimensionality stored in the base class.
Will need to store this in order to cast pointers to the appropriate type for the derived class.
References numeric::MathNTensorBase< T >::dimensionality_.
Referenced by numeric::MathNTensor< T, N >::operator=().
|
pure virtual |
Set a value in a tensor.
Note that bounds-checking only occurs in debug builds!
Implemented in numeric::MathNTensor< T, N >.
|
pure virtual |
Get a value from a tensor.
Note that bounds-checking only occurs in debug builds!
Implemented in numeric::MathNTensor< T, N >.
|
private |
The dimensionality of the MathNTensor/.
Referenced by numeric::MathNTensorBase< T >::dimensionality(), and numeric::MathNTensorBase< T >::set_dimensionality().