Fallback implementation of member functions of OpenGM functions. More...
#include <function_properties_base.hxx>
Public Types | |
typedef AccessorIterator < FunctionShapeAccessorType, true > | FunctionShapeIteratorType |
Public Member Functions | |
bool | isPotts () const |
bool | isGeneralizedPotts () const |
bool | isSubmodular () const |
bool | isSquaredDifference () const |
bool | isTruncatedSquaredDifference () const |
bool | isAbsoluteDifference () const |
bool | isTruncatedAbsoluteDifference () const |
MinMaxFunctor< VALUE > | minMax () const |
find minimum and maximum of the function in a single sweep | |
ReturnType | min () const |
ReturnType | max () const |
ReturnType | sum () const |
ReturnType | product () const |
template<class ACC > | |
ReturnType | accumulate () const |
accumulate all values of the function | |
template<class FUNCTOR > | |
void | forAllValuesInOrder (FUNCTOR &functor) const |
call a functor for each value of the function (in lexicographical order of the variable indices) | |
template<class FUNCTOR > | |
void | forAllValuesInSwitchedOrder (FUNCTOR &functor) const |
template<class FUNCTOR > | |
void | forAllValuesInAnyOrder (FUNCTOR &functor) const |
call a functor for each value of the function (in un-specified order) | |
template<class FUNCTOR > | |
void | forAtLeastAllUniqueValues (FUNCTOR &functor) const |
call a functor for at least all unique values of the function | |
template<class COORDINATE_FUNCTOR > | |
void | forAllValuesInOrderWithCoordinate (COORDINATE_FUNCTOR &functor) const |
template<class COORDINATE_FUNCTOR > | |
void | forAllValuesInAnyOrderWithCoordinate (COORDINATE_FUNCTOR &functor) const |
template<class COORDINATE_FUNCTOR > | |
void | forAtLeastAllUniqueValuesWithCoordinate (COORDINATE_FUNCTOR &functor) const |
bool | operator== (const FUNCTION &) const |
FunctionShapeIteratorType | functionShapeBegin () const |
FunctionShapeIteratorType | functionShapeEnd () const |
Fallback implementation of member functions of OpenGM functions.
Definition at line 43 of file function_properties_base.hxx.
typedef AccessorIterator<FunctionShapeAccessorType, true> opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::FunctionShapeIteratorType |
Definition at line 123 of file function_properties_base.hxx.
FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::ReturnType opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::accumulate | ( | ) | const [inline] |
accumulate all values of the function
Definition at line 556 of file function_properties_base.hxx.
void opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::forAllValuesInAnyOrder | ( | FUNCTOR & | functor | ) | const [inline] |
call a functor for each value of the function (in un-specified order)
Definition at line 229 of file function_properties_base.hxx.
void opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::forAllValuesInAnyOrderWithCoordinate | ( | COORDINATE_FUNCTOR & | functor | ) | const [inline] |
Definition at line 180 of file function_properties_base.hxx.
void opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::forAllValuesInOrder | ( | FUNCTOR & | functor | ) | const [inline] |
call a functor for each value of the function (in lexicographical order of the variable indices)
Example:
template<class T> struct MaxFunctor { void operator()(const T v) { if(v > max_) max_ = v; } T max_; }; MaxFunctor<float> maxFunctor; maxFunctor.max_ = 0.0; function.forAllValuesInOrder(maxFunctor);
Definition at line 201 of file function_properties_base.hxx.
void opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::forAllValuesInOrderWithCoordinate | ( | COORDINATE_FUNCTOR & | functor | ) | const [inline] |
Definition at line 166 of file function_properties_base.hxx.
void opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::forAllValuesInSwitchedOrder | ( | FUNCTOR & | functor | ) | const [inline] |
Definition at line 215 of file function_properties_base.hxx.
void opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::forAtLeastAllUniqueValues | ( | FUNCTOR & | functor | ) | const [inline] |
call a functor for at least all unique values of the function
Definition at line 239 of file function_properties_base.hxx.
void opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::forAtLeastAllUniqueValuesWithCoordinate | ( | COORDINATE_FUNCTOR & | functor | ) | const [inline] |
Definition at line 190 of file function_properties_base.hxx.
FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::FunctionShapeIteratorType opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::functionShapeBegin | ( | ) | const [inline] |
Definition at line 247 of file function_properties_base.hxx.
FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::FunctionShapeIteratorType opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::functionShapeEnd | ( | ) | const [inline] |
Definition at line 254 of file function_properties_base.hxx.
bool opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::isAbsoluteDifference | ( | ) | const [inline] |
Definition at line 311 of file function_properties_base.hxx.
bool opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::isGeneralizedPotts | ( | ) | const [inline] |
Reimplemented in opengm::ConstantFunction< T, I, L >, opengm::PottsFunction< T, I, L >, opengm::PottsGFunction< T, I, L >, and opengm::PottsNFunction< T, I, L >.
Definition at line 383 of file function_properties_base.hxx.
bool opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::isPotts | ( | ) | const [inline] |
Reimplemented in opengm::ConstantFunction< T, I, L >, opengm::PottsFunction< T, I, L >, opengm::PottsGFunction< T, I, L >, and opengm::PottsNFunction< T, I, L >.
Definition at line 359 of file function_properties_base.hxx.
bool opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::isSquaredDifference | ( | ) | const [inline] |
Definition at line 261 of file function_properties_base.hxx.
bool opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::isSubmodular | ( | ) | const [inline] |
Definition at line 490 of file function_properties_base.hxx.
bool opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::isTruncatedAbsoluteDifference | ( | ) | const [inline] |
Definition at line 332 of file function_properties_base.hxx.
bool opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::isTruncatedSquaredDifference | ( | ) | const [inline] |
Definition at line 283 of file function_properties_base.hxx.
FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::ReturnType opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::max | ( | ) | const [inline] |
Reimplemented in opengm::ConstantFunction< T, I, L >, and opengm::PottsFunction< T, I, L >.
Definition at line 529 of file function_properties_base.hxx.
FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::ReturnType opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::min | ( | ) | const [inline] |
Reimplemented in opengm::ConstantFunction< T, I, L >, and opengm::PottsFunction< T, I, L >.
Definition at line 519 of file function_properties_base.hxx.
MinMaxFunctor< VALUE > opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::minMax | ( | ) | const [inline] |
find minimum and maximum of the function in a single sweep
Reimplemented in opengm::ConstantFunction< T, I, L >, and opengm::PottsFunction< T, I, L >.
Definition at line 508 of file function_properties_base.hxx.
bool opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::operator== | ( | const FUNCTION & | fb | ) | const [inline] |
Reimplemented in opengm::PottsFunction< T, I, L >.
Definition at line 135 of file function_properties_base.hxx.
FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::ReturnType opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::product | ( | ) | const [inline] |
Reimplemented in opengm::ConstantFunction< T, I, L >, and opengm::PottsFunction< T, I, L >.
Definition at line 547 of file function_properties_base.hxx.
FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::ReturnType opengm::FunctionBase< FUNCTION, VALUE, INDEX, LABEL >::sum | ( | ) | const [inline] |
Reimplemented in opengm::ConstantFunction< T, I, L >, and opengm::PottsFunction< T, I, L >.
Definition at line 539 of file function_properties_base.hxx.