opengm::PottsGFunction< T, I, L > Class Template Reference
[Function Types]

Generalized Potts Function. More...

#include <pottsg.hxx>

Inheritance diagram for opengm::PottsGFunction< T, I, L >:
Inheritance graph
[legend]
Collaboration diagram for opengm::PottsGFunction< T, I, L >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef T ValueType
typedef I IndexType
typedef L LabelType

Public Member Functions

 PottsGFunction ()
template<class ITERATOR >
 PottsGFunction (ITERATOR, ITERATOR)
template<class ITERATOR , class ITERATOR2 >
 PottsGFunction (ITERATOR, ITERATOR, ITERATOR2)
LabelType shape (const size_t) const
size_t size () const
size_t dimension () const
template<class ITERATOR >
ValueType operator() (ITERATOR) const
bool isPotts () const
bool isGeneralizedPotts () const
template<class LABELITERATOR >
void setByLabel (LABELITERATOR, T)
void setByPartition (size_t, T)

Static Public Attributes

static const size_t BellNumbers_ [9] = {1, 1, 2, 5, 15, 52, 203, 877, 4140}
static const size_t MaximalOrder_ = 4

Detailed Description

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

Generalized Potts Function.

A generalized Potts function is a function that is invariant under all permutations of labels, e.g. f(1, 1, 3, 4) = f(3, 3, 4, 1).

Its purpose is to assign different values to different partitions of the set of input variables, regardless of which labels are used to describe this partition.

It generalizes the Potts function that distinguishes only between equal and unequal labels.

The memory required to store a generalized Potts function depends only on the order of the function, not on the number of labels. Due to the trasitivity of the equality relation, the number of all partitions of a set of D elements is smaller than 2^(D*(D+1)/2). The exact number is given by the Bell numbers B_D, e.g. B_1=1, B_2=2, B_3=5, B_4=15, B_5=52, B_6=203

Definition at line 35 of file pottsg.hxx.


Member Typedef Documentation

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

Definition at line 40 of file pottsg.hxx.

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

Definition at line 41 of file pottsg.hxx.

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

Definition at line 39 of file pottsg.hxx.


Constructor & Destructor Documentation

template<class T , class I , class L >
opengm::PottsGFunction< T, I, L >::PottsGFunction (  )  [inline]

Definition at line 132 of file pottsg.hxx.

template<class T , class I , class L >
template<class ITERATOR >
opengm::PottsGFunction< T, I, L >::PottsGFunction ( ITERATOR  shapeBegin,
ITERATOR  shapeEnd 
) [inline]

Definition at line 97 of file pottsg.hxx.

template<class T , class I , class L >
template<class ITERATOR , class ITERATOR2 >
opengm::PottsGFunction< T, I, L >::PottsGFunction ( ITERATOR  shapeBegin,
ITERATOR  shapeEnd,
ITERATOR2  valuesBegin 
) [inline]

Definition at line 113 of file pottsg.hxx.


Member Function Documentation

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

Definition at line 240 of file pottsg.hxx.

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

Reimplemented from opengm::FunctionBase< PottsGFunction< T, I, L >, T, I, L >.

Definition at line 263 of file pottsg.hxx.

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

Reimplemented from opengm::FunctionBase< PottsGFunction< T, I, L >, T, I, L >.

Definition at line 253 of file pottsg.hxx.

template<class T , class I , class L >
template<class ITERATOR >
T opengm::PottsGFunction< T, I, L >::operator() ( ITERATOR  begin  )  const [inline]

Definition at line 140 of file pottsg.hxx.

template<class T, class I , class L >
template<class LABELITERATOR >
void opengm::PottsGFunction< T, I, L >::setByLabel ( LABELITERATOR  it,
value 
) [inline]

Definition at line 188 of file pottsg.hxx.

Here is the call graph for this function:

template<class T, class I , class L >
void opengm::PottsGFunction< T, I, L >::setByPartition ( size_t  partition,
value 
) [inline]

Definition at line 202 of file pottsg.hxx.

Here is the caller graph for this function:

template<class T , class I , class L >
PottsGFunction< T, I, L >::LabelType opengm::PottsGFunction< T, I, L >::shape ( const size_t  i  )  const [inline]

Definition at line 230 of file pottsg.hxx.

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

Definition at line 247 of file pottsg.hxx.


Member Data Documentation

template<class T, class I = size_t, class L = size_t>
const size_t opengm::PottsGFunction< T, I, L >::BellNumbers_ = {1, 1, 2, 5, 15, 52, 203, 877, 4140} [inline, static]

Definition at line 55 of file pottsg.hxx.

template<class T, class I = size_t, class L = size_t>
const size_t opengm::PottsGFunction< T, I, L >::MaximalOrder_ = 4 [static]

Definition at line 56 of file pottsg.hxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Jun 17 16:31:10 2013 for OpenGM by  doxygen 1.6.3