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

Custom Matrix in Eigen

Tags: None
(comma "," separated)
davidhigh
Registered Member
Posts
18
Karma
0

Custom Matrix in Eigen

Sun Feb 16, 2014 10:21 pm
Hi,

is it possible to construct a custom matrix in Eigen? The matrix has the following form:

Code: Select all
x x x
x x x
x x x x x x
    x x x x
    x x x x
    x x x x x x
          x x x
          x x x


I.e,, it consists of block matrices of variable size which overlap at one element. I have written an own class in which the matrix is set up as a vector of Eigen matrices (representing the block matrices), whereas the matrix product is performed block-wise (this is not highly efficient but it works).

Is it possible to transform this class into a "real" Eigen matrix, e.g., by inheriting from matrix base or whatever?

Thanks in advance,
David
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Custom Matrix in Eigen

Mon Feb 17, 2014 9:19 am
that depends on the amount of compatibility you're looking for. The minimal would probably to inherit SparseMatrixBase and implement an InnerIterator.


Bookmarks



Who is online

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