Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTetsuo Kiso <tetsuo-s@is.naist.jp>2012-03-10 14:27:52 +0400
committerTetsuo Kiso <tetsuo-s@is.naist.jp>2012-03-10 14:27:52 +0400
commit0c88a1ec2e8c454ea515b3fe353bd0ca5f2010d9 (patch)
tree97d1773c05f841a6903db14b23f12b8dfa385d0d /mert/FeatureArray.h
parent3f8d8d7842f3c52cd338c19be75a9c188bae3953 (diff)
Clean up accessors and mutators.
Diffstat (limited to 'mert/FeatureArray.h')
-rw-r--r--mert/FeatureArray.h52
1 files changed, 15 insertions, 37 deletions
diff --git a/mert/FeatureArray.h b/mert/FeatureArray.h
index 1581120db..25ebbe866 100644
--- a/mert/FeatureArray.h
+++ b/mert/FeatureArray.h
@@ -35,30 +35,17 @@ public:
FeatureArray();
~FeatureArray();
- inline void clear() {
- m_array.clear();
- }
+ void clear() { m_array.clear(); }
- inline bool hasSparseFeatures() const {
- return m_sparse_flag;
- }
+ bool hasSparseFeatures() const { return m_sparse_flag; }
- inline std::string getIndex() const {
- return m_index;
- }
- inline void setIndex(const std::string& value) {
- m_index = value;
- }
+ std::string getIndex() const { return m_index; }
+ void setIndex(const std::string& value) { m_index = value; }
- inline FeatureStats& get(size_t i) {
- return m_array.at(i);
- }
- inline const FeatureStats& get(size_t i)const {
- return m_array.at(i);
- }
- void add(FeatureStats& e) {
- m_array.push_back(e);
- }
+ FeatureStats& get(size_t i) { return m_array.at(i); }
+ const FeatureStats& get(size_t i) const { return m_array.at(i); }
+
+ void add(FeatureStats& e) { m_array.push_back(e); }
//ADDED BY TS
void swap(size_t i, size_t j) {
@@ -72,26 +59,17 @@ public:
void merge(FeatureArray& e);
- inline size_t size() const {
- return m_array.size();
- }
- inline size_t NumberOfFeatures() const {
- return m_num_features;
- }
- inline void NumberOfFeatures(size_t v) {
- m_num_features = v;
- }
- inline std::string Features() const {
- return m_features;
- }
- inline void Features(const std::string& f) {
- m_features = f;
- }
+ size_t size() const { return m_array.size(); }
+
+ size_t NumberOfFeatures() const { return m_num_features; }
+ void NumberOfFeatures(size_t v) { m_num_features = v; }
+
+ std::string Features() const { return m_features; }
+ void Features(const std::string& f) { m_features = f; }
void savetxt(std::ostream* os);
void savebin(std::ostream* os);
void save(std::ostream* os, bool bin=false);
-
void save(const std::string &file, bool bin=false);
void save(bool bin=false);