OpenGM  2.3.x
Discrete Graphical Model Library
Public Types | Public Member Functions | List of all members
opengm::ModelViewFunction< GM, MARRAY > Class Template Reference

Function that refers to a factor of another GraphicalModel. More...

#include <modelviewfunction.hxx>

+ Inheritance diagram for opengm::ModelViewFunction< GM, MARRAY >:
+ Collaboration diagram for opengm::ModelViewFunction< GM, MARRAY >:

Public Types

typedef GM GraphicalModelType
 
typedef MARRAY OffsetType
 
typedef GM::ValueType ValueType
 
typedef GM::ValueType value_type
 
typedef GM::IndexType IndexType
 
typedef GM::LabelType LabelType
 
- Public Types inherited from opengm::FunctionBase< ModelViewFunction< GM, MARRAY >, GM::ValueType, GM::IndexType, GM::LabelType >
typedef AccessorIterator< FunctionShapeAccessorType, true > FunctionShapeIteratorType
 

Public Member Functions

 ModelViewFunction (const GraphicalModelType &gm, const IndexType factorIndex, const ValueType scale, OffsetType const *offset)
 
 ModelViewFunction (const GraphicalModelType &gm, const IndexType factorIndex, const ValueType scale)
 
 ModelViewFunction (OffsetType const *offset)
 Constructor. More...
 
template<class Iterator >
ValueType operator() (Iterator begin) const
 
size_t size () const
 
LabelType shape (const size_t i) const
 
size_t dimension () const
 
template<class Iterator >
opengm::ModelViewFunction< GM, MARRAY >::ValueType operator() (Iterator begin) const
 
- Public Member Functions inherited from opengm::FunctionBase< ModelViewFunction< GM, MARRAY >, GM::ValueType, GM::IndexType, GM::LabelType >
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< GM::ValueType > 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 ModelViewFunction< GM, MARRAY > &) const
 
FunctionShapeIteratorType functionShapeBegin () const
 
FunctionShapeIteratorType functionShapeEnd () const
 
size_t numberOfParameters () const
 
GM::IndexType parameterIndex (const size_t paramNumber) const
 

Detailed Description

template<class GM, class MARRAY>
class opengm::ModelViewFunction< GM, MARRAY >

Function that refers to a factor of another GraphicalModel.

Template Parameters
GMtype of the graphical model which we want to view
MARRAYtype of the array that holds the offset

Definition at line 16 of file modelviewfunction.hxx.

Member Typedef Documentation

template<class GM, class MARRAY>
typedef GM opengm::ModelViewFunction< GM, MARRAY >::GraphicalModelType

Definition at line 23 of file modelviewfunction.hxx.

template<class GM, class MARRAY>
typedef GM::IndexType opengm::ModelViewFunction< GM, MARRAY >::IndexType

Definition at line 27 of file modelviewfunction.hxx.

template<class GM, class MARRAY>
typedef GM::LabelType opengm::ModelViewFunction< GM, MARRAY >::LabelType

Definition at line 28 of file modelviewfunction.hxx.

template<class GM, class MARRAY>
typedef MARRAY opengm::ModelViewFunction< GM, MARRAY >::OffsetType

Definition at line 24 of file modelviewfunction.hxx.

template<class GM, class MARRAY>
typedef GM::ValueType opengm::ModelViewFunction< GM, MARRAY >::value_type

Definition at line 26 of file modelviewfunction.hxx.

template<class GM, class MARRAY>
typedef GM::ValueType opengm::ModelViewFunction< GM, MARRAY >::ValueType

Definition at line 25 of file modelviewfunction.hxx.

Constructor & Destructor Documentation

template<class GM, class MARRAY>
opengm::ModelViewFunction< GM, MARRAY >::ModelViewFunction ( const GraphicalModelType gm,
const IndexType  factorIndex,
const ValueType  scale,
OffsetType const *  offset 
)
template<class GM, class MARRAY>
opengm::ModelViewFunction< GM, MARRAY >::ModelViewFunction ( const GraphicalModelType gm,
const IndexType  factorIndex,
const ValueType  scale 
)
template<class GM , class MARRAY >
opengm::ModelViewFunction< GM, MARRAY >::ModelViewFunction ( OffsetType const *  offset)
inline

Constructor.

Parameters
offsetpointer to the offset marray

Definition at line 105 of file modelviewfunction.hxx.

Member Function Documentation

template<class GM , class MARRAY >
size_t opengm::ModelViewFunction< GM, MARRAY >::dimension ( ) const
inline

Definition at line 171 of file modelviewfunction.hxx.

template<class GM, class MARRAY>
template<class Iterator >
ValueType opengm::ModelViewFunction< GM, MARRAY >::operator() ( Iterator  begin) const
template<class GM, class MARRAY>
template<class Iterator >
opengm::ModelViewFunction<GM, MARRAY>::ValueType opengm::ModelViewFunction< GM, MARRAY >::operator() ( Iterator  begin) const
inline

Definition at line 120 of file modelviewfunction.hxx.

template<class GM , class MARRAY >
ModelViewFunction< GM, MARRAY >::LabelType opengm::ModelViewFunction< GM, MARRAY >::shape ( const size_t  i) const
inline

Definition at line 139 of file modelviewfunction.hxx.

template<class GM , class MARRAY >
size_t opengm::ModelViewFunction< GM, MARRAY >::size ( ) const
inline

Definition at line 156 of file modelviewfunction.hxx.