|
OpenGM
2.3.x
Discrete Graphical Model Library
|
#include <submodel2.hxx>
Inheritance diagram for SubmodelCGC< GM >:
Collaboration diagram for SubmodelCGC< GM >:Public Types | |
| enum | Mode { SingleSubset, TwoSubsets } |
| typedef GM::ValueType | ValueType |
| typedef GM::IndexType | IndexType |
| typedef GM::LabelType | LabelType |
| typedef std::vector< ValueType > | ValueVector |
| typedef std::vector< double > | DoubleVector |
| typedef std::vector< IndexType > | IndexVector |
| typedef std::vector< LabelType > | LabelVector |
| typedef std::vector< bool > | BoolVector |
| typedef std::vector< unsigned char > | PseudoBoolVector |
| typedef std::pair< int, ValueType > | IVPairType |
| typedef std::pair< size_t, size_t > | Edge |
| typedef std::pair< Edge, size_t > | EdgeMapEntry |
| typedef boost::unordered_map< Edge, size_t > | EdgeMap |
Public Member Functions | |
| SubmodelCGC (const GM &gm, const IndexType maxBruteForceSize2, const IndexType maxBruteForceSize4, const bool useBfs) | |
| ValueType | inferMulticut (Mode mode) |
| ValueType | inferQPBOI (Mode mode) |
| ValueType | inferPlanarMaxCut () |
| ValueType | inferBruteForce2 () |
| ValueType | inferBruteForce4 () |
| template<class ARG > | |
| IVPairType | inferSubset (ARG &globalArg, const LabelType colorCC, const IndexType viCC, IndexType offset, std::deque< IndexType > &deque, const bool planar, bool verbose=false) |
| template<class ARG > | |
| IVPairType | infer2Subsets (ARG &globalArg, const LabelType colorCC0, const LabelType colorCC1, const IndexType viCC0, const IndexType viCC1, IndexType offset, const bool planar=true) |
| void | updateDirtyness (std::vector< unsigned char > &dirtyFactors, const bool changes) |
| void | cleanInsideAndBorder () |
| template<class ARG > | |
| SubmodelCGC< GM >::IVPairType | infer2Subsets (ARG &globalArg, typename SubmodelCGC< GM >::LabelType colorCC0, typename SubmodelCGC< GM >::LabelType colorCC1, const typename SubmodelCGC< GM >::IndexType viCC0, const typename SubmodelCGC< GM >::IndexType viCC1, typename SubmodelCGC< GM >::IndexType offset, const bool planar) |
| template<class ARG > | |
| SubmodelCGC< GM >::IVPairType | inferSubset (ARG &globalArg, typename SubmodelCGC< GM >::LabelType colorCC, typename SubmodelCGC< GM >::IndexType viCC, typename SubmodelCGC< GM >::IndexType offset, std::deque< typename SubmodelCGC< GM >::IndexType > &deque, const bool planar, bool verbose) |
| template<class ARG > | |
| void | setSubVarImplicit (const ARG &arg, const typename SubmodelCGC< GM >::LabelType ccColor, const typename SubmodelCGC< GM >::IndexType vi) |
| template<class ARG > | |
| void | setSubVarImplicitBfs (const ARG &arg, const typename SubmodelCGC< GM >::LabelType ccColor, const typename SubmodelCGC< GM >::IndexType vi) |
| template<class ARG > | |
| void | setSubVarImplicit (const ARG &arg, const typename SubmodelCGC< GM >::LabelType ccColor0, const typename SubmodelCGC< GM >::LabelType ccColor1, const typename SubmodelCGC< GM >::IndexType vi0, const typename SubmodelCGC< GM >::IndexType vi1) |
| template<class ARG > | |
| void | setSubVarImplicitBfs (const ARG &arg, const typename SubmodelCGC< GM >::LabelType ccColor0, const typename SubmodelCGC< GM >::LabelType ccColor1, const typename SubmodelCGC< GM >::IndexType vi0, const typename SubmodelCGC< GM >::IndexType vi1) |
Definition at line 32 of file submodel2.hxx.
| typedef std::vector<bool> SubmodelCGC< GM >::BoolVector |
Definition at line 42 of file submodel2.hxx.
| typedef std::vector<double > SubmodelCGC< GM >::DoubleVector |
Definition at line 39 of file submodel2.hxx.
| typedef std::pair<size_t,size_t> SubmodelCGC< GM >::Edge |
Definition at line 48 of file submodel2.hxx.
| typedef boost::unordered_map<Edge,size_t> SubmodelCGC< GM >::EdgeMap |
Definition at line 50 of file submodel2.hxx.
| typedef std::pair<Edge, size_t> SubmodelCGC< GM >::EdgeMapEntry |
Definition at line 49 of file submodel2.hxx.
| typedef GM::IndexType SubmodelCGC< GM >::IndexType |
Definition at line 35 of file submodel2.hxx.
| typedef std::vector<IndexType> SubmodelCGC< GM >::IndexVector |
Definition at line 40 of file submodel2.hxx.
| typedef std::pair<int,ValueType> SubmodelCGC< GM >::IVPairType |
Definition at line 45 of file submodel2.hxx.
| typedef GM::LabelType SubmodelCGC< GM >::LabelType |
Definition at line 36 of file submodel2.hxx.
| typedef std::vector<LabelType> SubmodelCGC< GM >::LabelVector |
Definition at line 41 of file submodel2.hxx.
| typedef std::vector<unsigned char> SubmodelCGC< GM >::PseudoBoolVector |
Definition at line 43 of file submodel2.hxx.
| typedef GM::ValueType SubmodelCGC< GM >::ValueType |
Definition at line 34 of file submodel2.hxx.
| typedef std::vector<ValueType> SubmodelCGC< GM >::ValueVector |
Definition at line 38 of file submodel2.hxx.
| enum SubmodelCGC::Mode |
| Enumerator | |
|---|---|
| SingleSubset | |
| TwoSubsets | |
Definition at line 52 of file submodel2.hxx.
|
inline |
|
inline |
Definition at line 199 of file submodel2.hxx.
| IVPairType SubmodelCGC< GM >::infer2Subsets | ( | ARG & | globalArg, |
| const LabelType | colorCC0, | ||
| const LabelType | colorCC1, | ||
| const IndexType | viCC0, | ||
| const IndexType | viCC1, | ||
| IndexType | offset, | ||
| const bool | planar = true |
||
| ) |
globalArg: length #nodes of full model colorCC0, color of two neighboring CCs for which we want to run inference again colorCC1 offset: needed to disambiguate colors w.r.t. rest of the nodes
| SubmodelCGC<GM>::IVPairType SubmodelCGC< GM >::infer2Subsets | ( | ARG & | globalArg, |
| typename SubmodelCGC< GM >::LabelType | colorCC0, | ||
| typename SubmodelCGC< GM >::LabelType | colorCC1, | ||
| const typename SubmodelCGC< GM >::IndexType | viCC0, | ||
| const typename SubmodelCGC< GM >::IndexType | viCC1, | ||
| typename SubmodelCGC< GM >::IndexType | offset, | ||
| const bool | planar | ||
| ) |
Definition at line 306 of file submodel2.hxx.
| GM::ValueType SubmodelCGC< GM >::inferBruteForce2 | ( | ) |
Definition at line 839 of file submodel2.hxx.
| GM::ValueType SubmodelCGC< GM >::inferBruteForce4 | ( | ) |
Definition at line 870 of file submodel2.hxx.
| SubmodelCGC< GM >::ValueType SubmodelCGC< GM >::inferMulticut | ( | Mode | mode | ) |
| SubmodelCGC< GM >::ValueType SubmodelCGC< GM >::inferPlanarMaxCut | ( | ) |
Definition at line 810 of file submodel2.hxx.
| SubmodelCGC< GM >::ValueType SubmodelCGC< GM >::inferQPBOI | ( | Mode | mode | ) |
Definition at line 764 of file submodel2.hxx.
| IVPairType SubmodelCGC< GM >::inferSubset | ( | ARG & | globalArg, |
| const LabelType | colorCC, | ||
| const IndexType | viCC, | ||
| IndexType | offset, | ||
| std::deque< IndexType > & | deque, | ||
| const bool | planar, | ||
| bool | verbose = false |
||
| ) |
globalArg: length #nodes of full model colorCC: color of CC for which we want to run inference offset: needed to disambiguate colors w.r.t. rest of the nodes deque: After running infer, the region decomposes into N connected components. Then, deque.size() += N, and deque[prevSize()+i] is a representative node label of connected component i
| SubmodelCGC<GM>::IVPairType SubmodelCGC< GM >::inferSubset | ( | ARG & | globalArg, |
| typename SubmodelCGC< GM >::LabelType | colorCC, | ||
| typename SubmodelCGC< GM >::IndexType | viCC, | ||
| typename SubmodelCGC< GM >::IndexType | offset, | ||
| std::deque< typename SubmodelCGC< GM >::IndexType > & | deque, | ||
| const bool | planar, | ||
| bool | verbose | ||
| ) |
Definition at line 408 of file submodel2.hxx.
| void SubmodelCGC< GM >::setSubVarImplicit | ( | const ARG & | arg, |
| const typename SubmodelCGC< GM >::LabelType | ccColor, | ||
| const typename SubmodelCGC< GM >::IndexType | vi | ||
| ) |
Definition at line 492 of file submodel2.hxx.
| void SubmodelCGC< GM >::setSubVarImplicit | ( | const ARG & | arg, |
| const typename SubmodelCGC< GM >::LabelType | ccColor0, | ||
| const typename SubmodelCGC< GM >::LabelType | ccColor1, | ||
| const typename SubmodelCGC< GM >::IndexType | vi0, | ||
| const typename SubmodelCGC< GM >::IndexType | vi1 | ||
| ) |
Definition at line 536 of file submodel2.hxx.
| void SubmodelCGC< GM >::setSubVarImplicitBfs | ( | const ARG & | arg, |
| const typename SubmodelCGC< GM >::LabelType | ccColor, | ||
| const typename SubmodelCGC< GM >::IndexType | vi | ||
| ) |
Definition at line 513 of file submodel2.hxx.
| void SubmodelCGC< GM >::setSubVarImplicitBfs | ( | const ARG & | arg, |
| const typename SubmodelCGC< GM >::LabelType | ccColor0, | ||
| const typename SubmodelCGC< GM >::LabelType | ccColor1, | ||
| const typename SubmodelCGC< GM >::IndexType | vi0, | ||
| const typename SubmodelCGC< GM >::IndexType | vi1 | ||
| ) |
Definition at line 561 of file submodel2.hxx.
|
inline |
changes: whether, in the optimization for the current submodel, there were any changes w.r.t to the previous solution stored for the global model (this is checked by energy only! FIXME: degenerate solutions?
dirtyFactors: current dirtyness per factor (global)
This function updates dirtyFactors according to this:
Definition at line 124 of file submodel2.hxx.
1.8.9.1