OpenGM  2.3.x
Discrete Graphical Model Library
Public Types | Public Member Functions | List of all members
opengm::TruncatedAbsoluteDifferenceFunction< T, I, L > Class Template Reference

truncated absolute differents between the labels of 2 variables More...

#include <truncated_absolute_difference.hxx>

+ Inheritance diagram for opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >:
+ Collaboration diagram for opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >:

Public Types

typedef T ValueType
 
typedef I IndexType
 
typedef L LabelType
 
- Public Types inherited from opengm::FunctionBase< TruncatedAbsoluteDifferenceFunction< T, I, L >, T, I, L >
typedef AccessorIterator< FunctionShapeAccessorType, true > FunctionShapeIteratorType
 

Public Member Functions

 TruncatedAbsoluteDifferenceFunction (const LabelType=2, const LabelType=2, const ValueType=ValueType(), const ValueType=ValueType())
 
size_t shape (const IndexType) const
 extension a value table encoding this function would have More...
 
size_t size () const
 number of entries a value table encoding this function would have (used for I/O) More...
 
size_t dimension () const
 
template<class ITERATOR >
operator() (ITERATOR) const
 
template<class ITERATOR >
TruncatedAbsoluteDifferenceFunction< T, I, L >::ValueType operator() (ITERATOR begin) const
 
- Public Member Functions inherited from opengm::FunctionBase< TruncatedAbsoluteDifferenceFunction< T, I, L >, T, I, L >
bool isPotts () const
 
bool isGeneralizedPotts () const
 
bool isSubmodular () const
 
bool isSquaredDifference () const
 
bool isTruncatedSquaredDifference () const
 
bool isAbsoluteDifference () const
 
bool isTruncatedAbsoluteDifference () const
 
bool isLinearConstraint () const
 
MinMaxFunctor< T > minMax () const
 find minimum and maximum of the function in a single sweep More...
 
ReturnType min () const
 
ReturnType max () const
 
ReturnType sum () const
 
ReturnType product () const
 
ReturnType accumulate () const
 accumulate all values of the function More...
 
void forAllValuesInOrder (FUNCTOR &functor) const
 call a functor for each value of the function (in lexicographical order of the variable indices) More...
 
void forAllValuesInSwitchedOrder (FUNCTOR &functor) const
 
void forAllValuesInAnyOrder (FUNCTOR &functor) const
 call a functor for each value of the function (in un-specified order) More...
 
void forAtLeastAllUniqueValues (FUNCTOR &functor) const
 call a functor for at least all unique values of the function More...
 
void forAllValuesInOrderWithCoordinate (COORDINATE_FUNCTOR &functor) const
 
void forAllValuesInAnyOrderWithCoordinate (COORDINATE_FUNCTOR &functor) const
 
void forAtLeastAllUniqueValuesWithCoordinate (COORDINATE_FUNCTOR &functor) const
 
bool operator== (const TruncatedAbsoluteDifferenceFunction< T, I, L > &) const
 
FunctionShapeIteratorType functionShapeBegin () const
 
FunctionShapeIteratorType functionShapeEnd () const
 
size_t numberOfParameters () const
 
parameterIndex (const size_t paramNumber) const
 

Detailed Description

template<class T, class I = size_t, class L = size_t>
class opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >

truncated absolute differents between the labels of 2 variables

Definition at line 15 of file truncated_absolute_difference.hxx.

Member Typedef Documentation

template<class T, class I = size_t, class L = size_t>
typedef I opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >::IndexType

Definition at line 19 of file truncated_absolute_difference.hxx.

template<class T, class I = size_t, class L = size_t>
typedef L opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >::LabelType

Definition at line 20 of file truncated_absolute_difference.hxx.

template<class T, class I = size_t, class L = size_t>
typedef T opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >::ValueType

Definition at line 18 of file truncated_absolute_difference.hxx.

Constructor & Destructor Documentation

template<class T , class I , class L >
opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >::TruncatedAbsoluteDifferenceFunction ( const LabelType  numberOfLabels1 = 2,
const LabelType  numberOfLabels2 = 2,
const ValueType  parameter1 = ValueType(),
const ValueType  parameter2 = ValueType() 
)
inline

Definition at line 63 of file truncated_absolute_difference.hxx.

Member Function Documentation

template<class T , class I , class L >
size_t opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >::dimension ( ) const
inline

Definition at line 102 of file truncated_absolute_difference.hxx.

template<class T, class I = size_t, class L = size_t>
template<class ITERATOR >
T opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >::operator() ( ITERATOR  ) const
template<class T, class I = size_t, class L = size_t>
template<class ITERATOR >
TruncatedAbsoluteDifferenceFunction<T, I, L>::ValueType opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >::operator() ( ITERATOR  begin) const
inline

Definition at line 79 of file truncated_absolute_difference.hxx.

+ Here is the call graph for this function:

template<class T , class I , class L >
size_t opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >::shape ( const IndexType  i) const
inline

extension a value table encoding this function would have

Parameters
idimension

Definition at line 92 of file truncated_absolute_difference.hxx.

template<class T , class I , class L >
size_t opengm::TruncatedAbsoluteDifferenceFunction< T, I, L >::size ( ) const
inline

number of entries a value table encoding this function would have (used for I/O)

Definition at line 109 of file truncated_absolute_difference.hxx.