diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-03-10 12:12:34 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-03-10 12:12:34 +0400 |
commit | e7a2483b2296be98441a8df286612fe3f37ef613 (patch) | |
tree | 60dd9e1fc444391437237df6a68b2806d1156446 /mert/Point.h | |
parent | ed6e6f00b1b73a99d9177b984835af063ccf690f (diff) |
mert: Prefix private members with "m_" except TER.
Squashed commit of the following:
- Clean up PRO.
- Clean up ScoreStats.
- Clean up ScoreData.
- Clean up ScoreArray.
- Remove unnecessary headers.
- Clean up ScopedVector.
- Clean up Point.
- Clean up PerScorer.
- Clean up Optimizer.
- Clean up MergeScorer.
- Clean up InterpolatedScorer.
- Clean up FileStream.
- Clean up FeatureStats.
- Remove inefficient string concatenation.
- Clean up FeatureData.
- Clean up FeatureArray.
- Clean up Data.
Diffstat (limited to 'mert/Point.h')
-rw-r--r-- | mert/Point.h | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/mert/Point.h b/mert/Point.h index 5f55c7a7c..1e3a82a53 100644 --- a/mert/Point.h +++ b/mert/Point.h @@ -16,61 +16,55 @@ class Optimizer; class Point : public vector<parameter_t> { friend class Optimizer; + private: /** * The indices over which we optimize. */ - static vector<unsigned int> optindices; + static vector<unsigned int> m_opt_indices; /** - * Dimension of optindices and of the parent vector. + * Dimension of m_opt_indices and of the parent vector. */ - static unsigned int dim; + static unsigned int m_dim; /** * Fixed weights in case of partial optimzation. */ - static map<unsigned int,parameter_t> fixedweights; + static map<unsigned int,parameter_t> m_fixed_weights; /** * Total size of the parameter space; we have - * pdim = FixedWeight.size() + optinidices.size(). + * m_pdim = FixedWeight.size() + optinidices.size(). */ - static unsigned int pdim; - static unsigned int ncall; + static unsigned int m_pdim; + static unsigned int m_ncall; /** - * The limits for randomization, both vectors are of full length, pdim. + * The limits for randomization, both vectors are of full length, m_pdim. */ static vector<parameter_t> m_min; static vector<parameter_t> m_max; - statscore_t score_; + statscore_t m_score; public: - static unsigned int getdim() { - return dim; - } - static unsigned int getpdim() { - return pdim; - } - static void setpdim(size_t pd) { - pdim = pd; - } - static void setdim(size_t d) { - dim = d; - } + static unsigned int getdim() { return m_dim; } + static void setdim(size_t d) { m_dim = d; } + + static unsigned int getpdim() { return m_pdim; } + static void setpdim(size_t pd) { m_pdim = pd; } static void set_optindices(const vector<unsigned int>& indices) { - optindices = indices; + m_opt_indices = indices; } static const vector<unsigned int>& get_optindices() { - return optindices; + return m_opt_indices; } static bool OptimizeAll() { - return fixedweights.empty(); + return m_fixed_weights.empty(); } Point(); @@ -88,7 +82,7 @@ public: Point operator*(float) const; /** - * Write the Whole featureweight to a stream (ie pdim float). + * Write the Whole featureweight to a stream (ie m_pdim float). */ friend ostream& operator<<(ostream& o,const Point& P); @@ -97,16 +91,13 @@ public: void NormalizeL1(); /** - * Return a vector of size pdim where all weights have been + * Return a vector of size m_pdim where all weights have been * put (including fixed ones). */ vector<parameter_t> GetAllWeights() const; - statscore_t GetScore() const { - return score_; - } - - void SetScore(statscore_t score) { score_ = score; } + statscore_t GetScore() const { return m_score; } + void SetScore(statscore_t score) { m_score = score; } }; #endif // MERT_POINT_H |