OpenWalnut
1.5.0dev
|
Abstract base class to all WValueSets. More...
#include <WValueSetBase.h>
Public Types | |
typedef std::shared_ptr< WValueSetBase > | SPtr |
Shared pointer to an instance of this class. More... | |
typedef std::shared_ptr< const WValueSetBase > | ConstSPtr |
Shared pointer to an const instance of this class. More... | |
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. More... | |
virtual | ~WValueSetBase ()=0 |
Dummy since each class with virtual member functions needs one. More... | |
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. More... | |
virtual dataType | getDataType () const |
virtual double | getMinimumValue () const =0 |
This method returns the smallest value in the valueset. More... | |
virtual double | getMaximumValue () const =0 |
This method returns the largest value in the valueset. More... | |
template<typename Func_T > | |
Func_T::result_type | applyFunction (Func_T const &func) |
Apply a function object to this valueset. More... | |
Protected Attributes | |
const size_t | m_order |
The order of the tensors for this ValueSet. More... | |
const size_t | m_dimension |
The dimension of the tensors for this ValueSet. More... | |
const dataType | m_dataType |
The data type of the values' elements. More... | |
Private Member Functions | |
virtual WValueSetVariant const | getVariant () const |
Creates a boost::variant reference. More... | |
Abstract base class to all WValueSets.
This class doesn't provide any genericness.
Definition at line 59 of file WValueSetBase.h.
typedef std::shared_ptr< const WValueSetBase > WValueSetBase::ConstSPtr |
Shared pointer to an const instance of this class.
Definition at line 70 of file WValueSetBase.h.
typedef std::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.
References dimension(), and order().
|
pure virtual |
Dummy since each class with virtual member functions needs one.
Definition at line 40 of file WValueSetBase.cpp.
|
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().
Referenced by VisitorVSetA::operator()().
|
inlinevirtual |
Definition at line 111 of file WValueSetBase.h.
References m_dimension.
Referenced by WValueSet< T >::getRequiredRawSizePerVoxel(), VisitorVSetB< VSetAType >::operator()(), WValueSetBaseTest::testDimension(), and WValueSetBase().
|
inlinevirtual |
Returns the number of elements of type T per value.
Definition at line 129 of file WValueSetBase.h.
References m_dimension, and m_order.
|
inlinevirtual |
Definition at line 137 of file WValueSetBase.h.
References m_dataType.
Referenced by WValueSetBaseTest::testDataType().
|
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 >, WValueSet< VSetAType >, and Dummy.
|
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 >, WValueSet< VSetAType >, and Dummy.
|
pure virtual |
i | id of the scalar to retrieve |
Implemented in Dummy, WValueSet< T >, and WValueSet< VSetAType >.
Referenced by WValueSetHistogram::buildHistogram().
|
inlineprivatevirtual |
Creates a boost::variant reference.
Reimplemented in WValueSet< T >, and WValueSet< VSetAType >.
Definition at line 194 of file WValueSetBase.h.
Referenced by applyFunction().
|
pure virtual |
i | id of the WValue to retrieve |
Implemented in Dummy, WValueSet< T >, and WValueSet< VSetAType >.
|
inlinevirtual |
Definition at line 119 of file WValueSetBase.h.
References m_order.
Referenced by VisitorVSetB< VSetAType >::operator()(), and WValueSetBase().
|
pure virtual |
Implemented in WValueSet< T >, WValueSet< VSetAType >, and Dummy.
|
pure virtual |
Implemented in WValueSet< T >, WValueSet< VSetAType >, and Dummy.
Referenced by WValueSetHistogram::buildHistogram().
|
protected |
The data type of the values' elements.
Definition at line 186 of file WValueSetBase.h.
Referenced by getDataType().
|
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().
|
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().