#include <FeatureStats.h>
Public Types | |
| typedef std::map< std::size_t, FeatureStatsType > | fvector_t |
| typedef std::map< std::string, std::size_t > | name2id_t |
| typedef std::vector< std::string > | id2name_t |
Public Member Functions | |
| FeatureStatsType | get (const std::string &name) const |
| FeatureStatsType | get (std::size_t id) const |
| void | set (const std::string &name, FeatureStatsType value) |
| void | clear () |
| std::size_t | size () const |
| void | write (std::ostream &out, const std::string &sep=" ") const |
| SparseVector & | operator-= (const SparseVector &rhs) |
| std::vector< std::size_t > | feats () const |
Static Public Member Functions | |
| static std::size_t | encode (const std::string &feat) |
| static std::string | decode (std::size_t feat) |
Friends | |
| bool | operator== (SparseVector const &item1, SparseVector const &item2) |
| std::size_t | hash_value (SparseVector const &item) |
Definition at line 20 of file FeatureStats.h.
| typedef std::map<std::size_t,FeatureStatsType> SparseVector::fvector_t |
Definition at line 22 of file FeatureStats.h.
| typedef std::vector<std::string> SparseVector::id2name_t |
Definition at line 24 of file FeatureStats.h.
| typedef std::map<std::string, std::size_t> SparseVector::name2id_t |
Definition at line 23 of file FeatureStats.h.
| void SparseVector::clear | ( | ) |
Definition at line 60 of file FeatureStats.cpp.
Referenced by FeatureStats::clear().

| std::string SparseVector::decode | ( | std::size_t | feat | ) | [static] |
Definition at line 109 of file FeatureStats.cpp.
Referenced by main().

| std::size_t SparseVector::encode | ( | const std::string & | feat | ) | [static] |
Definition at line 96 of file FeatureStats.cpp.
Referenced by main().

| std::vector< std::size_t > SparseVector::feats | ( | ) | const |
Definition at line 86 of file FeatureStats.cpp.
Referenced by MiraFeatureVector::MiraFeatureVector().

| FeatureStatsType SparseVector::get | ( | std::size_t | id | ) | const |
| FeatureStatsType SparseVector::get | ( | const std::string & | name | ) | const |
Referenced by MiraFeatureVector::MiraFeatureVector(), and operator-=().

| SparseVector & SparseVector::operator-= | ( | const SparseVector & | rhs | ) |
Definition at line 64 of file FeatureStats.cpp.
References get().

| void SparseVector::set | ( | const std::string & | name, | |
| FeatureStatsType | value | |||
| ) |
| std::size_t SparseVector::size | ( | ) | const [inline] |
Definition at line 30 of file FeatureStats.h.
| void SparseVector::write | ( | std::ostream & | out, | |
| const std::string & | sep = " " | |||
| ) | const |
| std::size_t hash_value | ( | SparseVector const & | item | ) | [friend] |
Definition at line 117 of file FeatureStats.cpp.
| bool operator== | ( | SparseVector const & | item1, | |
| SparseVector const & | item2 | |||
| ) | [friend] |
Definition at line 113 of file FeatureStats.cpp.
1.5.9