Re: [eigen] banded matrices in Eigen

[ Thread Index | Date Index | More Archives ]

On 13.02.2014 12:26, Laura Flores wrote:
If I could create my own class, derived from one of the existing ones
(possibly the Diagonal one?), I could add some methods that suit the
problem I am working on. Therefore, my question would be whether there are
any suggestions
for that.

Looking at the current implementation of ConjugateGradient, it would theoretically be sufficient to write a class which efficiently implements:
  VectorXd res = rhs - mat * x;
  tmp.noalias() = mat * p;

Basically, you need to make
  YourClass::operator*(const VectorType& v);
return something similar to GeneralProduct.

The same could be done for the preconditioner and

I'm afraid neither is entirely trivial, nor guaranteed to be future compatible.


Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252

Mail converted by MHonArc 2.6.19+