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

multiply selfAdjointView

Tags: None
(comma "," separated)
trrrigo
Registered Member
Posts
13
Karma
0

multiply selfAdjointView

Fri Jul 06, 2012 11:50 am
Hi,
I'd like to multiply a symmetric matrix (using selfAdjointView<Upper>) with a matrix.
I can I do please?
Thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: multiply selfAdjointView

Fri Jul 06, 2012 11:51 am
C = A.selfadjointView<Lower>() * B;
trrrigo
Registered Member
Posts
13
Karma
0

Re: multiply selfAdjointView

Fri Jul 06, 2012 12:03 pm
thanks but sorry I wasn't clear.
I have an array double* ap which represents a symmetric matrix (as in lapack).
So I map it like this Map<SelfAdjointView<double,Upper> > apMap (t,n);
And i have a double matrix B and I want to do
C=apMap*B
is it possible? (if I write it like this it doesn't work the operator * doesn't exist...)
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: multiply selfAdjointView

Fri Jul 06, 2012 12:07 pm
is ap in a packed format? if so Eigen cannot handle it. Otherwise, you should rather do:

Map<MatrixXd> (ap,n,n).selfadjointView<Upper>() * B;
trrrigo
Registered Member
Posts
13
Karma
0

Re: multiply selfAdjointView

Fri Jul 06, 2012 12:28 pm
yes ap is in a packed format...
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: multiply selfAdjointView

Fri Jul 06, 2012 7:47 pm
The packed format is not suited for fast matrix-matrix products.


Bookmarks



Who is online

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