Moses::TargetPhraseCollection Class Reference

a list of target phrases that is translated from the same source phrase More...

#include <TargetPhraseCollection.h>

Inheritance diagram for Moses::TargetPhraseCollection:

Inheritance graph
[legend]

List of all members.

Public Types

typedef CollType::iterator iterator
typedef CollType::const_iterator const_iterator

Public Member Functions

TargetPhrase const * operator[] (size_t const i) const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
 TargetPhraseCollection ()
 TargetPhraseCollection (const TargetPhraseCollection &copy)
virtual ~TargetPhraseCollection ()
const CollTypeGetCollection () const
void Remove (const size_t pos)
 delete an entry from the collection
const TargetPhraseGetTargetPhrase (const size_t pos) const
 return an entry of the collection
void NthElement (size_t tableLimit)
 divide collection into 2 buckets using std::nth_element, the top & bottom according to table limit
size_t GetSize () const
 number of target phrases in this collection
bool IsEmpty () const
 wether collection has any phrases
void Add (TargetPhrase *targetPhrase)
 add a new entry into collection
void Prune (bool adhereTableLimit, size_t tableLimit)
void Sort (bool adhereTableLimit, size_t tableLimit)
void Remove ()
void Detach ()

Protected Types

typedef std::vector< const
TargetPhrase * > 
CollType

Protected Attributes

CollType m_collection

Friends

std::ostream & operator<< (std::ostream &, const TargetPhraseCollection &)


Detailed Description

a list of target phrases that is translated from the same source phrase

Definition at line 34 of file TargetPhraseCollection.h.


Member Typedef Documentation

typedef std::vector<const TargetPhrase*> Moses::TargetPhraseCollection::CollType [protected]

Definition at line 39 of file TargetPhraseCollection.h.

typedef CollType::const_iterator Moses::TargetPhraseCollection::const_iterator

Definition at line 45 of file TargetPhraseCollection.h.

typedef CollType::iterator Moses::TargetPhraseCollection::iterator

Definition at line 44 of file TargetPhraseCollection.h.


Constructor & Destructor Documentation

Moses::TargetPhraseCollection::TargetPhraseCollection (  )  [inline]

Definition at line 65 of file TargetPhraseCollection.h.

Moses::TargetPhraseCollection::TargetPhraseCollection ( const TargetPhraseCollection copy  ) 

Definition at line 46 of file TargetPhraseCollection.cpp.

References Add(), begin(), and end().

Here is the call graph for this function:

virtual Moses::TargetPhraseCollection::~TargetPhraseCollection (  )  [inline, virtual]

Definition at line 70 of file TargetPhraseCollection.h.

References Remove().

Here is the call graph for this function:


Member Function Documentation

void Moses::TargetPhraseCollection::Add ( TargetPhrase targetPhrase  )  [inline]

const_iterator Moses::TargetPhraseCollection::begin (  )  const [inline]

Definition at line 58 of file TargetPhraseCollection.h.

References m_collection.

iterator Moses::TargetPhraseCollection::begin (  )  [inline]

void Moses::TargetPhraseCollection::Detach (  )  [inline]

Definition at line 112 of file TargetPhraseCollection.h.

References m_collection.

const_iterator Moses::TargetPhraseCollection::end (  )  const [inline]

Definition at line 61 of file TargetPhraseCollection.h.

References m_collection.

iterator Moses::TargetPhraseCollection::end (  )  [inline]

const CollType& Moses::TargetPhraseCollection::GetCollection (  )  const [inline]

Definition at line 74 of file TargetPhraseCollection.h.

References m_collection.

size_t Moses::TargetPhraseCollection::GetSize (  )  const [inline]

const TargetPhrase* Moses::TargetPhraseCollection::GetTargetPhrase ( const size_t  pos  )  const [inline]

return an entry of the collection

Definition at line 86 of file TargetPhraseCollection.h.

References m_collection.

Referenced by Moses::PhraseDictionaryDynamicCacheBased::ClearEntries(), Moses::PhraseDictionaryDynamicCacheBased::Decay(), and Moses::PhraseDictionaryDynamicCacheBased::Update().

Here is the caller graph for this function:

bool Moses::TargetPhraseCollection::IsEmpty (  )  const [inline]

void Moses::TargetPhraseCollection::NthElement ( size_t  tableLimit  ) 

TargetPhrase const* Moses::TargetPhraseCollection::operator[] ( size_t const   i  )  const [inline]

Definition at line 48 of file TargetPhraseCollection.h.

References m_collection.

void Moses::TargetPhraseCollection::Prune ( bool  adhereTableLimit,
size_t  tableLimit 
)

void Moses::TargetPhraseCollection::Remove (  )  [inline]

Definition at line 109 of file TargetPhraseCollection.h.

References m_collection, and Moses::RemoveAllInColl().

Referenced by ~TargetPhraseCollection().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::TargetPhraseCollection::Remove ( const size_t  pos  )  [inline]

delete an entry from the collection

Definition at line 79 of file TargetPhraseCollection.h.

References begin(), and m_collection.

Referenced by Moses::PhraseDictionaryDynamicCacheBased::ClearEntries(), Moses::PhraseDictionaryDynamicCacheBased::Decay(), and Moses::PhraseDictionaryNodeMemory::Remove().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::TargetPhraseCollection::Sort ( bool  adhereTableLimit,
size_t  tableLimit 
)


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const TargetPhraseCollection obj 
) [friend]

Definition at line 96 of file TargetPhraseCollection.cpp.


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on Thu Jul 2 00:33:36 2015 for Moses by  doxygen 1.5.9