[Networkit] R: Re: Edgelist of Directed graph (Damiano Rossato)

Maximilian Vogel maximilian.vogel at student.kit.edu
Wed Mar 4 16:39:54 CET 2015


Hi Damiano,

as soon as you use the generic EdgeList format, you need specify a 
separator and the id of the first node, e.g. like this:
G = readGraph(path,Format.EdgeList,separator=' ',firstNode=1,directed=True)
if you want to read a space seperated edge list in which the node ids 
start with 1.

It should be possible to adapt the function that Format.EdgeList* can be 
used with directed=True, but for now you should use the above described 
solution.

Max


On 04.03.2015 16:24, Damiano Rossato wrote:
> Hi,
>
> I've just update to the latest development version 
> (NetworKit-34c64eb0dc92) but when I run the following istruction
>
> Graph = readGraph(path, Format.EdgeList, directed=True)
>
> returns "*Exception: unrecognized format/format not supported as 
> input: Format.EdgeList*".
> I don't know what I'm doing wrong.
>
> Damiano
>
>     ----Messaggio originale----
>     Da: michael.hamann at kit.edu
>     Data: 4-mar-2015 13.16
>     A: <networkit at ira.uni-karlsruhe.de>, "Damiano
>     Rossato"<damiano_rossato at alice.it>
>     Ogg: Re: [Networkit] Edgelist of Directed graph (Damiano Rossato)
>
>     Hi,
>
>     if you pass parameters like "directed" to readGraph, the format
>     must be
>     Format.EdgeList (i.e. not Format.EdgeListTabZero etc.). If you do
>     this, it
>     should work at least with continuous node ids. If you set
>     continuous to False,
>     it was broken in the current version but I've just fixed this so
>     you should
>     update to the latest development version in this case.
>
>     Michael
>
>     On Wednesday 04 March 2015 12:06:56, Damiano Rossato wrote:
>     > Hello,
>     >
>     > I'm using the Python version of NetworKit (3.4.1-Dev) and I
>     >  tried to use readGraph with parameter directed=True, but it
>     seems not
>     > to work.
>     > In fact the number of edges remains the same compared to case with
>     > directed=False. Some one can help me?!
>     >
>     > Best Regards
>     >
>     > Damiano Rossato
>     >
>     >
>     >
>     >
>     > ----Messaggio originale----
>     > Da: networkit-request at ira.uni-karlsruhe.de
>     > Data: 3-gen-2015 12.00
>     > A: <networkit at ira.uni-karlsruhe.de>
>     > Ogg: NetworKit Digest, Vol 15, Issue 1
>     >
>     > Send NetworKit mailing list submissions to
>     > networkit at ira.uni-karlsruhe.de
>     >
>     > To subscribe or unsubscribe via the World Wide Web, visit
>     > https://lists.ira.uni-karlsruhe.de/mailman/listinfo/networkit
>     > or, via email, send a message with subject or body 'help' to
>     > networkit-request at ira.uni-karlsruhe.de
>     >
>     > You can reach the person managing the list at
>     > networkit-owner at ira.uni-karlsruhe.de
>     >
>     > When replying, please edit your Subject line so it is more specific
>     > than "Re: Contents of NetworKit digest..."
>     >
>     >
>     > Today's Topics:
>     >
>     >    1. Edgelist of Directed graph (Lorenzo Severini)
>     >    2. Re: Edgelist of Directed graph (Henning Meyerhenke)
>     >
>     >
>     >
>     ----------------------------------------------------------------------
>     >
>     > Message: 1
>     > Date: Fri, 02 Jan 2015 12:01:04 +0100
>     > From: Lorenzo Severini <lorenzo.severini at gssi.infn.it>
>     > To: NetworKit at ira.uni-karlsruhe.de
>     > Subject: [Networkit] Edgelist of Directed graph
>     > Message-ID: <54A67A70.5040603 at gssi.infn.it>
>     > Content-Type: text/plain; charset="iso-8859-15"; Format="flowed"
>     >
>     > Hello,
>     >
>     > I'm just started using NetworKit (I'm using the C++ version) and
>     I think
>     > it is a very interesting project.
>     >
>     > I do not understand how to read _*directed*_ graph represented by
>     > edgelists (it seems to me that the EdgeListReader function
>     considers all
>     > graphs undirected)
>     >
>     > Can you explain me how to read directed graphs in C++?
>     >
>     > Best Regards
>     >
>     > Lorenzo Severini
>     >
>     > > Hello,
>     > >
>     > > I'm just started using NetworKit (I'm using the C++ version)
>     and I think
>     > > it is a very interesting project.
>     > >
>     > > I do not understand how to read _*directed*_ graph represented by
>     > > edgelists (it seems to me that the EdgeListReader function
>     considers all
>     > > graphs undirected)
>     > >
>     > > Can you explain me how to read directed graphs in C++?
>     > >
>     > > Best Regards
>     > >
>     > > Lorenzo Severini
>     > >
>     > > --
>     > > Lorenzo Severini
>     > >
>     > > PhD Student in Computer Science
>     > >
>     > > Gran Sasso Science Institute
>     > > L'Aquila (AQ) - Italy
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150304/72906dd7/attachment-0001.html>


More information about the NetworKit mailing list