diff options
author | jfouet <jfouet@1f5c12ca-751b-0410-a591-d2e778427230> | 2008-05-14 15:32:17 +0400 |
---|---|---|
committer | jfouet <jfouet@1f5c12ca-751b-0410-a591-d2e778427230> | 2008-05-14 15:32:17 +0400 |
commit | 43ba7835bb4a96c1886833f7804930727ef81cb8 (patch) | |
tree | 83cbbf187476aed69481c59c5385f0e162605a91 /mert/Point.h | |
parent | 36b25323c954a72a7b9b83bc6310c5f43ffa794d (diff) |
class to inplement a set of lambda parameter and their stat score
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1642 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'mert/Point.h')
-rw-r--r-- | mert/Point.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mert/Point.h b/mert/Point.h new file mode 100644 index 000000000..3d5769327 --- /dev/null +++ b/mert/Point.h @@ -0,0 +1,17 @@ +#ifndef POINT_H +#define POINT_H +#include <vector> +#include "FeatureStats.h" +typedef float lambda,statscore; + +class Point: public std::vector<lambda>{ + public: + statscore score; + Point(unsigned s):std::vector<lambda>(s,0.0){}; + Point(vector<lambda> init):vector<lambda>(init),score(numeric_limits<statscore>::max()){}; + void randomize(const std::vector<lambda>&min,const std::vector<lambda>& max); + double operator*(FeatureStats&)const;//compute the feature function + void normalize(); +}; + +#endif |