[Top][All Lists]

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

Re: [igraph] On ncol use and vertex labeling

From: Tamás Nepusz
Subject: Re: [igraph] On ncol use and vertex labeling
Date: Wed, 6 Jul 2011 21:28:34 +0200

Now, if I got it right, read_graph_ncol() does not keep the labeling of the
vertices, such as being specified in the input ncol-list.
The original labels in the NCOL file are assigned to a vertex attribute named "name", so you can simply retrieve and use it to map your original edge IDs to the numeric indices of igraph. Note that "name" is going to be a *string* attribute on the vertices, not a numeric attribute because the names could be arbitrary strings in an NCOL file.

Moreover, if i decided to use "ncol" edge-lists, it is because the sizes of
the weighted networks that am analyzing seem to be too large for creating
matrices. May be you can suggest me a better approach to get around with
the size difficulty right from the start.
1. You could use two files, one to store the list of edges, and another one to store the weights corresponding to the edges (in the same order as the edges are in your first file).

2. You could use the GML, GraphML or Pajek formats - these files have a separate section for vertices and igraph keeps the vertices in the same order as you define them in the file, so you have direct control over the vertex IDs.

3. You could encourage us a little bit to add support for weighted edge lists :) This would be like the NCOL format, but the names could only be non-negative numbers and igraph would use them straight as the vertex IDs.


reply via email to

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