summaryrefslogtreecommitdiff
path: root/dtrain/score.h
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2011-08-29 22:02:45 +0200
committerPatrick Simianer <p@simianer.de>2011-09-23 19:13:58 +0200
commitaceb387526478e34e41db6c046f707234953e0b5 (patch)
tree3cb19b9f1c3390d52c4a732e22a3b31b52e4f483 /dtrain/score.h
parent2001f2c1c96049b78f9aa5aaa05aeca26e3fc55a (diff)
big update: working iterating, pretty output, test scripts and more
Diffstat (limited to 'dtrain/score.h')
-rw-r--r--dtrain/score.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/dtrain/score.h b/dtrain/score.h
index e9130e18..4314157b 100644
--- a/dtrain/score.h
+++ b/dtrain/score.h
@@ -29,6 +29,7 @@ struct ScorePair
double GetScore() { return score_; }
};
+
typedef vector<ScorePair> Scores;
@@ -55,6 +56,14 @@ struct NgramCounts
}
}
+ const NgramCounts
+ operator+( const NgramCounts &other ) const
+ {
+ NgramCounts result = *this;
+ result += other;
+ return result;
+ }
+
void
add( size_t count, size_t ref_count, size_t i )
{