#include <HypothesisStack.h>
Public Types | |
typedef _HCType::iterator | iterator |
typedef _HCType::const_iterator | const_iterator |
Public Member Functions | |
HypothesisStack (Manager &manager) | |
const_iterator | begin () const |
iterators | |
const_iterator | end () const |
size_t | size () const |
virtual float | GetWorstScore () const |
virtual float | GetWorstScoreForBitmap (WordsBitmapID) |
virtual float | GetWorstScoreForBitmap (const Bitmap &) |
virtual | ~HypothesisStack () |
virtual bool | AddPrune (Hypothesis *hypothesis)=0 |
virtual const Hypothesis * | GetBestHypothesis () const =0 |
virtual std::vector< const Hypothesis * > | GetSortedList () const =0 |
virtual void | Detach (const HypothesisStack::iterator &iter) |
remove hypothesis pointed to by iterator but don't delete the object | |
virtual void | Remove (const HypothesisStack::iterator &iter) |
Protected Types | |
typedef boost::unordered_set < Hypothesis *, UnorderedComparer < Hypothesis > , UnorderedComparer < Hypothesis > > | _HCType |
Protected Attributes | |
_HCType | m_hypos |
Manager & | m_manager |
Definition at line 18 of file HypothesisStack.h.
typedef boost::unordered_set< Hypothesis*, UnorderedComparer<Hypothesis>, UnorderedComparer<Hypothesis> > Moses::HypothesisStack::_HCType [protected] |
Definition at line 22 of file HypothesisStack.h.
typedef _HCType::const_iterator Moses::HypothesisStack::const_iterator |
Definition at line 29 of file HypothesisStack.h.
typedef _HCType::iterator Moses::HypothesisStack::iterator |
Definition at line 28 of file HypothesisStack.h.
Moses::HypothesisStack::HypothesisStack | ( | Manager & | manager | ) | [inline] |
Definition at line 27 of file HypothesisStack.h.
Moses::HypothesisStack::~HypothesisStack | ( | ) | [virtual] |
Definition at line 6 of file HypothesisStack.cpp.
References m_hypos, and Remove().
virtual bool Moses::HypothesisStack::AddPrune | ( | Hypothesis * | hypothesis | ) | [pure virtual] |
Implemented in Moses::HypothesisStackCubePruning, and Moses::HypothesisStackNormal.
const_iterator Moses::HypothesisStack::begin | ( | ) | const [inline] |
iterators
Definition at line 31 of file HypothesisStack.h.
References m_hypos.
Referenced by Moses::Manager::GetConnectedGraph(), Moses::Manager::GetWinnerConnectedGraph(), Moses::Manager::GetWordGraph(), Moses::operator<<(), and Moses::SearchNormal::ProcessOneStack().
void Moses::HypothesisStack::Detach | ( | const HypothesisStack::iterator & | iter | ) | [virtual] |
remove hypothesis pointed to by iterator but don't delete the object
Remove hypothesis pointed to by iterator but don't delete the object.
Definition at line 15 of file HypothesisStack.cpp.
References m_hypos.
Referenced by Moses::HypothesisStackNormal::AddPrune(), Moses::HypothesisStackCubePruning::AddPrune(), Moses::HypothesisStackNormal::PruneToSize(), and Remove().
const_iterator Moses::HypothesisStack::end | ( | ) | const [inline] |
Definition at line 34 of file HypothesisStack.h.
References m_hypos.
Referenced by Moses::Manager::GetConnectedGraph(), Moses::Manager::GetWinnerConnectedGraph(), Moses::Manager::GetWordGraph(), Moses::operator<<(), and Moses::SearchNormal::ProcessOneStack().
virtual const Hypothesis* Moses::HypothesisStack::GetBestHypothesis | ( | ) | const [pure virtual] |
Implemented in Moses::HypothesisStackCubePruning, and Moses::HypothesisStackNormal.
Referenced by Moses::SearchCubePruning::GetBestHypothesis().
virtual std::vector<const Hypothesis*> Moses::HypothesisStack::GetSortedList | ( | ) | const [pure virtual] |
Implemented in Moses::HypothesisStackCubePruning, and Moses::HypothesisStackNormal.
virtual float Moses::HypothesisStack::GetWorstScore | ( | ) | const [inline, virtual] |
Reimplemented in Moses::HypothesisStackCubePruning, and Moses::HypothesisStackNormal.
Definition at line 40 of file HypothesisStack.h.
virtual float Moses::HypothesisStack::GetWorstScoreForBitmap | ( | const Bitmap & | ) | [inline, virtual] |
virtual float Moses::HypothesisStack::GetWorstScoreForBitmap | ( | WordsBitmapID | ) | [inline, virtual] |
void Moses::HypothesisStack::Remove | ( | const HypothesisStack::iterator & | iter | ) | [virtual] |
destroy Hypothesis pointed to by iterator (object pool version)
Definition at line 21 of file HypothesisStack.cpp.
References Detach().
Referenced by Moses::HypothesisStackNormal::AddPrune(), Moses::HypothesisStackCubePruning::AddPrune(), Moses::HypothesisStackCubePruning::PruneToSize(), Moses::HypothesisStackNormal::RemoveAll(), and ~HypothesisStack().
size_t Moses::HypothesisStack::size | ( | ) | const [inline] |
Definition at line 37 of file HypothesisStack.h.
References m_hypos.
Referenced by Moses::HypothesisStackNormal::PruneToSize(), and Moses::HypothesisStackCubePruning::PruneToSize().
_HCType Moses::HypothesisStack::m_hypos [protected] |
contains hypotheses
Definition at line 23 of file HypothesisStack.h.
Referenced by Moses::HypothesisStackNormal::Add(), Moses::HypothesisStackCubePruning::Add(), Moses::HypothesisStackCubePruning::AddHypothesesToBitmapContainers(), Moses::HypothesisStackNormal::AddPrune(), Moses::HypothesisStackCubePruning::AddPrune(), begin(), Moses::HypothesisStackNormal::CleanupArcList(), Moses::HypothesisStackCubePruning::CleanupArcList(), Detach(), end(), Moses::HypothesisStackNormal::GetBestHypothesis(), Moses::HypothesisStackCubePruning::GetBestHypothesis(), Moses::HypothesisStackNormal::GetSortedList(), Moses::HypothesisStackCubePruning::GetSortedList(), Moses::HypothesisStackNormal::GetSortedListNOTCONST(), Moses::HypothesisStackNormal::PruneToSize(), Moses::HypothesisStackCubePruning::PruneToSize(), Moses::HypothesisStackNormal::RemoveAll(), size(), and ~HypothesisStack().
Manager& Moses::HypothesisStack::m_manager [protected] |
Definition at line 24 of file HypothesisStack.h.
Referenced by Moses::HypothesisStackNormal::Add(), Moses::HypothesisStackNormal::AddPrune(), Moses::HypothesisStackCubePruning::AddPrune(), Moses::HypothesisStackNormal::CleanupArcList(), Moses::HypothesisStackCubePruning::CleanupArcList(), Moses::HypothesisStackNormal::PruneToSize(), Moses::HypothesisStackCubePruning::PruneToSize(), and Moses::HypothesisStackCubePruning::SetBitmapAccessor().