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 11:37:34 -0500

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> 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
https://lists.nongnu.org/mailman/listinfo/igraph-help


reply via email to

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