Moses::Factor Class Reference

#include <Factor.h>

Collaboration diagram for Moses::Factor:

Collaboration graph
[legend]

List of all members.

Public Member Functions

const std::string & 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
 TO_STRING ()

Friends

class FactorCollection
class 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 40 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::TerminalEqualityPred::operator()(), Moses::NonTerminalMapKeyEqualityPred::operator()(), and Moses::NonTerminalEqualityPred::operator()().

Here is the caller graph for this function:

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

const std::string& 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 45 of file Factor.h.

friend class FactorFriend [friend]

Definition at line 46 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 Wed Feb 8 08:04:09 2012 for Moses by  doxygen 1.5.9