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

#include <trws_decomposition.hxx>

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

Public Types

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

 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)
 

Static Public Member Functions

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

typedef std::pair< IndexType, IndexTypeEdge
 
typedef std::list< EdgeEdgeList
 
typedef std::vector< EdgeListNodeList
 

Protected Member Functions

IndexType _addSubModel ()
 
void _addSubFactor (const IndexType &factorId)
 
void _addSubVariable (const IndexType &variableId)
 

Static Protected Member Functions

static void _CreateNodeList (const GM &gm, NodeList *pnodeList)
 

Protected Attributes

IndexType _numberOfModels
 
std::vector< IndexList_variableLists
 
std::vector< IndexList_pwFactorLists
 
const GM & _gm
 

Detailed Description

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

Definition at line 24 of file trws_decomposition.hxx.

Member Typedef Documentation

template<class GM>
typedef std::pair<IndexType,IndexType> opengm::trws_base::Decomposition< GM >::Edge
protected

Definition at line 54 of file trws_decomposition.hxx.

template<class GM>
typedef std::list<Edge> opengm::trws_base::Decomposition< GM >::EdgeList
protected

Definition at line 55 of file trws_decomposition.hxx.

template<class GM>
typedef std::vector<IndexType> opengm::trws_base::Decomposition< GM >::IndexList

Definition at line 29 of file trws_decomposition.hxx.

template<class GM>
typedef GM::IndexType opengm::trws_base::Decomposition< GM >::IndexType

Definition at line 27 of file trws_decomposition.hxx.

template<class GM>
typedef GM::LabelType opengm::trws_base::Decomposition< GM >::LabelType

Definition at line 28 of file trws_decomposition.hxx.

template<class GM>
typedef std::vector<EdgeList> opengm::trws_base::Decomposition< GM >::NodeList
protected

Definition at line 56 of file trws_decomposition.hxx.

template<class GM>
typedef opengm::GraphicalModelDecomposition::SubVariable opengm::trws_base::Decomposition< GM >::SubVariable

Definition at line 30 of file trws_decomposition.hxx.

template<class GM>
typedef opengm::GraphicalModelDecomposition::SubVariableListType opengm::trws_base::Decomposition< GM >::SubVariableListType

Definition at line 31 of file trws_decomposition.hxx.

Constructor & Destructor Documentation

template<class GM>
opengm::trws_base::Decomposition< GM >::Decomposition ( const GM &  gm,
IndexType  numSubModels = 0 
)
inline
Parameters
numSubModelsnumSubModels - ESTIMATED number of submodels to optimize memory allocation

Definition at line 32 of file trws_decomposition.hxx.

template<class GM >
opengm::trws_base::Decomposition< GM >::~Decomposition< GM > ( )
pure virtual

Definition at line 189 of file trws_decomposition.hxx.

Member Function Documentation

template<class GM >
void opengm::trws_base::Decomposition< GM >::_addSubFactor ( const IndexType factorId)
protected

Definition at line 344 of file trws_decomposition.hxx.

template<class GM >
Decomposition< GM >::IndexType opengm::trws_base::Decomposition< GM >::_addSubModel ( )
protected

Definition at line 335 of file trws_decomposition.hxx.

+ Here is the caller graph for this function:

template<class GM >
void opengm::trws_base::Decomposition< GM >::_addSubVariable ( const IndexType variableId)
protected

Definition at line 350 of file trws_decomposition.hxx.

template<class GM>
void opengm::trws_base::Decomposition< GM >::_CreateNodeList ( const GM &  gm,
NodeList pnodeList 
)
staticprotected

Definition at line 316 of file trws_decomposition.hxx.

+ Here is the caller graph for this function:

template<class GM>
void opengm::trws_base::Decomposition< GM >::CheckDuplicateUnaryFactors ( const GM &  gm)
static

Definition at line 397 of file trws_decomposition.hxx.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class GM>
void opengm::trws_base::Decomposition< GM >::CheckForIsolatedNodes ( const GM &  gm)

Definition at line 413 of file trws_decomposition.hxx.

+ Here is the caller graph for this function:

template<class GM>
void opengm::trws_base::Decomposition< GM >::CheckUnaryFactors ( const GM &  gm)
static

checks whether all variables have corresp. unary factor with the same index and vice versa

Definition at line 377 of file trws_decomposition.hxx.

template<class GM >
void opengm::trws_base::Decomposition< GM >::ComputeVariableDecomposition ( std::vector< SubVariableListType > *  plist) const
virtual

Definition at line 433 of file trws_decomposition.hxx.

template<class GM>
virtual const IndexList& opengm::trws_base::Decomposition< GM >::getFactorList ( IndexType  subModelId) const
inlinevirtual

Definition at line 42 of file trws_decomposition.hxx.

template<class GM>
virtual IndexType opengm::trws_base::Decomposition< GM >::getNumberOfSubModels ( ) const
inlinevirtual

Definition at line 40 of file trws_decomposition.hxx.

template<class GM>
virtual const IndexList& opengm::trws_base::Decomposition< GM >::getVariableList ( IndexType  subModelId) const
inlinevirtual

Definition at line 41 of file trws_decomposition.hxx.

Member Data Documentation

template<class GM>
const GM& opengm::trws_base::Decomposition< GM >::_gm
protected

Definition at line 61 of file trws_decomposition.hxx.

template<class GM>
IndexType opengm::trws_base::Decomposition< GM >::_numberOfModels
protected

Definition at line 58 of file trws_decomposition.hxx.

template<class GM>
std::vector<IndexList> opengm::trws_base::Decomposition< GM >::_pwFactorLists
protected

Definition at line 60 of file trws_decomposition.hxx.

template<class GM>
std::vector<IndexList> opengm::trws_base::Decomposition< GM >::_variableLists
protected

Definition at line 59 of file trws_decomposition.hxx.