diff options
author | bhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-09-15 21:45:35 +0400 |
---|---|---|
committer | bhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230> | 2011-09-15 21:45:35 +0400 |
commit | fc695c38a750d7226dca02a6456680833369307c (patch) | |
tree | 127049d42ba08598797b82efc38495eef2e2dfe0 /mert/Point.cpp | |
parent | 1e1eb4d29e391e38da387b119234935312f21036 (diff) |
Implementation of sharding and resampling in mert.
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4226 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'mert/Point.cpp')
-rw-r--r-- | mert/Point.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mert/Point.cpp b/mert/Point.cpp index 2bb53744b..109ca954a 100644 --- a/mert/Point.cpp +++ b/mert/Point.cpp @@ -100,6 +100,15 @@ Point Point::operator+(const Point& p2)const return Res; }; +void Point::operator+=(const Point& p2) +{ + assert(p2.size()==size()); + for(unsigned i=0; i<size(); i++) + operator[](i)+=p2[i]; + score=numeric_limits<statscore_t>::max(); +}; + + Point Point::operator*(float l)const { Point Res(*this); |