igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Converting between the iGraph (edge-list) and Metis file fo


From: Gábor Csárdi
Subject: Re: [igraph] Converting between the iGraph (edge-list) and Metis file format
Date: Tue, 6 Nov 2012 10:36:37 -0500

Hi Alan,

there is nothing in igraph for this, but as you said, it is fairly simple, just use get.adjlist() to get an adjacency list and then write that to the file with cat(). Literally three lines of code.

Best, Gabor


On Tue, Nov 6, 2012 at 10:29 AM, Alan Labouseur <address@hidden> wrote:
I would like to use Metis (http://glaros.dtc.umn.edu/gkhome/views/metis) to partition iGraph graphs. Is there an existing tool to export an iGraph graph in the Metis graph file format? I didn't see anything in the help for this, and a quick look online also yielded nothing. It's a fairly simple conversion but I want to ask the community before I go and write it myself.

Thanks!

-Alan

PS: Here's the Metis format:

%  This is a sample graph from page 11 of the METIS manual.
%  The first non-comment line lists the number of vertices (7) and edges (11).
%  The next non-comment line notes that vertex 1 is connected to vertices 5, 3 and 2.
%  The next non-comment line notes that vertex 2 is connected to vertices 1, 3 and 4.
%  ... and so on.
 7 11
% The following lines: adjacencies for vertex
 5 3 2
 1 3 4
 5 4 2 1
 2 3 6 7
 1 3 6
 5 4 7
 6 4


_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



--
Gabor Csardi <address@hidden>     MTA KFKI RMKI


reply via email to

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