This forum has been archived. All content is frozen. Please use KDE Discuss instead.

DynamicSparse index assertion

Tags: None
(comma "," separated)
baltcode
Registered Member
Posts
12
Karma
0

DynamicSparse index assertion

Sun Jan 24, 2010 10:58 am
Currently, DynamicSparseMatrix allows us to write to a coefficient outside the range, and leads to an unhelpful error later.

eg:
Code: Select all
DynamicSparseMatrix<float> A(5,5);
A.coeffRef(10,4) = 1;
cout << "A = "<<A<<"\n";

This leads to an error in the cout statement. Now, either A should reject the assignment, or change its dimension. The former would be better than the latter, I think.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]