igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Eigenpairs of sparse graphs


From: Tamas Nepusz
Subject: Re: [igraph] Eigenpairs of sparse graphs
Date: Sun, 9 Mar 2008 21:38:36 +0100

Hi,

I need to compute some extremal eigenvalues/eigenvectors of
adjacency and Laplacian matrices for very large and sparse graphs.
(to large for the matrices to be represented in their dense form anyway).

Given the graphs, how can I achieve this task with igraph?
igraph includes an interface to the ARPACK library suitable for solving large scale eigenvalue problems. See the following page in the documentation for details:

http://cneurocvs.rmki.kfki.hu/igraph/doc/html/ch19s01.html

So you should import your graph somehow into igraph (using the C core directly), initialize an igraph_arpack_options_t data structure, set its options appropriately for your specific problem, implement an igraph_arpack_function_t function that multiplies a given vector with your matrix (chances are that you'll have to use an adjacency list representation of your graph, see http://cneurocvs.rmki.kfki.hu/igraph/doc/html/igraph-Adjlists.html) , and finally call igraph_arpack_rssolve if your matrix is symmetric, igraph_arpack_rnsolve otherwise.

If you need examples, check the code for PageRank calculation or eigenvector centrality in centrality.c in the igraph source code.

I hope this helps.

Regards,
--
T.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]