From 520e03c12ffb6da89a66ecf9b9e46eeb3a3c8087 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Tue, 3 May 2011 01:02:45 -0400 Subject: weight setting bug --- utils/sparse_vector.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'utils/sparse_vector.h') diff --git a/utils/sparse_vector.h b/utils/sparse_vector.h index 274220ef..e3721b50 100644 --- a/utils/sparse_vector.h +++ b/utils/sparse_vector.h @@ -54,16 +54,16 @@ SparseVector operator*(const SparseVector& a, const T& b) { return result *= b; } -template -SparseVector operator/(const SparseVector& a, const double& b) { +template +SparseVector operator/(const SparseVector& a, const S& b) { SparseVector result = a; - return result *= b; + return result /= b; } template -SparseVector operator/(const SparseVector& a, const T& b) { +SparseVector operator/(const SparseVector& a, const double& b) { SparseVector result = a; - return result *= b; + return result /= b; } #include "fdict.h" -- cgit v1.2.3