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

confusing documentation for the SelfAdjointEigenSolver

Tags: None
(comma "," separated)
ufom
Registered Member
Posts
1
Karma
0
I use the SelfAdjointEigenSolver for rather large dynamic-size matrices. The documentation states that in this case the constructor SelfAdjointEigenSolver ( Index size ) is useful. However, this is the point, where the documentation becomes confusing, since "size" is called a positive integer being the size of the matrix.

Intuitively, I assumed that size = N*N, where N is the number of rows and cols, respectively. This assumption is, in my opinion, also supported by the definition of the size() member function of the matrix class, which returns the product of the number of rows and columns: rows()*cols().

However, looking at the code, it rather seems that size should be the number of rows (or columns): size = N.

In my case, this missunderstanding caused a "std::bad_alloc", because I ran out of memory while allocating.

In order to prevent other users from this error, maybe the documentation could be made more specific on how "size" has to be understood in this case.

Thank you
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
thanks for the feedback, we'll try to clarify this in the doc.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]