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

#include <trws_subproblemsolver.hxx>

+ Inheritance diagram for opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >:
+ Collaboration diagram for opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >:

Public Types

typedef DynamicProgramming< GM, ACC, InputIterator > parent
 
typedef parent::ValueType ValueType
 
typedef parent::IndexType IndexType
 
typedef parent::LabelType LabelType
 
typedef parent::InputIteratorType InputIteratorType
 
typedef std::vector< LabelTypeLabelingType
 
typedef parent::UnaryFactor UnaryFactor
 
typedef parent::Factor Factor
 
typedef parent::FactorProperties FactorProperties
 
- Public Types inherited from opengm::trws_base::DynamicProgramming< GM, ACC, InputIterator >
typedef GM GMType
 
typedef ACC ACCType
 
typedef GM::ValueType ValueType
 
typedef GM::IndexType IndexType
 
typedef GM::LabelType LabelType
 
typedef InputIterator InputIteratorType
 
typedef SequenceStorage< GM > Storage
 
typedef Storage::IndexList IndexList
 
typedef Storage::UnaryFactor UnaryFactor
 
typedef Storage::MoveDirection MoveDirection
 
typedef std::vector< IndexListIndexTable
 
typedef FunctionParameters< GM > FactorProperties
 
typedef UnaryFactor::const_iterator ConstIterator
 
typedef GM::FactorType Factor
 
typedef std::pair< typename UnaryFactor::const_iterator, typename UnaryFactor::const_iterator > const_iterators_pair
 

Public Member Functions

 MaxSumSolver (typename parent::Storage &storage, const FactorProperties &factorProperties, bool fastComputations=true)
 
ValueType ComputeObjectiveValue ()
 
const LabelingTypearg ()
 
void FinalizeMove ()
 
- Public Member Functions inherited from opengm::trws_base::DynamicProgramming< GM, ACC, InputIterator >
 DynamicProgramming (Storage &storage, const FactorProperties &factorProperties, bool fastComputations=true)
 
virtual ~DynamicProgramming ()
 
void InitMove ()
 
void InitMove (MoveDirection movedirection)
 
virtual void InitReverseMove ()
 
virtual void Move ()
 >initializes move, which is reverse to the current one//TODO: remove virtual ? More...
 
virtual void PushBack ()
 
virtual void MoveBack ()
 
const_iterators_pair GetMarginals () const
 
const_iterators_pair GetMarginals (IndexType indx) const
 
ValueType GetObjectiveValue () const
 
virtual void IncreaseUnaryWeights (InputIteratorType begin, InputIteratorType end)
 
LabelType numOfLabels () const
 
virtual void UpdateMarginals ()
 
virtual IndexType getNextPWId () const
 

updates marginals in the current node so, that they correspond to the forward (backward) accumulated probabilities of labels

More...
 
virtual IndexType getPrevPWId () const
 

returns an external (_gm[.]) pairwise index, which follows the current variable. For the last variable this::NaN is returned

More...
 
MoveDirection getMoveDirection () const
 

returns an external (_gm[.]) pairwise index, which is in front of the current variable. For the first variable this::NaN is returned

More...
 
IndexType size () const
 
template<class ITERATOR >
ValueType evaluate (ITERATOR labeling)
 
void SetFastComputation (bool fc)
 

Protected Member Functions

void _Push ()
 
void _SumUpBackwardEdges (UnaryFactor *u, LabelType fixedLabel) const
 
void _EstimateOptimalLabeling ()
 
- Protected Member Functions inherited from opengm::trws_base::DynamicProgramming< GM, ACC, InputIterator >
void _PottsUnaryTransform (LabelType newSize, const typename FactorProperties::ParameterStorageType &params)
 
void _InitReverseMoveBack ()
 
void _InitMove (ValueType rho, MoveDirection movedirection)
 >initializes move, which is reverse to the current one More...
 
void _core_InitMoves (ValueType rho, MoveDirection movedirection)
 
void _PushMessagesToFactor ()
 
void _ClearMessages (UnaryFactor *pbuffer=0)
 
virtual void _makeLocalCopyOfPWFactor (LabelType trgsize)
 
void _SumUpBufferToMarginals ()
 
virtual void _BackUpForwardMarginals ()
 
virtual void _InitCurrentUnaryBuffer (IndexType index)
 
IndexType _core_next (IndexType begin, MoveDirection dir) const
 
