igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Enforcing directions of edges


From: Ahmed Abdeen Hamed
Subject: Re: [igraph] Enforcing directions of edges
Date: Wed, 4 Feb 2015 17:27:42 -0500

Ah, I see. I just was not sure about the syntax. I was reading my graph from a .csv as following:

reader = csv.DictReader(open("pr-network-demo.csv"), dialect="excel")
g = igraph.Graph.DictList(vertices=None, edges=reader)

Adding the directed=True argument fixed the problem. 

Thanks very much for this suggestion!

-Ahmed

On Wed, Feb 4, 2015 at 5:16 PM, Tamas Nepusz <address@hidden> wrote:
Why don't you create the network as directed from the very beginning? Then you
can add the edge in the right direction without creating one in the opposite
direction as well.

T.

On 02/04, Ahmed Abdeen Hamed wrote:
> Hello again respected colleagues,
>
> How do I enforce the direction of an edge from A -> B without having a link
> back from B -> A?
>
> If I used the to_directed() it creates mutual links, and if I use
> to_undirected() the network is not directed at all.
>
> Thanks for your help,
>
> -Ahmed

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


--
T.


reply via email to

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