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

Implementation of SparseMatrix class

Tags: None
(comma "," separated)
matthiasl
Registered Member
Posts
1
Karma
0
Hey,
I was studying the implementation of the SparseMatrix class and its related classes (SparseMatrixBase, CompressedStorage, etc.).
There is one thing I don't understand yet:

The specialized struct traits<SparseMatrix<_Scalar, _Options, _Index> > is defined in the SparseMatrix header file. However, it is used in the implementation of SparseMatrixBase.

When I implement a similar example I get an error: implicit instantiation of undefined template.

Did I overlook something?

Thanks.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
struct traits is declared in Core/util/ForwardDeclarations.h, so it is known in advance when parsing SparseMatrixBase. Then the specialization of traits for SparseMatrix is parsed, and so it is known when instantiating SparseMatrixBase.


Bookmarks



Who is online

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