MosesTuning::FeatureStats Class Reference

#include <FeatureStats.h>

Collaboration diagram for MosesTuning::FeatureStats:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FeatureStats ()
 FeatureStats (const std::size_t size)
 ~FeatureStats ()
 FeatureStats (const FeatureStats &stats)
FeatureStatsoperator= (const FeatureStats &stats)
void Copy (const FeatureStats &stats)
bool isfull () const
void expand ()
void add (FeatureStatsType v)
void addSparse (const std::string &name, FeatureStatsType v)
void clear ()
void reset ()
FeatureStatsType get (std::size_t i)
FeatureStatsType get (std::size_t i) const
featstats_t getArray () const
const SparseVectorgetSparse () const
void set (std::string &theString, const SparseVector &sparseWeights)
std::size_t bytes () const
std::size_t GetArraySizeWithBytes () const
std::size_t size () const
std::size_t available () const
void savetxt (const std::string &file)
void savetxt (std::ostream *os)
void savebin (std::ostream *os)
void savetxt ()
void loadtxt (std::istream *is, const SparseVector &sparseWeights)
void loadbin (std::istream *is)

Friends

std::ostream & operator<< (std::ostream &o, const FeatureStats &e)


Detailed Description

Definition at line 67 of file FeatureStats.h.


Constructor & Destructor Documentation

MosesTuning::FeatureStats::FeatureStats (  ) 

Definition at line 195 of file FeatureStats.cpp.

MosesTuning::FeatureStats::FeatureStats ( const std::size_t  size  )  [explicit]

MosesTuning::FeatureStats::~FeatureStats (  ) 

Definition at line 206 of file FeatureStats.cpp.

MosesTuning::FeatureStats::FeatureStats ( const FeatureStats stats  ) 

Definition at line 220 of file FeatureStats.cpp.

References Copy().

Here is the call graph for this function:


Member Function Documentation

void MosesTuning::FeatureStats::add ( FeatureStatsType  v  ) 

Definition at line 241 of file FeatureStats.cpp.

References expand(), and isfull().

Here is the call graph for this function:

void MosesTuning::FeatureStats::addSparse ( const std::string &  name,
FeatureStatsType  v 
)

std::size_t MosesTuning::FeatureStats::available (  )  const [inline]

Definition at line 134 of file FeatureStats.h.

Referenced by Copy().

Here is the caller graph for this function:

std::size_t MosesTuning::FeatureStats::bytes (  )  const [inline]

Definition at line 122 of file FeatureStats.h.

References GetArraySizeWithBytes().

Here is the call graph for this function:

void MosesTuning::FeatureStats::clear (  )  [inline]

Definition at line 96 of file FeatureStats.h.

References MosesTuning::SparseVector::clear(), and GetArraySizeWithBytes().

Referenced by reset().

Here is the call graph for this function:

Here is the caller graph for this function:

void MosesTuning::FeatureStats::Copy ( const FeatureStats stats  ) 

Definition at line 211 of file FeatureStats.cpp.

References available(), getArray(), GetArraySizeWithBytes(), getSparse(), and size().

Referenced by FeatureStats(), and operator=().

Here is the call graph for this function:

Here is the caller graph for this function:

void MosesTuning::FeatureStats::expand (  ) 

Definition at line 232 of file FeatureStats.cpp.

References GetArraySizeWithBytes().

Referenced by add().

Here is the call graph for this function:

Here is the caller graph for this function:

FeatureStatsType MosesTuning::FeatureStats::get ( std::size_t  i  )  const [inline]

Definition at line 109 of file FeatureStats.h.

FeatureStatsType MosesTuning::FeatureStats::get ( std::size_t  i  )  [inline]

featstats_t MosesTuning::FeatureStats::getArray (  )  const [inline]

Definition at line 112 of file FeatureStats.h.

Referenced by Copy().

Here is the caller graph for this function:

std::size_t MosesTuning::FeatureStats::GetArraySizeWithBytes (  )  const [inline]

Definition at line 126 of file FeatureStats.h.

Referenced by bytes(), clear(), Copy(), and expand().

Here is the caller graph for this function:

const SparseVector& MosesTuning::FeatureStats::getSparse (  )  const [inline]

Definition at line 116 of file FeatureStats.h.

Referenced by Copy(), and MosesTuning::operator<<().

Here is the caller graph for this function:

bool MosesTuning::FeatureStats::isfull (  )  const [inline]

Definition at line 89 of file FeatureStats.h.

Referenced by add().

Here is the caller graph for this function:

void MosesTuning::FeatureStats::loadbin ( std::istream *  is  ) 

void MosesTuning::FeatureStats::loadtxt ( std::istream *  is,
const SparseVector sparseWeights 
)

FeatureStats & MosesTuning::FeatureStats::operator= ( const FeatureStats stats  ) 

Definition at line 225 of file FeatureStats.cpp.

References Copy().

Here is the call graph for this function:

void MosesTuning::FeatureStats::reset (  )  [inline]

Definition at line 101 of file FeatureStats.h.

References clear().

Here is the call graph for this function:

void MosesTuning::FeatureStats::savebin ( std::ostream *  os  ) 

void MosesTuning::FeatureStats::savetxt (  ) 

Definition at line 316 of file FeatureStats.cpp.

void MosesTuning::FeatureStats::savetxt ( std::ostream *  os  ) 

void MosesTuning::FeatureStats::savetxt ( const std::string &  file  ) 

void MosesTuning::FeatureStats::set ( std::string &  theString,
const SparseVector sparseWeights 
)

std::size_t MosesTuning::FeatureStats::size (  )  const [inline]

Definition at line 130 of file FeatureStats.h.

Referenced by BOOST_AUTO_TEST_CASE(), Copy(), MosesTuning::operator<<(), MosesTuning::operator==(), and MosesTuning::Data::removeDuplicates().

Here is the caller graph for this function:


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const FeatureStats e 
) [friend]

Write the whole object to a stream.


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

Generated on Thu Jul 6 00:34:15 2017 for Moses by  doxygen 1.5.9