summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-13 02:29:49 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-13 02:29:49 +0000
commit04e9f2092b17c6732d07d15af55118aec41ef49d (patch)
treecec415cb485980de83fce06e4fca6df106449a05
parent61559eee0fcc46192a2bb3ecfcd3d4a526b6f848 (diff)
Tanimoto coeff fix
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@228 ec762483-ff6d-05da-a07a-a48fb63a330f
-rw-r--r--decoder/sparse_vector.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/sparse_vector.h b/decoder/sparse_vector.h
index bfdeebcc..6b256a8e 100644
--- a/decoder/sparse_vector.h
+++ b/decoder/sparse_vector.h
@@ -83,7 +83,7 @@ public:
template<typename S>
S tanimoto_coef(const SparseVector<S> &vec) const {
S dp=dot(vec);
- return dp/(l2norm_sq()*vec.l2norm_sq()-dp);
+ return dp/(l2norm_sq()+vec.l2norm_sq()-dp);
}
template<typename S>