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

Reordering Algorithms for Sparse Matrices?

Tags: None
(comma "," separated)
jbauer
Registered Member
Posts
25
Karma
0
Are there any reordering algorithms available for Eigen's sparse matrix classes, such as Reverse Cuthill-McKee? In Matlab, for example, one can call symrcm on a sparse matrix to obtain the permutation that gives the Reverse Cuthill-McKee ordering.

Cheers!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
We only have the "Approximate Minimum Degree" method. See http://eigen.tuxfamily.org/dox/group__O ... odule.html.
jbauer
Registered Member
Posts
25
Karma
0
Great, thank you. Is the code designed to support additional orderings? E.g. would I be able to extend the code to add a custom ordering in an Eigen-like fashion?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
yes, you can implement as many as ordering method as you want.
jbauer
Registered Member
Posts
25
Karma
0
Wonderful, thank you! Is there a way to apply a given permutation to a sparse matrix in place? I can call the following code to apply a permutation and copy it to a new matrix,
Code: Select all
( input_matrix.twistedBy( permutation.inverse() ) ).evalTo( output_matrix );

but this seems a tad ugly.


Bookmarks



Who is online

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