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

matrix minor

Tags: None
(comma "," separated)
filiatra
Registered Member
Posts
1
Karma
0

matrix minor

Tue Sep 24, 2013 3:06 pm
Hello,

What is the analog of eigen v2

.minor(i,j)

in eigen v3 ?

I would like to retrieve the minor of a matrix , but I don't want to enable v2 support just to use this...

Excuse me in advance if this is answered somewhere, I was not able to find it!
thnx
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: matrix minor

Wed Oct 02, 2013 9:54 pm
This feature has been removed because it is rather slow with expression templates.
ibell
Registered Member
Posts
2
Karma
0

Re: matrix minor

Sat Jun 06, 2015 3:11 am
It's a pity that minors were removed. My preference would be to leave it with a warning about speed (or lack thereof). How do you know how important the speed of the minor is in the overall algorithm? In my case, I have to implement Minors myself and the matrix part is maybe 0.001% of the overall runtime.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: matrix minor

Tue Jun 09, 2015 12:38 pm
Actually, with the evaluator mechanism of the next 3.3 version, minor could be implemented more efficiently, so we could probably resurrect it.

Note that in the 2.x version, minor compiled to something like:
Code: Select all
// loop over the minor mi,mj of mat:
for(i=0;i<rows-1;++i)
  for(j=0;j<cols-1;++j)
    double coeff_ij = mat(i<mi?i:i+1, j<mj?j:j+j);
    // do something with coeff_if

which is pretty bad because of the branches in the most nested loop. Of course, if you run a O(n^3) computation on the minor with n large enough, then you clearly don't care about this "minor" performance penalty.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS


Bookmarks



Who is online

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