Great thanks for your further comments!|
I should remember the 0-based indexing in using the existing igraph
于 2011-9-15 19:35, Gábor Csárdi 写道:
On Thu, Sep 15, 2011 at 4:27 AM, Minh Nguyen <address@hidden> wrote:
On Thu, Sep 15, 2011 at 6:23 PM, Zhijiang Wang
why is the 0-starting index is used?
In computer science, our indices start from zero. In mathematics,
indices start from one. Graph theory as treated by igraph is
considered computer science. And people who develop igraph are
Another reason for the 0-based indexing was that igraph internals are
written in C, and C uses 0-based indices for arrays, so it was natural
(for a computer scientist at least) to go with that. Keeping the
zero-based indexing in R simplified a lot of things, and made igraph
Soon I realized that 0-based in indices are causing problems in R.
This will be only corrected in the coming 0.6 version, where vertices
are indexed from 1 (if you use igraph from R). This also means that
existing code will no longer be compatible with the new 0.6 version,
于 2011-9-15 16:19, Minh Nguyen 写道:
2011/9/15 Zhijiang Wang <address@hidden>:
I used the function maximal.cliques, and found the smallest index of
vertices is 0.
So, dose the index of vertices in a graph start from 0?
Minh Van Nguyen
igraph-help mailing list
Room 407, East Segment, Material Science Building,
The International WIC Institute,
College of Computer Science and Technology,
Beijing University of Technology,