diff options
author | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-02-24 15:42:19 +0300 |
---|---|---|
committer | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-02-24 15:42:19 +0300 |
commit | 148c1e8305fbcf8dc0acd021fe5825842e0b3c8d (patch) | |
tree | 04041cbc625ff61db8d94471c6d2d1c61264f653 /mert/Point.h | |
parent | a59ad11b58acf5dd64ec6f5990bb4ef5b74ebf28 (diff) |
run beautify.perl. Consistent formatting for .h & .cpp files
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3899 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'mert/Point.h')
-rw-r--r-- | mert/Point.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/mert/Point.h b/mert/Point.h index 00dc7968f..9a4d3b5b0 100644 --- a/mert/Point.h +++ b/mert/Point.h @@ -10,9 +10,10 @@ class Optimizer; /**class that handle the subset of the Feature weight on which we run the optimization*/ -class Point:public vector<parameter_t>{ +class Point:public vector<parameter_t> +{ friend class Optimizer; - private: +private: /**The indices over which we optimize*/ static vector<unsigned int> optindices; /**dimension of optindices and of the parent vector*/ @@ -22,12 +23,18 @@ class Point:public vector<parameter_t>{ /**total size of the parameter space; we have pdim=FixedWeight.size()+optinidices.size()*/ static unsigned int pdim; static unsigned int ncall; - public: - static unsigned int getdim(){return dim;} - static unsigned int getpdim(){return pdim;} - static bool OptimizeAll(){return fixedweights.empty();}; +public: + static unsigned int getdim() { + return dim; + } + static unsigned int getpdim() { + return pdim; + } + static bool OptimizeAll() { + return fixedweights.empty(); + }; statscore_t score; - Point():vector<parameter_t>(dim){}; + Point():vector<parameter_t>(dim) {}; Point(const vector<parameter_t>& init); void Randomize(const vector<parameter_t>& min,const vector<parameter_t>& max); @@ -36,12 +43,16 @@ class Point:public vector<parameter_t>{ Point operator*(float)const; /**write the Whole featureweight to a stream (ie pdim float)*/ friend ostream& operator<<(ostream& o,const Point& P); - void Normalize(){ NormalizeL2(); }; + void Normalize() { + NormalizeL2(); + }; void NormalizeL2(); void NormalizeL1(); /**return a vector of size pdim where all weights have been put(including fixed ones)*/ vector<parameter_t> GetAllWeights()const; - statscore_t GetScore()const { return score; }; + statscore_t GetScore()const { + return score; + }; }; #endif |