igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] how to add disconnected nodes to a graph?


From: Ahmed Abdeen Hamed
Subject: Re: [igraph] how to add disconnected nodes to a graph?
Date: Fri, 6 Dec 2013 16:40:15 -0500

That was a tiny booboo, but no worries! We are trained professional "quoting from A bugs's life movie" ;) I got it fixed and it is looking beautiful here. 

If I am computing the betweenness of a vertex that doesn't connect to any other node. Shouldn't the betweenness be 0?


I am getting these values:

hemp,0.0714285714286
marihuana,0.0714285714286
aspirin,0.0714285714286

Does this look right?

-Ahmed






On Fri, Dec 6, 2013 at 3:40 PM, Tamás Nepusz <address@hidden> wrote:
Okay, I made a booboo when I linked Gephi’s page on the GML format. The “official” GML specification says that the node IDs can only be integers:

http://www.fim.uni-passau.de/fileadmin/files/lehrstuhl/brandenburg/projekte/gml/gml-technical-report.pdf

So, the solution is to use numeric IDs in your GML file and put the node names in the label attribute (within quotes). The PDF file linked above shows some examples.

--
T.


On Friday, 6 December 2013 at 17:37, Ahmed Abdeen Hamed wrote:

> Thank you!
>
>
> I tried this graph example in GML format:
>
>
> graph
> [
> node
> [
> id A
> ]
> node
> [
> id B
> ]
> node
> [
> id C
> ]
> edge
> [
> source B
> target A
> ]
> edge
> [
> source C
> target A
> ]
> ]
>
>
>
>
> This is how I call my reader :
> g = igraph.Graph.Read_GML("test.gml")
>
> Now getting this error:
>
> python graph-stats.py
> Assertion failed: (v != 0), function igraph_vector_destroy, file ../../../src/vector.pmt, line 374.
> Abort trap: 6
>
>
> Any idea what I am doing wrong?
>
> -Ahmed
>
>
>
>
>
> On Fri, Dec 6, 2013 at 5:06 AM, Tamás Nepusz <address@hidden (mailto:address@hidden)> wrote:
> > > How do you add nodes to a graph without connecting from to others via an edge?
> >
> >
> > Use a different file format that supports disconnected edges. Pajek (https://gephi.org/users/supported-graph-formats/pajek-net-format/) or GML (https://gephi.org/users/supported-graph-formats/gml-format/) are probably the easiest to create.
> >
> > T.
> >
> > _______________________________________________
> > igraph-help mailing list
> > address@hidden (mailto:address@hidden)
> > https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden (mailto:address@hidden)
> https://lists.nongnu.org/mailman/listinfo/igraph-help





reply via email to

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