diff options
author | Chris Dyer <redpony@gmail.com> | 2014-06-12 23:10:00 -0400 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2014-06-12 23:10:00 -0400 |
commit | 3955a9607cf0e9722eb8ae3f14d951081df9f820 (patch) | |
tree | e59145e6d456d1ba930aac300d72c35d76689a1e /utils/sv_test.cc | |
parent | 0e2f8d3d049f06afb08b4639c6a28aa5461cdc78 (diff) |
move string_piece to utils/ from inside klm
Diffstat (limited to 'utils/sv_test.cc')
-rw-r--r-- | utils/sv_test.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/sv_test.cc b/utils/sv_test.cc index c7ac9e54..67df8c57 100644 --- a/utils/sv_test.cc +++ b/utils/sv_test.cc @@ -5,6 +5,17 @@ using namespace std; +BOOST_AUTO_TEST_CASE(Dot) { + SparseVector<double> x; + SparseVector<double> y; + x.set_value(1,0.8); + y.set_value(1,5); + x.set_value(2,-2); + y.set_value(2,1); + x.set_value(3,80); + BOOST_CHECK_CLOSE(x.dot(y), 2.0, 1e-9); +} + BOOST_AUTO_TEST_CASE(Equality) { SparseVector<double> x; SparseVector<double> y; |