Moses::ScoreIndexManager Class Reference

#include <ScoreIndexManager.h>

List of all members.

Public Member Functions

 ScoreIndexManager ()
void AddScoreProducer (const ScoreProducer *producer)
 new score producer to manage. Producers must be inserted in the order they are created
void InitFeatureNames ()
size_t GetBeginIndex (size_t scoreBookkeepingID) const
 starting score index for a particular score producer with scoreBookkeepingID
size_t GetEndIndex (size_t scoreBookkeepingID) const
 end score index for a particular score producer with scoreBookkeepingID
size_t GetTotalNumberOfScores () const
 sum of all score components from every score producer
void PrintLabeledScores (std::ostream &os, const ScoreComponentCollection &scc) const
 print unweighted scores of each ScoreManager to stream os
void PrintLabeledWeightedScores (std::ostream &os, const ScoreComponentCollection &scc, const std::vector< float > &weights) const
 print weighted scores of each ScoreManager to stream os
void InitWeightVectorFromFile (const std::string &fnam, std::vector< float > *m_allWeights) const

Friends

std::ostream & operator<< (std::ostream &os, const ScoreIndexManager &sim)


Detailed Description

Keep track of scores and score producers. Each score producer is reserved contiguous set of slots to put their score components. All the score components are arranged in a vector with no gaps. Only 1 ScoreIndexManager object should be instantiated

Definition at line 24 of file ScoreIndexManager.h.


Constructor & Destructor Documentation

Moses::ScoreIndexManager::ScoreIndexManager (  )  [inline]

Definition at line 28 of file ScoreIndexManager.h.


Member Function Documentation

void Moses::ScoreIndexManager::AddScoreProducer ( const ScoreProducer producer  ) 

size_t Moses::ScoreIndexManager::GetBeginIndex ( size_t  scoreBookkeepingID  )  const [inline]

size_t Moses::ScoreIndexManager::GetEndIndex ( size_t  scoreBookkeepingID  )  const [inline]

size_t Moses::ScoreIndexManager::GetTotalNumberOfScores (  )  const [inline]

sum of all score components from every score producer

Definition at line 43 of file ScoreIndexManager.h.

Referenced by Moses::StaticData::GetTotalScoreComponents(), and main().

Here is the caller graph for this function:

void Moses::ScoreIndexManager::InitFeatureNames (  ) 

Definition at line 59 of file ScoreIndexManager.cpp.

Referenced by Moses::StaticData::LoadData().

Here is the caller graph for this function:

void Moses::ScoreIndexManager::InitWeightVectorFromFile ( const std::string &  fnam,
std::vector< float > *  m_allWeights 
) const

void Moses::ScoreIndexManager::PrintLabeledScores ( std::ostream &  os,
const ScoreComponentCollection scc 
) const

print unweighted scores of each ScoreManager to stream os

Definition at line 37 of file ScoreIndexManager.cpp.

References PrintLabeledWeightedScores().

Referenced by Moses::OutputSearchNode().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::ScoreIndexManager::PrintLabeledWeightedScores ( std::ostream &  os,
const ScoreComponentCollection scc,
const std::vector< float > &  weights 
) const

print weighted scores of each ScoreManager to stream os

Definition at line 43 of file ScoreIndexManager.cpp.

References CHECK.

Referenced by PrintLabeledScores().

Here is the caller graph for this function:


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const ScoreIndexManager sim 
) [friend]

Definition at line 133 of file ScoreIndexManager.cpp.


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

Generated on Wed Feb 8 23:04:10 2012 for Moses by  doxygen 1.5.9