#include <FeatureStats.h>
Public Member Functions | |
FeatureStats () | |
FeatureStats (const std::size_t size) | |
~FeatureStats () | |
FeatureStats (const FeatureStats &stats) | |
FeatureStats & | operator= (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 SparseVector & | getSparse () 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) |
Definition at line 67 of file FeatureStats.h.
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().
void MosesTuning::FeatureStats::add | ( | FeatureStatsType | v | ) |
Definition at line 241 of file FeatureStats.cpp.
References expand(), and isfull().
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().
std::size_t MosesTuning::FeatureStats::bytes | ( | ) | const [inline] |
Definition at line 122 of file FeatureStats.h.
References GetArraySizeWithBytes().
void MosesTuning::FeatureStats::clear | ( | ) | [inline] |
Definition at line 96 of file FeatureStats.h.
References MosesTuning::SparseVector::clear(), and GetArraySizeWithBytes().
Referenced by reset().
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=().
void MosesTuning::FeatureStats::expand | ( | ) |
Definition at line 232 of file FeatureStats.cpp.
References GetArraySizeWithBytes().
Referenced by add().
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] |
Definition at line 106 of file FeatureStats.h.
Referenced by BOOST_AUTO_TEST_CASE(), MosesTuning::Point::operator*(), MosesTuning::operator<<(), MosesTuning::operator==(), and MosesTuning::Data::removeDuplicates().
featstats_t MosesTuning::FeatureStats::getArray | ( | ) | const [inline] |
Definition at line 112 of file FeatureStats.h.
Referenced by Copy().
std::size_t MosesTuning::FeatureStats::GetArraySizeWithBytes | ( | ) | const [inline] |
const SparseVector& MosesTuning::FeatureStats::getSparse | ( | ) | const [inline] |
Definition at line 116 of file FeatureStats.h.
Referenced by Copy(), and MosesTuning::operator<<().
bool MosesTuning::FeatureStats::isfull | ( | ) | const [inline] |
Definition at line 89 of file FeatureStats.h.
Referenced by add().
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().
void MosesTuning::FeatureStats::reset | ( | ) | [inline] |
Definition at line 101 of file FeatureStats.h.
References clear().
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().
std::ostream& operator<< | ( | std::ostream & | o, | |
const FeatureStats & | e | |||
) | [friend] |
Write the whole object to a stream.