FeatureData Class Reference

#include <FeatureData.h>

Collaboration diagram for FeatureData:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FeatureData ()
 ~FeatureData ()
void clear ()
bool hasSparseFeatures () const
FeatureArray get (const std::string &idx)
FeatureArrayget (std::size_t idx)
const FeatureArrayget (std::size_t idx) const
bool exists (const std::string &sent_idx) const
bool exists (int sent_idx) const
FeatureStatsget (std::size_t i, std::size_t j)
const FeatureStatsget (std::size_t i, std::size_t j) const
void add (FeatureArray &e)
void add (FeatureStats &e, const std::string &sent_idx)
std::size_t size () const
std::size_t NumberOfFeatures () const
void NumberOfFeatures (std::size_t v)
std::string Features () const
void Features (const std::string &f)
void save (const std::string &file, bool bin=false)
void save (std::ostream *os, bool bin=false)
void save (bool bin=false)
void load (std::istream *is)
void load (const std::string &file)
bool check_consistency () const
void setIndex ()
int getIndex (const std::string &idx) const
std::string getIndex (std::size_t idx) const
bool existsFeatureNames () const
std::string getFeatureName (std::size_t idx) const
std::size_t getFeatureIndex (const std::string &name) const
void setFeatureMap (const std::string &feat)
std::string ToString () const


Detailed Description

Definition at line 17 of file FeatureData.h.


Constructor & Destructor Documentation

FeatureData::FeatureData (  ) 

Definition at line 20 of file FeatureData.cpp.

FeatureData::~FeatureData (  )  [inline]

Definition at line 31 of file FeatureData.h.


Member Function Documentation

void FeatureData::add ( FeatureStats e,
const std::string &  sent_idx 
)

void FeatureData::add ( FeatureArray e  ) 

Definition at line 83 of file FeatureData.cpp.

References exists(), getIndex(), FeatureArray::getIndex(), and setIndex().

Here is the call graph for this function:

bool FeatureData::check_consistency (  )  const

Definition at line 113 of file FeatureData.cpp.

void FeatureData::clear (  )  [inline]

Definition at line 33 of file FeatureData.h.

bool FeatureData::exists ( int  sent_idx  )  const [inline]

Definition at line 48 of file FeatureData.h.

bool FeatureData::exists ( const std::string &  sent_idx  )  const [inline]

Definition at line 44 of file FeatureData.h.

References getIndex().

Referenced by add().

Here is the call graph for this function:

Here is the caller graph for this function:

bool FeatureData::existsFeatureNames (  )  const [inline]

Definition at line 97 of file FeatureData.h.

void FeatureData::Features ( const std::string &  f  )  [inline]

Definition at line 69 of file FeatureData.h.

std::string FeatureData::Features (  )  const [inline]

Definition at line 68 of file FeatureData.h.

Referenced by BOOST_AUTO_TEST_CASE().

Here is the caller graph for this function:

const FeatureStats& FeatureData::get ( std::size_t  i,
std::size_t  j 
) const [inline]

Definition at line 56 of file FeatureData.h.

FeatureStats& FeatureData::get ( std::size_t  i,
std::size_t  j 
) [inline]

Definition at line 52 of file FeatureData.h.

const FeatureArray& FeatureData::get ( std::size_t  idx  )  const [inline]

Definition at line 42 of file FeatureData.h.

FeatureArray& FeatureData::get ( std::size_t  idx  )  [inline]

Definition at line 41 of file FeatureData.h.

FeatureArray FeatureData::get ( const std::string &  idx  )  [inline]

Definition at line 37 of file FeatureData.h.

References getIndex().

Here is the call graph for this function:

std::size_t FeatureData::getFeatureIndex ( const std::string &  name  )  const [inline]

Definition at line 112 of file FeatureData.h.

Referenced by BOOST_AUTO_TEST_CASE().

Here is the caller graph for this function:

std::string FeatureData::getFeatureName ( std::size_t  idx  )  const [inline]

Definition at line 101 of file FeatureData.h.

Referenced by BOOST_AUTO_TEST_CASE().

Here is the caller graph for this function:

std::string FeatureData::getIndex ( std::size_t  idx  )  const [inline]

Definition at line 90 of file FeatureData.h.

int FeatureData::getIndex ( const std::string &  idx  )  const [inline]

Definition at line 82 of file FeatureData.h.

Referenced by add(), exists(), and get().

Here is the caller graph for this function:

bool FeatureData::hasSparseFeatures (  )  const [inline]

Definition at line 35 of file FeatureData.h.

void FeatureData::load ( const std::string &  file  ) 

void FeatureData::load ( std::istream *  is  ) 

void FeatureData::NumberOfFeatures ( std::size_t  v  )  [inline]

Definition at line 66 of file FeatureData.h.

std::size_t FeatureData::NumberOfFeatures (  )  const [inline]

Definition at line 65 of file FeatureData.h.

Referenced by BOOST_AUTO_TEST_CASE().

Here is the caller graph for this function:

void FeatureData::save ( bool  bin = false  ) 

Definition at line 40 of file FeatureData.cpp.

References save().

Here is the call graph for this function:

void FeatureData::save ( std::ostream *  os,
bool  bin = false 
)

void FeatureData::save ( const std::string &  file,
bool  bin = false 
)

Referenced by save().

Here is the caller graph for this function:

void FeatureData::setFeatureMap ( const std::string &  feat  ) 

Referenced by BOOST_AUTO_TEST_CASE().

Here is the caller graph for this function:

void FeatureData::setIndex (  ) 

Definition at line 124 of file FeatureData.cpp.

Referenced by add().

Here is the caller graph for this function:

std::size_t FeatureData::size (  )  const [inline]

Definition at line 63 of file FeatureData.h.

string FeatureData::ToString (  )  const

Definition at line 150 of file FeatureData.cpp.


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

Generated on Sat Jun 30 00:30:11 2012 for Moses by  doxygen 1.5.9