[Networkit] How to read an edge list file?

Kolja Esders kolja.esders at student.kit.edu
Fri Apr 17 02:18:33 CEST 2015


Hi Steve,

that depends on the separator you use. The following formats for edge lists
are available:

EdgeListCommaOne, EdgeListSpaceOne, EdgeListSpaceZero, EdgeListTabOne, and
EdgeListTabZero.

The succeeding "One" and "Zero" indicate whether the index of the first
node in the file is 1 or 0.

If the above formats don't work for you, there is also the possibility to
use EdgeListReader directly.
Here graphio.EdgeListReader(' ', 1).read(filepath) would be equivalent
to readGraph(filepath,
Format.EdgeListSpaceOne).

Hope this helps.

Cheers,
Kolja

On 17 April 2015 at 02:17, Kolja Es <kolja.esders at gmail.com> wrote:

> Hi Steve,
>
> that depends on the separator you use. The following formats for edge
> lists are available:
>
> EdgeListCommaOne, EdgeListSpaceOne, EdgeListSpaceZero, EdgeListTabOne,
> and EdgeListTabZero.
>
> The succeeding "One" and "Zero" indicate whether the index of the first
> node in the file is 1 or 0.
>
> If the above formats don't work for you, there is also the possibility to
> use EdgeListReader directly.
> Here graphio.EdgeListReader(' ', 1).read(filepath) would be equivalent to readGraph(filepath,
> Format.EdgeListSpaceOne).
>
> Hope this helps.
>
> Cheers,
> Kolja
>
> On 17 April 2015 at 01:41, Steve Koch <stevekochscience at gmail.com> wrote:
>
>> Hello, I am wondering what parameter should be sent to readGraph in
>> python in order to read an edge list file instead of METIS? I gather it
>> should be something like Format.??? But am unable to find it by googling.
>> Thank you!
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150417/716ff0b1/attachment.html>


More information about the NetworKit mailing list