From 5403c3cc854b061e9c5c8b3ef783b7b4d2e9387c 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') 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