diff options
author | Patrick Simianer <p@simianer.de> | 2014-08-05 22:46:43 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-08-05 22:46:43 +0200 |
commit | 0b3cdb4ae2fa176ba74a48ff7a1616395079c151 (patch) | |
tree | 7092a57ed7d29920df3ae2f97c39efc17c5e6095 /fast/test_sparse_vector.cc | |
parent | a27e2c529ddb7dc1be0c6bcc44e3ab558126d15d (diff) |
too much to tell
Diffstat (limited to 'fast/test_sparse_vector.cc')
-rw-r--r-- | fast/test_sparse_vector.cc | 11 |
1 files changed, 8 insertions, 3 deletions
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<string, weight_t> a; + Sv::SparseVector<string, score_t> a; a.insert("1", 1); a.insert("2", 2); cout << "a:" << a << endl; - Sv::SparseVector<string, weight_t> b; + Sv::SparseVector<string, score_t> b; b.insert("2", 2); cout << "b:" << b << endl; - Sv::SparseVector<string, weight_t> c = a + b; + Sv::SparseVector<string, score_t> 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<string, score_t>* sv = new Sv::SparseVector<string, score_t>(s); + cout << *sv << endl; + cout << sv->dot(*sv) << endl; + return 0; } |