Generalized Potts Function. More...
#include <pottsg.hxx>
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 |
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.
typedef I opengm::PottsGFunction< T, I, L >::IndexType |
Definition at line 40 of file pottsg.hxx.
typedef L opengm::PottsGFunction< T, I, L >::LabelType |
Definition at line 41 of file pottsg.hxx.
typedef T opengm::PottsGFunction< T, I, L >::ValueType |
Definition at line 39 of file pottsg.hxx.
opengm::PottsGFunction< T, I, L >::PottsGFunction | ( | ) | [inline] |
Definition at line 132 of file pottsg.hxx.
opengm::PottsGFunction< T, I, L >::PottsGFunction | ( | ITERATOR | shapeBegin, | |
ITERATOR | shapeEnd | |||
) | [inline] |
Definition at line 97 of file pottsg.hxx.
opengm::PottsGFunction< T, I, L >::PottsGFunction | ( | ITERATOR | shapeBegin, | |
ITERATOR | shapeEnd, | |||
ITERATOR2 | valuesBegin | |||
) | [inline] |
Definition at line 113 of file pottsg.hxx.
size_t opengm::PottsGFunction< T, I, L >::dimension | ( | ) | const [inline] |
Definition at line 240 of file pottsg.hxx.
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.
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.
T opengm::PottsGFunction< T, I, L >::operator() | ( | ITERATOR | begin | ) | const [inline] |
Definition at line 140 of file pottsg.hxx.
void opengm::PottsGFunction< T, I, L >::setByLabel | ( | LABELITERATOR | it, | |
T | value | |||
) | [inline] |
void opengm::PottsGFunction< T, I, L >::setByPartition | ( | size_t | partition, | |
T | value | |||
) | [inline] |
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.
size_t opengm::PottsGFunction< T, I, L >::size | ( | ) | const [inline] |
Definition at line 247 of file pottsg.hxx.
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.
const size_t opengm::PottsGFunction< T, I, L >::MaximalOrder_ = 4 [static] |
Definition at line 56 of file pottsg.hxx.