OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | List of all members
WValueSetBase Class Referenceabstract

Abstract base class to all WValueSets. More...

#include <WValueSetBase.h>

+ Inheritance diagram for WValueSetBase:
+ Collaboration diagram for WValueSetBase:

Public Types

typedef std::shared_ptr< WValueSetBaseSPtr
 Shared pointer to an instance of this class. More...
 
typedef std::shared_ptr< const WValueSetBaseConstSPtr
 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...
 

Detailed Description

Abstract base class to all WValueSets.

This class doesn't provide any genericness.

Definition at line 59 of file WValueSetBase.h.

Member Typedef Documentation

◆ ConstSPtr

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.

◆ SPtr

typedef std::shared_ptr< WValueSetBase > WValueSetBase::SPtr

Shared pointer to an instance of this class.

Definition at line 65 of file WValueSetBase.h.

Constructor & Destructor Documentation

◆ WValueSetBase()

WValueSetBase::WValueSetBase ( size_t  order,
size_t  dimension,
dataType  inDataType 
)

Despite this is an abstract class all subclasses should have an order and dimension.

Parameters
orderthe tensor order of the values stored in this WValueSet
dimensionthe tensor dimension of the values stored in this WValueSet
inDataTypeindication of the primitive data type used to store the values

Definition at line 31 of file WValueSetBase.cpp.

References dimension(), and order().

+ Here is the call graph for this function:

◆ ~WValueSetBase()

WValueSetBase::~WValueSetBase ( )
pure virtual

Dummy since each class with virtual member functions needs one.

Definition at line 40 of file WValueSetBase.cpp.

Member Function Documentation

◆ applyFunction()

template<typename Func_T >
Func_T::result_type WValueSetBase::applyFunction ( Func_T const &  func)
inline

Apply a function object to this valueset.

Template Parameters
Func_TThe type of the function object, should be derived from the boost::static_visitor template.
Parameters
funcThe function object to apply.
Returns
The result of the operation.

Definition at line 167 of file WValueSetBase.h.

References getVariant().

Referenced by VisitorVSetA::operator()().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dimension()

virtual size_t WValueSetBase::dimension ( ) const
inlinevirtual
Returns
Dimension of the values in this ValueSet

Definition at line 111 of file WValueSetBase.h.

References m_dimension.

Referenced by WValueSet< T >::getRequiredRawSizePerVoxel(), VisitorVSetB< VSetAType >::operator()(), WValueSetBaseTest::testDimension(), and WValueSetBase().

+ Here is the caller graph for this function:

◆ elementsPerValue()

virtual size_t WValueSetBase::elementsPerValue ( ) const
inlinevirtual

Returns the number of elements of type T per value.

Note
this is dimension to the power of order.
Returns
number of elements per value

Definition at line 129 of file WValueSetBase.h.

References m_dimension, and m_order.

◆ getDataType()

virtual dataType WValueSetBase::getDataType ( ) const
inlinevirtual
Returns
Dimension of the values in this ValueSet

Definition at line 137 of file WValueSetBase.h.

References m_dataType.

Referenced by WValueSetBaseTest::testDataType().

+ Here is the caller graph for this function:

◆ getMaximumValue()

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).

Returns
the largest value in the data.

Implemented in WValueSet< T >, WValueSet< VSetAType >, and Dummy.

◆ getMinimumValue()

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).

Returns
the smallest value in the data.

Implemented in WValueSet< T >, WValueSet< VSetAType >, and Dummy.

◆ getScalarDouble()

virtual double WValueSetBase::getScalarDouble ( size_t  i) const
pure virtual
Parameters
iid of the scalar to retrieve
Returns
The i-th scalar stored in this value set. There are rawSize() such scalars.

Implemented in Dummy, WValueSet< T >, and WValueSet< VSetAType >.

Referenced by WValueSetHistogram::buildHistogram().

+ Here is the caller graph for this function:

◆ getVariant()

virtual WValueSetVariant const WValueSetBase::getVariant ( ) const
inlineprivatevirtual

Creates a boost::variant reference.

Returns
var A pointer to a variant reference to the valueset.

Reimplemented in WValueSet< T >, and WValueSet< VSetAType >.

Definition at line 194 of file WValueSetBase.h.

Referenced by applyFunction().

+ Here is the caller graph for this function:

◆ getWValueDouble()

virtual WValue< double > WValueSetBase::getWValueDouble ( size_t  i) const
pure virtual
Parameters
iid of the WValue to retrieve
Returns
The i-th WValue stored in this value set. There are size() such scalars.

Implemented in Dummy, WValueSet< T >, and WValueSet< VSetAType >.

◆ order()

virtual size_t WValueSetBase::order ( ) const
inlinevirtual
Returns
Order of the values in this ValueSet

Definition at line 119 of file WValueSetBase.h.

References m_order.

Referenced by VisitorVSetB< VSetAType >::operator()(), and WValueSetBase().

+ Here is the caller graph for this function:

◆ rawSize()

virtual size_t WValueSetBase::rawSize ( ) const
pure virtual
Returns
The number of integrals (POD like int, double) in this ValueSet.

Implemented in WValueSet< T >, WValueSet< VSetAType >, and Dummy.

◆ size()

virtual size_t WValueSetBase::size ( ) const
pure virtual
Returns
The number of tensors in this ValueSet.

Implemented in WValueSet< T >, WValueSet< VSetAType >, and Dummy.

Referenced by WValueSetHistogram::buildHistogram().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_dataType

const dataType WValueSetBase::m_dataType
protected

The data type of the values' elements.

Definition at line 186 of file WValueSetBase.h.

Referenced by getDataType().

◆ m_dimension

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().

◆ m_order

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().


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