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

Field of Expert function. More...

#include <fieldofexperts.hxx>

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

Public Types

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

Public Member Functions

 FoEFunction (const std::vector< T > &, const std::vector< T > &, const L)
 constructor More...
 
template<class IT >
 FoEFunction (IT, IT, const L, const I, const size_t)
 constructor More...
 
 FoEFunction ()
 constructor for demo function More...
 
LabelType shape (const size_t) const
 
size_t size () const
 
size_t dimension () const
 
template<class ITERATOR >
ValueType operator() (ITERATOR) const
 
void setDefault ()
 
template<class ITERATOR >
operator() (ITERATOR begin) const
 
- Public Member Functions inherited from opengm::FunctionBase< FoEFunction< T, I, L >, T, size_t, size_t >
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 FoEFunction< T, I, L > &) const
 
FunctionShapeIteratorType functionShapeBegin () const
 
FunctionShapeIteratorType functionShapeEnd () const
 
size_t numberOfParameters () const
 
size_t parameterIndex (const size_t paramNumber) const
 

Protected Attributes

std::vector< T > experts_
 
std::vector< T > alphas_
 
numLabels_
 
order_
 
std::vector< T > l_
 

Detailed Description

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

Field of Expert function.

Definition at line 20 of file fieldofexperts.hxx.

Member Typedef Documentation

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

Definition at line 26 of file fieldofexperts.hxx.

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

Definition at line 25 of file fieldofexperts.hxx.

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

Definition at line 24 of file fieldofexperts.hxx.

Constructor & Destructor Documentation

template<class T , class I , class L >
opengm::FoEFunction< T, I, L >::FoEFunction ( const std::vector< T > &  e,
const std::vector< T > &  a,
const L  numL 
)
inline

constructor

Parameters
eExpert-matrix (dim = numExp x order)
aVector weighting the experts
numLNumberOfLabels

Definition at line 120 of file fieldofexperts.hxx.

template<class T , class I , class L >
template<class IT >
opengm::FoEFunction< T, I, L >::FoEFunction ( IT  ite,
IT  ita,
const L  numLabels,
const I  numVars,
const size_t  numExperts 
)
inline

constructor

Parameters
eExpert-iterator (dim = numExp x order)
aIterator weighting the experts
numLNumberOfLabels

Definition at line 137 of file fieldofexperts.hxx.

template<class T , class I , class L >
opengm::FoEFunction< T, I, L >::FoEFunction ( )
inline

constructor for demo function

Definition at line 77 of file fieldofexperts.hxx.

Member Function Documentation

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

Definition at line 187 of file fieldofexperts.hxx.

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

Definition at line 154 of file fieldofexperts.hxx.

template<class T , class I , class L >
void opengm::FoEFunction< T, I, L >::setDefault ( )
inline

Definition at line 89 of file fieldofexperts.hxx.

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

Definition at line 178 of file fieldofexperts.hxx.

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

Definition at line 193 of file fieldofexperts.hxx.

Member Data Documentation

template<class T, class I = size_t, class L = size_t>
std::vector<T> opengm::FoEFunction< T, I, L >::alphas_
protected

Definition at line 41 of file fieldofexperts.hxx.

template<class T, class I = size_t, class L = size_t>
std::vector<T> opengm::FoEFunction< T, I, L >::experts_
protected

Definition at line 40 of file fieldofexperts.hxx.

template<class T, class I = size_t, class L = size_t>
std::vector<T> opengm::FoEFunction< T, I, L >::l_
mutableprotected

Definition at line 44 of file fieldofexperts.hxx.

template<class T, class I = size_t, class L = size_t>
L opengm::FoEFunction< T, I, L >::numLabels_
protected

Definition at line 42 of file fieldofexperts.hxx.

template<class T, class I = size_t, class L = size_t>
I opengm::FoEFunction< T, I, L >::order_
protected

Definition at line 43 of file fieldofexperts.hxx.