diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2011-11-17 19:58:56 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2011-11-17 19:58:56 +0400 |
commit | ba5633c7b57b8843f9befc836db78989f3d15652 (patch) | |
tree | 4342cdcbf03d6d0ae6e42a519ebb1a67ebee8746 /mert/ScoreArray.h | |
parent | 71c777f01df14c9523e20f118c90396d51678c02 (diff) | |
parent | 492fe6d97af84065fa0b4e0afa9b77a26761a11f (diff) |
Merge remote branch 'origin/master' into pro
Conflicts:
kenlm
mert/Data.cpp
mert/Data.h
mert/Makefile.am
mert/mert.cpp
Diffstat (limited to 'mert/ScoreArray.h')
-rw-r--r-- | mert/ScoreArray.h | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/mert/ScoreArray.h b/mert/ScoreArray.h index 71ea2b51a..1240a704a 100644 --- a/mert/ScoreArray.h +++ b/mert/ScoreArray.h @@ -9,21 +9,19 @@ #ifndef SCORE_ARRAY_H #define SCORE_ARRAY_H -#define SCORES_TXT_BEGIN "SCORES_TXT_BEGIN_0" -#define SCORES_TXT_END "SCORES_TXT_END_0" -#define SCORES_BIN_BEGIN "SCORES_BIN_BEGIN_0" -#define SCORES_BIN_END "SCORES_BIN_END_0" - using namespace std; -#include <limits> #include <vector> #include <iostream> -#include <fstream> +#include <string> -#include "Util.h" #include "ScoreStats.h" +const char SCORES_TXT_BEGIN[] = "SCORES_TXT_BEGIN_0"; +const char SCORES_TXT_END[] = "SCORES_TXT_END_0"; +const char SCORES_BIN_BEGIN[] = "SCORES_BIN_BEGIN_0"; +const char SCORES_BIN_END[] = "SCORES_BIN_END_0"; + class ScoreArray { protected: @@ -32,19 +30,19 @@ protected: size_t number_of_scores; private: - std::string idx; // idx to identify the utterance, it can differ from the index inside the vector - + // idx to identify the utterance. + // It can differ from the index inside the vector. + std::string idx; public: ScoreArray(); - - ~ScoreArray() {}; + ~ScoreArray() {} inline void clear() { array_.clear(); } - inline std::string getIndex() { + inline std::string getIndex() const { return idx; } inline void setIndex(const std::string& value) { @@ -68,12 +66,13 @@ public: inline std::string name() const { return score_type; - }; + } + inline void name(std::string &sctype) { score_type = sctype; - }; + } - inline size_t size() { + inline size_t size() const { return array_.size(); } inline size_t NumberOfScores() const { @@ -96,9 +95,7 @@ public: void load(ifstream& inFile); void load(const std::string &file); - bool check_consistency(); + bool check_consistency() const; }; - -#endif - +#endif // SCORE_ARRAY_H |