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

#include <trws_decomposition.hxx>

+ Inheritance diagram for opengm::trws_base::GridDecomposition< GM >:
+ Collaboration diagram for opengm::trws_base::GridDecomposition< GM >:

Public Types

typedef Decomposition< GM > parent
 
typedef parent::IndexType IndexType
 
typedef parent::LabelType LabelType
 
typedef parent::IndexList IndexList
 
typedef parent::SubVariable SubVariable
 
typedef parent::SubVariableListType SubVariableListType
 
- Public Types inherited from opengm::trws_base::Decomposition< GM >
typedef GM::IndexType IndexType
 
typedef GM::LabelType LabelType
 
typedef std::vector< IndexTypeIndexList
 
typedef opengm::GraphicalModelDecomposition::SubVariable SubVariable
 
typedef opengm::GraphicalModelDecomposition::SubVariableListType SubVariableListType
 

Public Member Functions

 GridDecomposition (const GM &gm, IndexType numSubModels=0)
 numSubModels - ESTIMATED number of submodels to optimize memory allocation More...
 
IndexType xsize () const
 
IndexType ysize () const
 
- Public Member Functions inherited from opengm::trws_base::Decomposition< GM >
 Decomposition (const GM &gm, IndexType numSubModels=0)
 
virtual ~Decomposition ()=0
 
virtual IndexType getNumberOfSubModels () const
 
virtual const IndexListgetVariableList (IndexType subModelId) const
 
virtual const IndexListgetFactorList (IndexType subModelId) const
 
virtual void ComputeVariableDecomposition (std::vector< SubVariableListType > *plist) const
 
void CheckForIsolatedNodes (const GM &gm)
 

Protected Member Functions

void _computeGridSizes ()
 
void _CheckGridModel ()
 
void _initDecompositionLists ()
 
IndexType _xysize () const
 
IndexType _pwrowsize () const
 
IndexType _pwIndexRow (IndexType x, IndexType y) const
 

returns an index of a row pairwise factor places to the right to var (x,y)

More...
 
IndexType _pwIndexCol (IndexType x, IndexType y) const
 

returns an index of a row pairwise factor places to the right to var (x,y)

More...
 
IndexType _varIndex (IndexType x, IndexType y) const
 

returns an index of a column pairwise factor places to the down to var (x,y)

More...
 
void _getRow (IndexType y, IndexList *plist) const
 

returns indexes of variables in the row <y>

More...
 
void _getCol (IndexType x, IndexList *plist) const
 

returns indexes of variables in the row <y>

More...
 
void _getPWRow (IndexType y, IndexList *plist) const
 

returns indexes of variables in the column <y>

More...
 
void _getPWCol (IndexType x, IndexList *plist) const
 

return indexes of pairwise factors in the row <y>

More...
 
- Protected Member Functions inherited from opengm::trws_base::Decomposition< GM >
IndexType _addSubModel ()
 
void _addSubFactor (const IndexType &factorId)
 
void _addSubVariable (const IndexType &variableId)
 

Additional Inherited Members

- Static Public Member Functions inherited from opengm::trws_base::Decomposition< GM >
static void CheckUnaryFactors (const GM &gm)
 checks whether all variables have corresp. unary factor with the same index and vice versa More...
 
static void CheckDuplicateUnaryFactors (const GM &gm)
 
- Protected Types inherited from opengm::trws_base::Decomposition< GM >
typedef std::pair< IndexType, IndexTypeEdge
 
typedef std::list< EdgeEdgeList
 
typedef std::vector< EdgeListNodeList
 
- Static Protected Member Functions inherited from opengm::trws_base::Decomposition< GM >
static void _CreateNodeList (const GM &gm, NodeList *pnodeList)
 
- Protected Attributes inherited from opengm::trws_base::Decomposition< GM >
IndexType _numberOfModels
 
std::vector< IndexList_variableLists
 
std::vector< IndexList_pwFactorLists
 
const GM & _gm
 

Detailed Description

template<class GM>
class opengm::trws_base::GridDecomposition< GM >

Definition at line 89 of file trws_decomposition.hxx.

Member Typedef Documentation

Definition at line 95 of file trws_decomposition.hxx.

