#include <trws_base.hxx>
Public Types | |
typedef SubSolver::GMType | GM |
typedef GM | GraphicalModelType |
typedef SubSolver::ACCType | ACC |
typedef ACC | AccumulationType |
typedef SubSolver | SubSolverType |
typedef FunctionParameters< GM > | FactorProperties |
typedef opengm::EmptyVisitor < TRWSPrototype< SubSolverType > > | EmptyVisitorParent |
typedef VisitorWrapper < EmptyVisitorParent, TRWSPrototype< SubSolver > > | EmptyVisitorType |
typedef SubSolver::const_iterators_pair | const_marginals_iterators_pair |
typedef GM::ValueType | ValueType |
typedef GM::IndexType | IndexType |
typedef GM::LabelType | LabelType |
typedef opengm::InferenceTermination | InferenceTermination |
typedef std::vector< ValueType > | OutputContainerType |
typedef OutputContainerType::iterator | OutputIteratorType |
typedef TRWSPrototype_Parameters < ValueType > | Parameters |
typedef SequenceStorage< GM > | SubModel |
typedef DecompositionStorage< GM > | Storage |
typedef Storage::UnaryFactor | UnaryFactor |
Public Member Functions | |
TRWSPrototype (Storage &storage, const Parameters ¶ms) | |
virtual | ~TRWSPrototype () |
virtual ValueType | GetBestIntegerBound () const |
virtual ValueType | value () const |
virtual ValueType | bound () const |
virtual const std::vector < LabelType > & | arg () const |
bool | CheckDualityGap (ValueType primalBound, ValueType dualBound) |
virtual std::pair< ValueType, ValueType > | GetMarginals (IndexType variable, OutputIteratorType begin) |
void | GetMarginalsMove () |
>returns "averaged" over subsolvers marginals | |
void | BackwardMove () |
ValueType | getBound (size_t i) const |
virtual InferenceTermination | infer () |
template<class VISITOR > | |
InferenceTermination | infer (VISITOR &) |
void | ForwardMove () |
ValueType | lastDualUpdate () const |
template<class VISITOR > | |
InferenceTermination | infer_visitor_updates (VISITOR &) |
InferenceTermination | core_infer () |
const FactorProperties & | getFactorProperties () const |
Protected Member Functions | |
void | _EstimateIntegerLabeling () |
template<class VISITOR > | |
InferenceTermination | _core_infer (VISITOR &) |
virtual ValueType | _GetPrimalBound () |
virtual void | _postprocessMarginals (typename std::vector< ValueType >::iterator begin, typename std::vector< ValueType >::iterator end)=0 |
virtual void | _normalizeMarginals (typename std::vector< ValueType >::iterator begin, typename std::vector< ValueType >::iterator end, SubSolver *subSolver)=0 |
void | _EvaluateIntegerBounds () |
virtual void | _SumUpForwardMarginals (std::vector< ValueType > *pout, const_marginals_iterators_pair itpair)=0 |
void | _EstimateIntegerLabel (IndexType varId, const std::vector< ValueType > &sumMarginal) |
void | _InitSubSolvers () |
>best label index | |
void | _ForwardMove () |
void | _FinalizeMove () |
ValueType | _GetObjectiveValue () |
IndexType | _order (IndexType i) |
IndexType | _core_order (IndexType i, IndexType totalSize) |
bool | _CheckConvergence (ValueType relativeThreshold) |
virtual bool | _CheckStoppingCondition (InferenceTermination *pterminationCode) |
virtual void | _EstimateTRWSBound () |
virtual void | _InitMove ()=0 |
Protected Attributes | |
Storage & | _storage |
FactorProperties | _factorProperties |
PreviousFactorTable< GM > | _ftable |
Parameters | _parameters |
ValueType | _dualBound |
ValueType | _oldDualBound |
>current dual bound (it is improved monotonically) | |
ValueType | _lastDualUpdate |
> previous dual bound (it is improved monotonically) | |
SubModel::MoveDirection | _moveDirection |
std::vector< SubSolver * > | _subSolvers |
std::vector< std::vector < ValueType > > | _marginals |
computation optimization | |
ValueType | _integerBound |
ValueType | _bestIntegerBound |
std::vector< LabelType > | _integerLabeling |
std::vector< LabelType > | _bestIntegerLabeling |
std::vector< ValueType > | _sumMarginal |
FactorProperties::ParameterStorageType | _factorParameters |
Definition at line 186 of file trws_base.hxx.
typedef SubSolver::ACCType trws_base::TRWSPrototype< SubSolver >::ACC |
Definition at line 191 of file trws_base.hxx.
typedef ACC trws_base::TRWSPrototype< SubSolver >::AccumulationType |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 192 of file trws_base.hxx.
typedef SubSolver::const_iterators_pair trws_base::TRWSPrototype< SubSolver >::const_marginals_iterators_pair |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 198 of file trws_base.hxx.
typedef opengm::EmptyVisitor< TRWSPrototype<SubSolverType> > trws_base::TRWSPrototype< SubSolver >::EmptyVisitorParent |
Definition at line 195 of file trws_base.hxx.
typedef VisitorWrapper<EmptyVisitorParent,TRWSPrototype<SubSolver> > trws_base::TRWSPrototype< SubSolver >::EmptyVisitorType |
Reimplemented in trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 196 of file trws_base.hxx.
typedef FunctionParameters<GM> trws_base::TRWSPrototype< SubSolver >::FactorProperties |
Definition at line 194 of file trws_base.hxx.
typedef SubSolver::GMType trws_base::TRWSPrototype< SubSolver >::GM |
Definition at line 189 of file trws_base.hxx.
typedef GM trws_base::TRWSPrototype< SubSolver >::GraphicalModelType |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 190 of file trws_base.hxx.
typedef GM::IndexType trws_base::TRWSPrototype< SubSolver >::IndexType |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 200 of file trws_base.hxx.
typedef opengm::InferenceTermination trws_base::TRWSPrototype< SubSolver >::InferenceTermination |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 202 of file trws_base.hxx.
typedef GM::LabelType trws_base::TRWSPrototype< SubSolver >::LabelType |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 201 of file trws_base.hxx.
typedef std::vector<ValueType> trws_base::TRWSPrototype< SubSolver >::OutputContainerType |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 203 of file trws_base.hxx.
typedef OutputContainerType::iterator trws_base::TRWSPrototype< SubSolver >::OutputIteratorType |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >.
Definition at line 204 of file trws_base.hxx.
typedef TRWSPrototype_Parameters<ValueType> trws_base::TRWSPrototype< SubSolver >::Parameters |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 206 of file trws_base.hxx.
typedef DecompositionStorage<GM> trws_base::TRWSPrototype< SubSolver >::Storage |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 209 of file trws_base.hxx.
typedef SequenceStorage<GM> trws_base::TRWSPrototype< SubSolver >::SubModel |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 208 of file trws_base.hxx.
typedef SubSolver trws_base::TRWSPrototype< SubSolver >::SubSolverType |
Definition at line 193 of file trws_base.hxx.
typedef Storage::UnaryFactor trws_base::TRWSPrototype< SubSolver >::UnaryFactor |
Reimplemented in trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 210 of file trws_base.hxx.
typedef GM::ValueType trws_base::TRWSPrototype< SubSolver >::ValueType |
Reimplemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 199 of file trws_base.hxx.
trws_base::TRWSPrototype< SubSolver >::TRWSPrototype | ( | Storage & | storage, | |
const Parameters & | params | |||
) | [inline] |
trws_base::TRWSPrototype< SubSolver >::~TRWSPrototype | ( | ) | [inline, virtual] |
Definition at line 488 of file trws_base.hxx.
bool trws_base::TRWSPrototype< SubSolver >::_CheckConvergence | ( | ValueType | relativeThreshold | ) | [inline, protected] |
bool trws_base::TRWSPrototype< SubSolver >::_CheckStoppingCondition | ( | InferenceTermination * | pterminationCode | ) | [inline, protected, virtual] |
Reimplemented in trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 534 of file trws_base.hxx.
TRWSPrototype< SubSolver >::InferenceTermination trws_base::TRWSPrototype< SubSolver >::_core_infer | ( | VISITOR & | visitor | ) | [inline, protected] |
Definition at line 563 of file trws_base.hxx.
TRWSPrototype< SubSolver >::IndexType trws_base::TRWSPrototype< SubSolver >::_core_order | ( | IndexType | i, | |
IndexType | totalSize | |||
) | [inline, protected] |
void trws_base::TRWSPrototype< SubSolver >::_EstimateIntegerLabel | ( | IndexType | varId, | |
const std::vector< ValueType > & | sumMarginal | |||
) | [inline, protected] |
void trws_base::TRWSPrototype< SubSolver >::_EstimateIntegerLabeling | ( | ) | [inline, protected] |
Definition at line 773 of file trws_base.hxx.
virtual void trws_base::TRWSPrototype< SubSolver >::_EstimateTRWSBound | ( | ) | [inline, protected, virtual] |
Reimplemented in trws_base::MaxSumTRWS< GM, ACC >.
Definition at line 265 of file trws_base.hxx.
void trws_base::TRWSPrototype< SubSolver >::_EvaluateIntegerBounds | ( | ) | [inline, protected] |
void trws_base::TRWSPrototype< SubSolver >::_FinalizeMove | ( | ) | [inline, protected] |
Definition at line 623 of file trws_base.hxx.
void trws_base::TRWSPrototype< SubSolver >::_ForwardMove | ( | ) | [inline, protected] |
Definition at line 596 of file trws_base.hxx.
TRWSPrototype< SubSolver >::ValueType trws_base::TRWSPrototype< SubSolver >::_GetObjectiveValue | ( | ) | [inline, protected] |
virtual ValueType trws_base::TRWSPrototype< SubSolver >::_GetPrimalBound | ( | ) | [inline, protected, virtual] |
virtual void trws_base::TRWSPrototype< SubSolver >::_InitMove | ( | ) | [protected, pure virtual] |
Implemented in trws_base::SumProdTRWS< GM, ACC >, and trws_base::MaxSumTRWS< GM, ACC >.
void trws_base::TRWSPrototype< SubSolver >::_InitSubSolvers | ( | ) | [inline, protected] |
>best label index
Definition at line 494 of file trws_base.hxx.
virtual void trws_base::TRWSPrototype< SubSolver >::_normalizeMarginals | ( | typename std::vector< ValueType >::iterator | begin, | |
typename std::vector< ValueType >::iterator | end, | |||
SubSolver * | subSolver | |||
) | [protected, pure virtual] |
TRWSPrototype< SubSolver >::IndexType trws_base::TRWSPrototype< SubSolver >::_order | ( | IndexType | i | ) | [inline, protected] |
Definition at line 617 of file trws_base.hxx.
virtual void trws_base::TRWSPrototype< SubSolver >::_postprocessMarginals | ( | typename std::vector< ValueType >::iterator | begin, | |
typename std::vector< ValueType >::iterator | end | |||
) | [protected, pure virtual] |
virtual void trws_base::TRWSPrototype< SubSolver >::_SumUpForwardMarginals | ( | std::vector< ValueType > * | pout, | |
const_marginals_iterators_pair | itpair | |||
) | [protected, pure virtual] |
virtual const std::vector<LabelType>& trws_base::TRWSPrototype< SubSolver >::arg | ( | ) | const [inline, virtual] |
void trws_base::TRWSPrototype< SubSolver >::BackwardMove | ( | ) | [inline] |
Definition at line 715 of file trws_base.hxx.
virtual ValueType trws_base::TRWSPrototype< SubSolver >::bound | ( | ) | const [inline, virtual] |
bool trws_base::TRWSPrototype< SubSolver >::CheckDualityGap | ( | ValueType | primalBound, | |
ValueType | dualBound | |||
) | [inline] |
InferenceTermination trws_base::TRWSPrototype< SubSolver >::core_infer | ( | ) | [inline] |
void trws_base::TRWSPrototype< SubSolver >::ForwardMove | ( | ) | [inline] |
Definition at line 706 of file trws_base.hxx.
virtual ValueType trws_base::TRWSPrototype< SubSolver >::GetBestIntegerBound | ( | ) | const [inline, virtual] |
ValueType trws_base::TRWSPrototype< SubSolver >::getBound | ( | size_t | i | ) | const [inline] |
Definition at line 233 of file trws_base.hxx.
const FactorProperties& trws_base::TRWSPrototype< SubSolver >::getFactorProperties | ( | ) | const [inline] |
virtual std::pair<ValueType,ValueType> trws_base::TRWSPrototype< SubSolver >::GetMarginals | ( | IndexType | variable, | |
OutputIteratorType | begin | |||
) | [inline, virtual] |
Definition at line 229 of file trws_base.hxx.
void trws_base::TRWSPrototype< SubSolver >::GetMarginalsMove | ( | ) | [inline] |
>returns "averaged" over subsolvers marginals
Definition at line 604 of file trws_base.hxx.
TRWSPrototype< SubSolver >::InferenceTermination trws_base::TRWSPrototype< SubSolver >::infer | ( | VISITOR & | visitor | ) | [inline] |
virtual InferenceTermination trws_base::TRWSPrototype< SubSolver >::infer | ( | ) | [inline, virtual] |
TRWSPrototype< SubSolver >::InferenceTermination trws_base::TRWSPrototype< SubSolver >::infer_visitor_updates | ( | VISITOR & | visitor | ) | [inline] |
Definition at line 691 of file trws_base.hxx.
ValueType trws_base::TRWSPrototype< SubSolver >::lastDualUpdate | ( | ) | const [inline] |
Definition at line 237 of file trws_base.hxx.
virtual ValueType trws_base::TRWSPrototype< SubSolver >::value | ( | ) | const [inline, virtual] |
ValueType trws_base::TRWSPrototype< SubSolver >::_bestIntegerBound [protected] |
Definition at line 288 of file trws_base.hxx.
std::vector<LabelType> trws_base::TRWSPrototype< SubSolver >::_bestIntegerLabeling [protected] |
Definition at line 291 of file trws_base.hxx.
ValueType trws_base::TRWSPrototype< SubSolver >::_dualBound [protected] |
Definition at line 278 of file trws_base.hxx.
FactorProperties::ParameterStorageType trws_base::TRWSPrototype< SubSolver >::_factorParameters [mutable, protected] |
Definition at line 295 of file trws_base.hxx.
FactorProperties trws_base::TRWSPrototype< SubSolver >::_factorProperties [protected] |
Definition at line 270 of file trws_base.hxx.
PreviousFactorTable<GM> trws_base::TRWSPrototype< SubSolver >::_ftable [protected] |
Definition at line 271 of file trws_base.hxx.
ValueType trws_base::TRWSPrototype< SubSolver >::_integerBound [protected] |
Definition at line 287 of file trws_base.hxx.
std::vector<LabelType> trws_base::TRWSPrototype< SubSolver >::_integerLabeling [protected] |
Definition at line 290 of file trws_base.hxx.
ValueType trws_base::TRWSPrototype< SubSolver >::_lastDualUpdate [protected] |
> previous dual bound (it is improved monotonically)
Definition at line 280 of file trws_base.hxx.
std::vector<std::vector<ValueType> > trws_base::TRWSPrototype< SubSolver >::_marginals [protected] |
computation optimization
Definition at line 285 of file trws_base.hxx.
SubModel::MoveDirection trws_base::TRWSPrototype< SubSolver >::_moveDirection [protected] |
Definition at line 282 of file trws_base.hxx.
ValueType trws_base::TRWSPrototype< SubSolver >::_oldDualBound [protected] |
>current dual bound (it is improved monotonically)
Definition at line 279 of file trws_base.hxx.
Parameters trws_base::TRWSPrototype< SubSolver >::_parameters [protected] |
Definition at line 272 of file trws_base.hxx.
Storage& trws_base::TRWSPrototype< SubSolver >::_storage [protected] |
Definition at line 269 of file trws_base.hxx.
std::vector<SubSolver*> trws_base::TRWSPrototype< SubSolver >::_subSolvers [protected] |
Definition at line 283 of file trws_base.hxx.
std::vector<ValueType> trws_base::TRWSPrototype< SubSolver >::_sumMarginal [protected] |
Definition at line 294 of file trws_base.hxx.