From 0b3cdb4ae2fa176ba74a48ff7a1616395079c151 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Tue, 5 Aug 2014 22:46:43 +0200 Subject: too much to tell --- fast/test_sparse_vector.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'fast/test_sparse_vector.cc') diff --git a/fast/test_sparse_vector.cc b/fast/test_sparse_vector.cc index f486486..426bed1 100644 --- a/fast/test_sparse_vector.cc +++ b/fast/test_sparse_vector.cc @@ -4,16 +4,16 @@ int main(void) { - Sv::SparseVector a; + Sv::SparseVector a; a.insert("1", 1); a.insert("2", 2); cout << "a:" << a << endl; - Sv::SparseVector b; + Sv::SparseVector b; b.insert("2", 2); cout << "b:" << b << endl; - Sv::SparseVector c = a + b; + Sv::SparseVector c = a + b; cout << "a+b:" << c << endl; a += b; @@ -27,6 +27,11 @@ main(void) a *= 2; cout << "a*=2:" << a << endl; + string s("\"a\"=2 \"b\"=3"); + Sv::SparseVector* sv = new Sv::SparseVector(s); + cout << *sv << endl; + cout << sv->dot(*sv) << endl; + return 0; } -- cgit v1.2.3