Definition at line 93 of file trws_decomposition.hxx.

Definition at line 94 of file trws_decomposition.hxx.

template<class GM>
typedef Decomposition<GM> opengm::trws_base::GridDecomposition< GM >::parent

Definition at line 92 of file trws_decomposition.hxx.

Definition at line 96 of file trws_decomposition.hxx.

Definition at line 97 of file trws_decomposition.hxx.

Constructor & Destructor Documentation

template<class GM>
opengm::trws_base::GridDecomposition< GM >::GridDecomposition ( const GM &  gm,
IndexType  numSubModels = 0 
)

numSubModels - ESTIMATED number of submodels to optimize memory allocation

Definition at line 219 of file trws_decomposition.hxx.

+ Here is the call graph for this function:

Member Function Documentation

template<class GM >
void opengm::trws_base::GridDecomposition< GM >::_CheckGridModel ( )
protected

Definition at line 269 of file trws_decomposition.hxx.

+ Here is the call graph for this function:

template<class GM >
void opengm::trws_base::GridDecomposition< GM >::_computeGridSizes ( )
protected

Definition at line 236 of file trws_decomposition.hxx.

+ Here is the caller graph for this function:

template<class GM >
void opengm::trws_base::GridDecomposition< GM >::_getCol ( IndexType  x,
IndexList plist 
) const
protected

returns indexes of variables in the row <y>

returns indexes of variables in the column <y>

Definition at line 470 of file trws_decomposition.hxx.

template<class GM >
void opengm::trws_base::GridDecomposition< GM >::_getPWCol ( IndexType  x,
IndexList plist 
) const
protected

return indexes of pairwise factors in the row <y>

return indexes of pairwise factors in the column <x>

Definition at line 494 of file trws_decomposition.hxx.

template<class GM >
void opengm::trws_base::GridDecomposition< GM >::_getPWRow ( IndexType  y,
IndexList plist 
) const
protected

returns indexes of variables in the column <y>

return indexes of pairwise factors in the row <y>

Definition at line 480 of file trws_decomposition.hxx.

template<class GM >
void opengm::trws_base::GridDecomposition< GM >::_getRow ( IndexType  y,
IndexList plist 
) const
protected

returns indexes of variables in the row <y>

Definition at line 460 of file trws_decomposition.hxx.

template<class GM >
void opengm::trws_base::GridDecomposition< GM >::_initDecompositionLists ( )
protected

Definition at line 297 of file trws_decomposition.hxx.

+ Here is the caller graph for this function:

template<class GM >
GridDecomposition< GM >::IndexType opengm::trws_base::GridDecomposition< GM >::_pwIndexCol ( IndexType  x,
IndexType  y 
) const
protected

returns an index of a row pairwise factor places to the right to var (x,y)

returns an index of a column pairwise factor places to the down to var (x,y)

Definition at line 452 of file trws_decomposition.hxx.

template<class GM >
GridDecomposition< GM >::IndexType opengm::trws_base::GridDecomposition< GM >::_pwIndexRow ( IndexType  x,
IndexType  y 
) const
protected

returns an index of a row pairwise factor places to the right to var (x,y)

Definition at line 443 of file trws_decomposition.hxx.

template<class GM>
IndexType opengm::trws_base::GridDecomposition< GM >::_pwrowsize ( ) const
inlineprotected

Definition at line 110 of file trws_decomposition.hxx.

template<class GM>
IndexType opengm::trws_base::GridDecomposition< GM >::_varIndex ( IndexType  x,
IndexType  y 
) const
inlineprotected

returns an index of a column pairwise factor places to the down to var (x,y)

Definition at line 113 of file trws_decomposition.hxx.

template<class GM>
IndexType opengm::trws_base::GridDecomposition< GM >::_xysize ( ) const
inlineprotected

Definition at line 109 of file trws_decomposition.hxx.

template<class GM>
IndexType opengm::trws_base::GridDecomposition< GM >::xsize ( ) const
inline

Definition at line 100 of file trws_decomposition.hxx.

template<class GM>
IndexType opengm::trws_base::GridDecomposition< GM >::ysize ( ) const
inline

Definition at line 101 of file trws_decomposition.hxx.