Statismo  0.10.1
 All Classes Namespaces Functions Typedefs
Public Member Functions | List of all members
GenericRepresenterTest< Representer > Class Template Reference

#include <genericRepresenterTest.hxx>

Public Member Functions

 GenericRepresenterTest (const Representer *representer, DatasetConstPointerType testDataset, std::pair< PointType, ValueType > pointValuePair)
 
bool testSamplePointEvaluation () const
 
bool testDomainValid () const
 
bool testSampleToVectorAndBack () const
 test whether converting a sample to a vector and back to a sample yields the original sample
 
bool testPointSampleDimension () const
 test if the pointSamples have the correct dimensionality
 
bool testPointSampleToPointSampleVectorAndBack () const
 
bool testSampleVectorHasCorrectValueAtPoint () const
 
bool testSaveLoad () const
 test whether the representer is correctly restored
 
bool testClone () const
 test whether cloning a representer results in a representer with the same behaviour
 
bool testSampleVectorDimensions () const
 test if the sample vector dimensions are correct
 
bool testGetName () const
 test whether the name is defined
 
bool testDimensions () const
 test if the dimensionality is nonnegative
 
bool runAllTests ()
 run all the tests
 

Detailed Description

template<typename Representer>
class GenericRepresenterTest< Representer >

This class provides generic tests for representer. The tests need to hold for all representers.

Constructor & Destructor Documentation

template<typename Representer >
GenericRepresenterTest< Representer >::GenericRepresenterTest ( const Representer *  representer,
DatasetConstPointerType  testDataset,
std::pair< PointType, ValueType >  pointValuePair 
)
inline

Create new test with the given representer. Tests are performed using the given testDataset and the pointValuePair. It is assumed that the PointValuePair is taken from the testDataset (otherwise some tests will fail).

Member Function Documentation

template<typename Representer >
bool GenericRepresenterTest< Representer >::testPointSampleToPointSampleVectorAndBack ( ) const
inline

tests if the conversion from a pointSample and the pointSampleVector, and back to a pointSample yields the original sample.

template<typename Representer >
bool GenericRepresenterTest< Representer >::testSampleVectorHasCorrectValueAtPoint ( ) const
inline

test if the testSample contains the same entries in the vector as those obtained by taking the pointSample at the corresponding position.


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