#include <ChartRuleCollection.h>
Public Types | |
| typedef std::vector< ChartRule * > ::iterator | iterator |
| typedef std::vector< ChartRule * > ::const_iterator | const_iterator |
Public Member Functions | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| ChartRuleCollection () | |
| ~ChartRuleCollection () | |
| const ChartRule & | Get (size_t ind) const |
| size_t | GetSize () const |
| divide collection into 2 buckets using std::nth_element, the top & bottom according to table limit | |
| bool | IsEmpty () const |
| wether collection has any phrases | |
| void | Add (const Moses::TargetPhraseCollection &targetPhraseCollection, const WordConsumed &wordConsumed, bool ruleLimit, size_t tableLimit) |
| void | CreateChartRules (size_t ruleLimit) |
Static Public Member Functions | |
| static void | Delete (ChartRuleCollection *obj) |
Protected Attributes | |
| std::vector< ChartRule * > | m_collection |
| float | m_scoreThreshold |
Friends | |
| std::ostream & | operator<< (std::ostream &, const ChartRuleCollection &) |
| typedef std::vector<ChartRule*>::const_iterator Moses::ChartRuleCollection::const_iterator |
| typedef std::vector<ChartRule*>::iterator Moses::ChartRuleCollection::iterator |
| Moses::ChartRuleCollection::ChartRuleCollection | ( | ) |
References m_collection, and m_scoreThreshold.
| Moses::ChartRuleCollection::~ChartRuleCollection | ( | ) |
| void Moses::ChartRuleCollection::Add | ( | const Moses::TargetPhraseCollection & | targetPhraseCollection, | |
| const WordConsumed & | wordConsumed, | |||
| bool | ruleLimit, | |||
| size_t | tableLimit | |||
| ) |
References Moses::TargetPhraseCollection::begin(), Moses::TargetPhraseCollection::end(), Moses::TargetPhrase::GetFutureScore(), Moses::TargetPhraseCollection::GetSize(), m_collection, and m_scoreThreshold.
Referenced by Moses::PhraseDictionarySCFG::GetChartRuleCollection(), and Moses::PhraseDictionaryOnDisk::GetChartRuleCollection().


| const_iterator Moses::ChartRuleCollection::begin | ( | ) | const [inline] |
References m_collection.
| iterator Moses::ChartRuleCollection::begin | ( | ) | [inline] |
References m_collection.
Referenced by Moses::operator<<().

| void Moses::ChartRuleCollection::CreateChartRules | ( | size_t | ruleLimit | ) |
References Moses::ChartRule::CreateNonTermIndex(), and m_collection.
Referenced by Moses::PhraseDictionarySCFG::GetChartRuleCollection(), and Moses::PhraseDictionaryOnDisk::GetChartRuleCollection().


| static void Moses::ChartRuleCollection::Delete | ( | ChartRuleCollection * | obj | ) | [inline, static] |
| const_iterator Moses::ChartRuleCollection::end | ( | ) | const [inline] |
References m_collection.
| iterator Moses::ChartRuleCollection::end | ( | ) | [inline] |
References m_collection.
Referenced by Moses::operator<<().

| const ChartRule& Moses::ChartRuleCollection::Get | ( | size_t | ind | ) | const [inline] |
References m_collection.
| size_t Moses::ChartRuleCollection::GetSize | ( | ) | const [inline] |
divide collection into 2 buckets using std::nth_element, the top & bottom according to table limit
number of target phrases in this collection
References m_collection.
| bool Moses::ChartRuleCollection::IsEmpty | ( | ) | const [inline] |
| std::ostream& operator<< | ( | std::ostream & | out, | |
| const ChartRuleCollection & | coll | |||
| ) | [friend] |
std::vector<ChartRule*> Moses::ChartRuleCollection::m_collection [protected] |
Referenced by Add(), begin(), ChartRuleCollection(), CreateChartRules(), end(), Get(), GetSize(), IsEmpty(), and ~ChartRuleCollection().
float Moses::ChartRuleCollection::m_scoreThreshold [protected] |
Referenced by Add(), and ChartRuleCollection().
1.5.9