|
OpenGM
2.3.x
Discrete Graphical Model Library
|
Interface that makes an object of type S (the template parameter) look like a (non-editable) factor graph. More...
#include <factorgraph.hxx>
Inheritance diagram for opengm::FactorGraph< S, I >:
Collaboration diagram for opengm::FactorGraph< S, I >:Public Types | |
| typedef S | SpecialType |
| typedef AccessorIterator< VariableAccessor, true > | ConstVariableIterator |
| typedef AccessorIterator< FactorAccessor, true > | ConstFactorIterator |
Public Member Functions | |
| size_t | numberOfVariables () const |
| total number of variable nodes in the factor graph More... | |
| size_t | numberOfVariables (const size_t) const |
| number of variable nodes connected to a factor node More... | |
| size_t | numberOfFactors () const |
| total number of factor nodes in the factor graph More... | |
| size_t | numberOfFactors (const size_t) const |
| number of factor nodes connected to a variable node More... | |
| size_t | variableOfFactor (const size_t, const size_t) const |
| j-th variable node connected to a factor node More... | |
| size_t | factorOfVariable (const size_t, const size_t) const |
| j-th factor node connected to a variable node More... | |
| ConstVariableIterator | variablesOfFactorBegin (const size_t) const |
| constant iterator to the beginning of the squence of variables connected to a factor More... | |
| ConstVariableIterator | variablesOfFactorEnd (const size_t) const |
| constant iterator to the end of the squence of variables connected to a factor More... | |
| ConstFactorIterator | factorsOfVariableBegin (const size_t) const |
| constant iterator to the beginning of the squence of factors connected to a variable More... | |
| ConstFactorIterator | factorsOfVariableEnd (const size_t) const |
| constant iterator to the end of the squence of factors connected to a variable More... | |
| bool | variableFactorConnection (const size_t, const size_t) const |
| return true if a factor is connected to a variable More... | |
| bool | factorVariableConnection (const size_t, const size_t) const |
| return true if a variable is connected to a factor More... | |
| bool | variableVariableConnection (const size_t, const size_t) const |
| return true if a variable is connected to a variable More... | |
| bool | factorFactorConnection (const size_t, const size_t) const |
| return true if a factor is connected to a factor More... | |
| bool | isAcyclic () const |
| return true if the factor graph (!) is acyclic More... | |
| bool | isConnected (marray::Vector< size_t > &representatives) const |
| return true if the factor graph (!) is connected More... | |
| bool | isChain (marray::Vector< size_t > &) const |
| return true if the factor graph (!) is a chain More... | |
| bool | isGrid (marray::Matrix< size_t > &) const |
| return true if the factor graph (!) is a grid More... | |
| size_t | maxFactorOrder () const |
| return maximum factor order More... | |
| bool | maxFactorOrder (const size_t maxOrder) const |
| return true if the maximum factor order is less or equal to maxOrder More... | |
| size_t | numberOfNthOrderFactorsOfVariable (const size_t, const size_t) const |
| return number of factors with order n which are connected to variable More... | |
| size_t | numberOfNthOrderFactorsOfVariable (const size_t, const size_t, marray::Vector< size_t > &) const |
| return number of factors with order n which are connected to variable and stores the corresponding factorIDs More... | |
| size_t | secondVariableOfSecondOrderFactor (const size_t, const size_t) const |
| return returns the id of the second variable which is connected to a given variable via a second order factor More... | |
| void | variableAdjacencyMatrix (marray::Matrix< bool > &) const |
| outputs the factor graph as a variable adjacency matrix More... | |
| void | variableAdjacencyList (std::vector< std::set< IndexType > > &) const |
| outputs the factor graph as variable adjacency lists More... | |
| void | variableAdjacencyList (std::vector< RandomAccessSet< IndexType > > &) const |
| outputs the factor graph as variable adjacency lists More... | |
| void | factorAdjacencyList (std::vector< std::set< IndexType > > &) const |
| void | factorAdjacencyList (std::vector< RandomAccessSet< IndexType > > &) const |
Protected Member Functions | |
| operator S & () | |
| operator S const & () const | |
| template<class LIST > | |
| bool | shortestPath (const size_t, const size_t, LIST &, const LIST &=LIST()) const |
| computes the shortest path from s to t using Dijkstra's algorithm with uniform distances More... | |
| template<class LIST > | |
| bool | twoHopConnected (const size_t, const size_t, LIST &) const |
| checks if variabel1 is connected to variable2 via two hops More... | |
Interface that makes an object of type S (the template parameter) look like a (non-editable) factor graph.
Definition at line 18 of file factorgraph.hxx.
| typedef AccessorIterator<FactorAccessor, true> opengm::FactorGraph< S, I >::ConstFactorIterator |
Definition at line 26 of file factorgraph.hxx.
| typedef AccessorIterator<VariableAccessor, true> opengm::FactorGraph< S, I >::ConstVariableIterator |
Definition at line 25 of file factorgraph.hxx.
| typedef S opengm::FactorGraph< S, I >::SpecialType |
Definition at line 24 of file factorgraph.hxx.
|
inline |
Definition at line 901 of file factorgraph.hxx.
|
inline |
Definition at line 911 of file factorgraph.hxx.
|
inline |
return true if a factor is connected to a factor
| factor1 | variable index |
| factor2 | variable index |
Definition at line 803 of file factorgraph.hxx.
|
inline |
j-th factor node connected to a variable node
| variable | variable index |
| j | number of the factor w.r.t. the variable |
Definition at line 198 of file factorgraph.hxx.
|
inline |
constant iterator to the beginning of the squence of factors connected to a variable
| variable | variable index |
Definition at line 240 of file factorgraph.hxx.
|
inline |
constant iterator to the end of the squence of factors connected to a variable
| variable | variable index |
Definition at line 254 of file factorgraph.hxx.
|
inline |
return true if a variable is connected to a factor
| factor | factor index |
| variable | variable index |
Definition at line 293 of file factorgraph.hxx.
| bool opengm::FactorGraph< S, I >::isAcyclic | ( | ) | const |
return true if the factor graph (!) is acyclic
Definition at line 339 of file factorgraph.hxx.
|
inline |
return true if the factor graph (!) is a chain
| [out] | chainIDs | A vector representing the chain, where chain(i) contains the corresponding variable ID. |
Definition at line 431 of file factorgraph.hxx.
Here is the call graph for this function:| bool opengm::FactorGraph< S, I >::isConnected | ( | marray::Vector< size_t > & | representatives | ) | const |
return true if the factor graph (!) is connected
| [out] | representatives | A vector of variable id's where each id is a representative of a connected component. |
Definition at line 392 of file factorgraph.hxx.
Here is the call graph for this function:
|
inline |
return true if the factor graph (!) is a grid
| [out] | gridIDs | A matrix representing the grid, where grid(i,j) contains the corresponding variable ID. |
Definition at line 529 of file factorgraph.hxx.
Here is the call graph for this function:
|
inline |
return maximum factor order
Definition at line 714 of file factorgraph.hxx.
Here is the caller graph for this function:
|
inline |
return true if the maximum factor order is less or equal to maxOrder
| maxOrder | maximum allowed factor order |
Definition at line 729 of file factorgraph.hxx.
|
inline |
total number of factor nodes in the factor graph
Definition at line 158 of file factorgraph.hxx.
|
inline |
number of factor nodes connected to a variable node
| variable | variable index |
Definition at line 169 of file factorgraph.hxx.
|
inline |
return number of factors with order n which are connected to variable
| variable | variable index |
| n | desired order of factors |
Definition at line 744 of file factorgraph.hxx.
|
inline |
return number of factors with order n which are connected to variable and stores the corresponding factorIDs
| variable | variable index | |
| n | desired order of factors | |
| [out] | factorIDs | factorIDs of all n'th order factors connected to a given variable |
Definition at line 762 of file factorgraph.hxx.
Here is the call graph for this function:
|
inline |
total number of variable nodes in the factor graph
Definition at line 136 of file factorgraph.hxx.
|
inline |
number of variable nodes connected to a factor node
| factor | factor index |
Definition at line 147 of file factorgraph.hxx.
|
inlineprotected |
Definition at line 65 of file factorgraph.hxx.
|
inlineprotected |
Definition at line 67 of file factorgraph.hxx.
|
inline |
return returns the id of the second variable which is connected to a given variable via a second order factor
| variable | variable index |
| factor | factor index |
Definition at line 783 of file factorgraph.hxx.
|
inlineprotected |
computes the shortest path from s to t using Dijkstra's algorithm with uniform distances
| s | ID of the start variable | |
| t | ID of the target variable | |
| [out] | path | returns computed path from s to t |
| allowedVariables | path is only allowed to contain variables which are given here (if empty, all variables are allowed) |
Definition at line 948 of file factorgraph.hxx.
|
inlineprotected |
checks if variabel1 is connected to variable2 via two hops
| variable1 | ID of the first variable | |
| variable2 | ID of the second variable | |
| [out] | oneHopVariables | a List of all possible one hop variables in the two hop path from variable1 to variable2 |
Definition at line 1077 of file factorgraph.hxx.
|
inline |
outputs the factor graph as variable adjacency lists
| out | variable adjacency lists (as a vector of sets) |
Definition at line 867 of file factorgraph.hxx.
|
inline |
outputs the factor graph as variable adjacency lists
| out | variable adjacency lists (as a vector of RandomAccessSets) |
Definition at line 855 of file factorgraph.hxx.
|
inline |
outputs the factor graph as a variable adjacency matrix
| out | matrix |
Definition at line 833 of file factorgraph.hxx.
|
inline |
return true if a factor is connected to a variable
| variable | variable index |
| factor | factor index |
Definition at line 269 of file factorgraph.hxx.
|
inline |
j-th variable node connected to a factor node
| factor | factor index |
| j | number of the variable w.r.t. the factor |
Definition at line 183 of file factorgraph.hxx.
|
inline |
constant iterator to the beginning of the squence of variables connected to a factor
| factor | factor index |
Definition at line 212 of file factorgraph.hxx.
|
inline |
constant iterator to the end of the squence of variables connected to a factor
| factor | factor index |
Definition at line 226 of file factorgraph.hxx.
|
inline |
return true if a variable is connected to a variable
| variable1 | variable index |
| variable2 | variable index |
Definition at line 310 of file factorgraph.hxx.
1.8.9.1