IndexType _next (IndexType begin) const
 
IndexType _previous (IndexType begin) const
 
IndexType _nextPWIndex () const
 

Protected Attributes

LabelingType _labeling
 
UnaryFactor _marginalsTemp
 
- Protected Attributes inherited from opengm::trws_base::DynamicProgramming< GM, ACC, InputIterator >
bool _fastComputation
 
Storage_storage
 
const FactorProperties_factorProperties
 
std::vector< UnaryFactor_marginals
 
ValueType _objectiveValue
 
ValueType _rho
 
MoveDirection _moveDirection
 
bool _bInitializationNeeded
 
UnaryFactor _currentPWFactor
 
UnaryFactor _currentUnaryFactor
 
IndexType _currentUnaryIndex
 
UnaryFactor _unaryTemp
 
Pseudo2DArray< ValueType_spst
 

Additional Inherited Members

- Static Public Attributes inherited from opengm::trws_base::DynamicProgramming< GM, ACC, InputIterator >
static const IndexType NaN =std::numeric_limits<IndexType>::max()
 

Detailed Description

template<class GM, class ACC, class InputIterator>
class opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >

Definition at line 308 of file trws_subproblemsolver.hxx.

Member Typedef Documentation

template<class GM, class ACC, class InputIterator>
typedef parent::Factor opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::Factor

Definition at line 318 of file trws_subproblemsolver.hxx.

template<class GM, class ACC, class InputIterator>
typedef parent::FactorProperties opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::FactorProperties

Definition at line 319 of file trws_subproblemsolver.hxx.

template<class GM, class ACC, class InputIterator>
typedef parent::IndexType opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::IndexType

Definition at line 313 of file trws_subproblemsolver.hxx.

template<class GM, class ACC, class InputIterator>
typedef parent::InputIteratorType opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::InputIteratorType

Definition at line 315 of file trws_subproblemsolver.hxx.

template<class GM, class ACC, class InputIterator>
typedef std::vector<LabelType> opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::LabelingType

Definition at line 316 of file trws_subproblemsolver.hxx.

template<class GM, class ACC, class InputIterator>
typedef parent::LabelType opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::LabelType

Definition at line 314 of file trws_subproblemsolver.hxx.

template<class GM, class ACC, class InputIterator>
typedef DynamicProgramming<GM,ACC,InputIterator> opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::parent

Definition at line 311 of file trws_subproblemsolver.hxx.

template<class GM, class ACC, class InputIterator>
typedef parent::UnaryFactor opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::UnaryFactor

Definition at line 317 of file trws_subproblemsolver.hxx.

template<class GM, class ACC, class InputIterator>
typedef parent::ValueType opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::ValueType

Definition at line 312 of file trws_subproblemsolver.hxx.

Constructor & Destructor Documentation

template<class GM, class ACC, class InputIterator>
opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::MaxSumSolver ( typename parent::Storage storage,
const FactorProperties factorProperties,
bool  fastComputations = true 
)
inline

Definition at line 322 of file trws_subproblemsolver.hxx.

Member Function Documentation

template<class GM , class ACC , class InputIterator >
void opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::_EstimateOptimalLabeling ( )
protected

Definition at line 351 of file trws_subproblemsolver.hxx.

template<class GM , class ACC , class InputIterator >
void opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::_Push ( )
protectedvirtual
template<class GM , class ACC , class InputIterator >
void opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::_SumUpBackwardEdges ( UnaryFactor u,
LabelType  fixedLabel 
) const
protected

Definition at line 968 of file trws_subproblemsolver.hxx.

template<class GM, class ACC, class InputIterator>
const LabelingType& opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::arg ( )
inline

Definition at line 337 of file trws_subproblemsolver.hxx.

template<class GM , class ACC , class InputIterator >
MaxSumSolver< GM, ACC, InputIterator >::ValueType opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::ComputeObjectiveValue ( )
virtual
template<class GM , class ACC , class InputIterator >
void opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::FinalizeMove ( )
virtual

Member Data Documentation

template<class GM, class ACC, class InputIterator>
LabelingType opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::_labeling
protected

Definition at line 345 of file trws_subproblemsolver.hxx.

template<class GM, class ACC, class InputIterator>
UnaryFactor opengm::trws_base::MaxSumSolver< GM, ACC, InputIterator >::_marginalsTemp
mutableprotected

Definition at line 346 of file trws_subproblemsolver.hxx.