diff options
author | jfouet <jfouet@1f5c12ca-751b-0410-a591-d2e778427230> | 2008-05-16 14:57:24 +0400 |
---|---|---|
committer | jfouet <jfouet@1f5c12ca-751b-0410-a591-d2e778427230> | 2008-05-16 14:57:24 +0400 |
commit | e9df80a05c442b8b22aad79206872b90ab8c97c1 (patch) | |
tree | 74ddf98cf565dad31ef72c7f2219ae795c4d08d6 /mert/Point.h | |
parent | bb42cb0dd591fa91d3ae63a2380a1ba6caed83a2 (diff) |
bugfixes
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1726 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'mert/Point.h')
-rw-r--r-- | mert/Point.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mert/Point.h b/mert/Point.h index 150ae10b7..e7f48d897 100644 --- a/mert/Point.h +++ b/mert/Point.h @@ -10,7 +10,7 @@ class Optimizer; /**class that handle the subset of the Feature weight on which we run the optimization*/ -class Point:public parameters_t{ +class Point:public vector<parameter_t>{ friend class Optimizer; private: /**The indices over which we optimize*/ @@ -27,9 +27,9 @@ class Point:public parameters_t{ static unsigned getpdim(){return pdim;} static bool OptimizeAll(){return fixedweights.empty();}; statscore_t score; - Point():parameters_t(dim){}; - Point(parameters_t init):parameters_t(init){assert(init.size()==dim);}; - void Randomize(const parameters_t& min,const parameters_t& max); + Point():vector<parameter_t>(dim){}; + Point(const vector<parameter_t>& init); + void Randomize(const vector<parameter_t>& min,const vector<parameter_t>& max); double operator*(const FeatureStats&)const;//compute the feature function Point operator+(const Point&)const; @@ -37,8 +37,8 @@ class Point:public parameters_t{ /**write the Whole featureweight to a stream (ie pdim float)*/ friend ostream& operator<<(ostream& o,const Point& P); void Normalize(); - /**return a vector of size pdim where all weights have been put*/ - parameters_t GetAllWeights()const; + /**return a vector of size pdim where all weights have been put(including fixed ones)*/ + vector<parameter_t> GetAllWeights()const; }; #endif |