OpenWalnut
1.4.0
|
Abstract base class to all WValueSets. More...
#include <WValueSetBase.h>
Public Types | |
typedef boost::shared_ptr < WValueSetBase > | SPtr |
Shared pointer to an instance of this class. | |
typedef boost::shared_ptr < const WValueSetBase > | ConstSPtr |
Shared pointer to an const instance of this class. | |
Public Member Functions | |
WValueSetBase (size_t order, size_t dimension, dataType inDataType) | |
Despite this is an abstract class all subclasses should have an order and dimension. | |
virtual | ~WValueSetBase ()=0 |
Dummy since each class with virtual member functions needs one. | |
virtual size_t | size () const =0 |
virtual size_t | rawSize () const =0 |
virtual double | getScalarDouble (size_t i) const =0 |
virtual WValue< double > | getWValueDouble (size_t i) const =0 |
virtual size_t | dimension () const |
virtual size_t | order () const |
virtual size_t | elementsPerValue () const |
Returns the number of elements of type T per value. | |
virtual dataType | getDataType () const |
virtual double | getMinimumValue () const =0 |
This method returns the smallest value in the valueset. | |
virtual double | getMaximumValue () const =0 |
This method returns the largest value in the valueset. | |
template<typename Func_T > | |
Func_T::result_type | applyFunction (Func_T const &func) |
Apply a function object to this valueset. | |
Protected Attributes | |
const size_t | m_order |
The order of the tensors for this ValueSet. | |
const size_t | m_dimension |
The dimension of the tensors for this ValueSet. | |
const dataType | m_dataType |
The data type of the values' elements. | |
Private Member Functions | |
virtual WValueSetVariant const | getVariant () const |
Creates a boost::variant reference. |
Abstract base class to all WValueSets.
This class doesn't provide any genericness.
Definition at line 59 of file WValueSetBase.h.
typedef boost::shared_ptr< const WValueSetBase > WValueSetBase::ConstSPtr |
Shared pointer to an const instance of this class.
Definition at line 70 of file WValueSetBase.h.
typedef boost::shared_ptr< WValueSetBase > WValueSetBase::SPtr |
Shared pointer to an instance of this class.
Definition at line 65 of file WValueSetBase.h.
WValueSetBase::WValueSetBase | ( | size_t | order, |
size_t | dimension, | ||
dataType | inDataType | ||
) |
Despite this is an abstract class all subclasses should have an order and dimension.
order | the tensor order of the values stored in this WValueSet |
dimension | the tensor dimension of the values stored in this WValueSet |
inDataType | indication of the primitive data type used to store the values |
Definition at line 31 of file WValueSetBase.cpp.
WValueSetBase::~WValueSetBase | ( | ) | [pure virtual] |
Dummy since each class with virtual member functions needs one.
Definition at line 40 of file WValueSetBase.cpp.
Func_T::result_type WValueSetBase::applyFunction | ( | Func_T const & | func | ) | [inline] |
Apply a function object to this valueset.
Func_T | The type of the function object, should be derived from the boost::static_visitor template. |
func | The function object to apply. |
Definition at line 167 of file WValueSetBase.h.
References getVariant().
virtual size_t WValueSetBase::dimension | ( | ) | const [inline, virtual] |
Definition at line 111 of file WValueSetBase.h.
References m_dimension.
Referenced by WValueSet< T >::getRequiredRawSizePerVoxel(), and WValueSetBaseTest::testDimension().
virtual size_t WValueSetBase::elementsPerValue | ( | ) | const [inline, virtual] |
Returns the number of elements of type T per value.
Definition at line 129 of file WValueSetBase.h.
References m_dimension, and m_order.
virtual dataType WValueSetBase::getDataType | ( | ) | const [inline, virtual] |
Definition at line 137 of file WValueSetBase.h.
References m_dataType.
Referenced by WValueSetBaseTest::testDataType().
virtual double WValueSetBase::getMaximumValue | ( | ) | const [pure virtual] |
This method returns the largest value in the valueset.
It does not handle vectors, matrices and so on well. It simply returns the largest value in the data array. This is especially useful for texture scaling or other statistic tools (histograms).
Implemented in WValueSet< T >, and Dummy.
virtual double WValueSetBase::getMinimumValue | ( | ) | const [pure virtual] |
This method returns the smallest value in the valueset.
It does not handle vectors, matrices and so on well. It simply returns the smallest value in the data array. This is especially useful for texture scaling or other statistic tools (histograms).
Implemented in WValueSet< T >, and Dummy.
virtual double WValueSetBase::getScalarDouble | ( | size_t | i | ) | const [pure virtual] |
i | id of the scalar to retrieve |
Implemented in WValueSet< T >, and Dummy.
Referenced by WValueSetHistogram::buildHistogram().
virtual WValueSetVariant const WValueSetBase::getVariant | ( | ) | const [inline, private, virtual] |
Creates a boost::variant reference.
Reimplemented in WValueSet< T >.
Definition at line 194 of file WValueSetBase.h.
Referenced by applyFunction().
virtual WValue< double > WValueSetBase::getWValueDouble | ( | size_t | i | ) | const [pure virtual] |
i | id of the WValue to retrieve |
Implemented in WValueSet< T >, and Dummy.
virtual size_t WValueSetBase::order | ( | ) | const [inline, virtual] |
Definition at line 119 of file WValueSetBase.h.
References m_order.
virtual size_t WValueSetBase::rawSize | ( | ) | const [pure virtual] |
Implemented in WValueSet< T >, and Dummy.
virtual size_t WValueSetBase::size | ( | ) | const [pure virtual] |
Implemented in WValueSet< T >, and Dummy.
Referenced by WValueSetHistogram::buildHistogram().
const dataType WValueSetBase::m_dataType [protected] |
The data type of the values' elements.
Definition at line 186 of file WValueSetBase.h.
Referenced by getDataType().
const size_t WValueSetBase::m_dimension [protected] |
The dimension of the tensors for this ValueSet.
Definition at line 181 of file WValueSetBase.h.
Referenced by dimension(), elementsPerValue(), WValueSet< T >::getVector3D(), WValueSet< T >::getWValue(), and WValueSet< T >::size().
const size_t WValueSetBase::m_order [protected] |
The order of the tensors for this ValueSet.
Definition at line 176 of file WValueSetBase.h.
Referenced by elementsPerValue(), WValueSet< T >::getVector3D(), WValueSet< T >::getWValue(), order(), and WValueSet< T >::size().