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

Potts function for two variables. More...

#include <l_potts.hxx>

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

Public Types

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

Public Member Functions

 LPottsFunction (const LabelType, const LabelType, const Parameters< ValueType, IndexType > &parameters, const IndexType valueNotEqual)
 
LabelType shape (const size_t) const
 
size_t size () const
 
size_t dimension () const
 
template<class ITERATOR >
ValueType operator() (ITERATOR) const
 
bool operator== (const LPottsFunction &) const
 
bool isPotts () const
 
bool isGeneralizedPotts () const
 
ValueType min () const
 
ValueType max () const
 
ValueType sum () const
 
ValueType product () const
 
MinMaxFunctor< ValueTypeminMax () const
 
size_t numberOfParameters () const
 
IndexType parameterIndex (const size_t paramNumber) const
 
template<class ITERATOR >
operator() (ITERATOR begin) const
 
- Public Member Functions inherited from opengm::FunctionBase< LPottsFunction< 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 LPottsFunction< 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::LPottsFunction< T, I, L >

Potts function for two variables.

Definition at line 19 of file l_potts.hxx.

Member Typedef Documentation

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

Definition at line 25 of file l_potts.hxx.

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

Definition at line 24 of file l_potts.hxx.

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

Definition at line 23 of file l_potts.hxx.

Constructor & Destructor Documentation

template<class T , class I , class L >
opengm::LPottsFunction< T, I, L >::LPottsFunction ( const LabelType  numberOfLabels1,
const LabelType  numberOfLabels2,
const Parameters< ValueType, IndexType > &  parameters,
const IndexType  valueNotEqual 
)
inline

Definition at line 82 of file l_potts.hxx.

Member Function Documentation

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

Definition at line 119 of file l_potts.hxx.

template<class T , class I , class L >
bool opengm::LPottsFunction< T, I, L >::isGeneralizedPotts ( ) const
inline

Definition at line 151 of file l_potts.hxx.

template<class T , class I , class L >
bool opengm::LPottsFunction< T, I, L >::isPotts ( ) const
inline

Definition at line 144 of file l_potts.hxx.

template<class T , class I , class L >
LPottsFunction< T, I, L >::ValueType opengm::LPottsFunction< T, I, L >::max ( ) const
inline

Definition at line 166 of file l_potts.hxx.

template<class T , class I , class L >
LPottsFunction< T, I, L >::ValueType opengm::LPottsFunction< T, I, L >::min ( ) const
inline

Definition at line 158 of file l_potts.hxx.

template<class T , class I , class L >
MinMaxFunctor< typename LPottsFunction< T, I, L >::ValueType > opengm::LPottsFunction< T, I, L >::minMax ( ) const
inline

Definition at line 190 of file l_potts.hxx.

template<class T, class I = size_t, class L = size_t>
size_t opengm::LPottsFunction< T, I, L >::numberOfParameters ( ) const
inline

Definition at line 48 of file l_potts.hxx.

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

Definition at line 98 of file l_potts.hxx.

template<class T , class I , class L >
bool opengm::LPottsFunction< T, I, L >::operator== ( const LPottsFunction< T, I, L > &  fb) const
inline

Definition at line 133 of file l_potts.hxx.

template<class T, class I = size_t, class L = size_t>
IndexType opengm::LPottsFunction< T, I, L >::parameterIndex ( const size_t  paramNumber) const
inline

Definition at line 51 of file l_potts.hxx.

template<class T , class I , class L >
LPottsFunction< T, I, L >::ValueType opengm::LPottsFunction< T, I, L >::product ( ) const
inline

Definition at line 183 of file l_potts.hxx.

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

Definition at line 110 of file l_potts.hxx.

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

Definition at line 125 of file l_potts.hxx.

template<class T , class I , class L >
LPottsFunction< T, I, L >::ValueType opengm::LPottsFunction< T, I, L >::sum ( ) const
inline

Definition at line 174 of file l_potts.hxx.