Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
numeric::MathNTensorBase< T > Class Template Referenceabstract

#include <MathNTensorBase.hh>

Inheritance diagram for numeric::MathNTensorBase< T >:
Inheritance graph
[legend]

Public Types

typedef numeric::Size Size
 

Public Member Functions

 MathNTensorBase ()
 Default constructor. More...
 
virtual ~MathNTensorBase ()
 Virtual destructor needed for polymorphism. More...
 
virtual MathNTensorBaseOP< Tclone () 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...
 

Member Typedef Documentation

Constructor & Destructor Documentation

template<class T>
numeric::MathNTensorBase< T >::MathNTensorBase ( )
inline

Default constructor.

template<class T>
virtual numeric::MathNTensorBase< T >::~MathNTensorBase ( )
inlinevirtual

Virtual destructor needed for polymorphism.

template<class T>
numeric::MathNTensorBase< T >::MathNTensorBase ( Size const  dimensionality_in)
inline

Costructor with dimensionality value.

Member Function Documentation

template<class T>
virtual MathNTensorBaseOP< T > numeric::MathNTensorBase< T >::clone ( ) const
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 >, numeric::MathNTensor< double, 1 >, numeric::MathNTensor< double, N >, and numeric::MathNTensor< double, 2 >.

template<class T>
Size numeric::MathNTensorBase< T >::dimensionality ( ) const
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.

template<class T>
virtual bool numeric::MathNTensorBase< T >::is_valid_position ( utility::vector1< Size > const &  position) const
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 >, numeric::MathNTensor< double, 1 >, numeric::MathNTensor< double, N >, and numeric::MathNTensor< double, 2 >.

template<class T>
virtual T numeric::MathNTensorBase< T >::max ( ) const
pure virtual

Get the maximum value stored in this tensor.

pure virtual. Must be implemented by derived classes.

Implemented in numeric::MathNTensor< T, N >, numeric::MathNTensor< double, 1 >, numeric::MathNTensor< double, N >, and numeric::MathNTensor< double, 2 >.

template<class T>
virtual T numeric::MathNTensorBase< T >::min ( ) const
pure virtual

Get the minimum value stored in this tensor.

pure virtual. Must be implemented by derived classes.

Implemented in numeric::MathNTensor< T, N >, numeric::MathNTensor< double, 1 >, numeric::MathNTensor< double, N >, and numeric::MathNTensor< double, 2 >.

template<class T>
virtual Size numeric::MathNTensorBase< T >::n_bins ( Size const  dimension) const
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 >, numeric::MathNTensor< double, 1 >, numeric::MathNTensor< double, N >, and numeric::MathNTensor< double, 2 >.

template<class T>
void numeric::MathNTensorBase< T >::set_dimensionality ( Size const  dimensionality_in)
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.

Referenced by numeric::MathNTensor< double, 2 >::operator=().

template<class T>
virtual void numeric::MathNTensorBase< T >::set_value ( utility::vector1< Size > const &  position,
T const &  value_in 
)
pure virtual

Set a value in a tensor.

Note that bounds-checking only occurs in debug builds!

Note
Pure virtual. Must be implemented by derived classes.

Implemented in numeric::MathNTensor< T, N >, numeric::MathNTensor< double, 1 >, numeric::MathNTensor< double, N >, and numeric::MathNTensor< double, 2 >.

template<class T>
virtual T const& numeric::MathNTensorBase< T >::value ( utility::vector1< Size > const &  position) const
pure virtual

Get a value from a tensor.

Note that bounds-checking only occurs in debug builds!

Note
Pure virtual. Must be implemented by derived classes.

Implemented in numeric::MathNTensor< T, N >, numeric::MathNTensor< double, 1 >, numeric::MathNTensor< double, N >, and numeric::MathNTensor< double, 2 >.

Member Data Documentation

template<class T>
Size numeric::MathNTensorBase< T >::dimensionality_ = 0
private

The documentation for this class was generated from the following files: