Moses::Factor Class Reference

#include <Factor.h>

Collaboration diagram for Moses::Factor:

Collaboration graph

List of all members.

Public Member Functions

StringPiece GetString () const
 original string representation of the factor
size_t GetId () const
 contiguous ID
int Compare (const Factor &compare) const
bool operator< (const Factor &compare) const
 transitive comparison used for adding objects into FactorCollection
bool operator== (const Factor &compare) const


class FactorCollection
struct FactorFriend
std::ostream & operator<< (std::ostream &, const Factor &)

Detailed Description

Represents a factor (word, POS, etc). A Factor has a contiguous identifier and string value.

Definition at line 39 of file Factor.h.

Member Function Documentation

int Moses::Factor::Compare ( const Factor compare  )  const [inline]

transitive comparison between 2 factors. -1 = less than +1 = more than 0 = same

Definition at line 76 of file Factor.h.

Referenced by Moses::NonTerminalMapKeyEqualityPred::operator()(), Moses::TerminalEqualityPred::operator()(), Moses::Syntax::SymbolEqualityPred::operator()(), Moses::NonTerminalEqualityPred::operator()(), and Moses::TranslationOptionCollectionText::ViolatesXmlOptionsConstraint().

Here is the caller graph for this function:

size_t Moses::Factor::GetId (  )  const [inline]

StringPiece Moses::Factor::GetString (  )  const [inline]

bool Moses::Factor::operator< ( const Factor compare  )  const [inline]

transitive comparison used for adding objects into FactorCollection

Definition at line 84 of file Factor.h.

bool Moses::Factor::operator== ( const Factor compare  )  const [inline]

Definition at line 89 of file Factor.h.

Moses::Factor::TO_STRING (  ) 

Friends And Related Function Documentation

friend class FactorCollection [friend]

Definition at line 44 of file Factor.h.

friend struct FactorFriend [friend]

Definition at line 45 of file Factor.h.

std::ostream& operator<< ( std::ostream &  ,
const Factor  
) [friend]

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

Generated on Thu Jul 6 00:32:59 2017 for Moses by  doxygen 1.5.9