[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] vertex ids and function igraph_vcount(const igraph_t *graph)
From: |
Christian Gonzalez |
Subject: |
[igraph] vertex ids and function igraph_vcount(const igraph_t *graph) |
Date: |
Fri, 07 Aug 2009 16:43:22 -0430 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 |
Hello everybody
if you have a graph with six edges like this:
...
igraph_t graph;
igraph_vector_t edges;
...
igraph_vector_init(&edges, 6);
...
VECTOR(edges)[0] = 1200000
VECTOR(edges)[1] = 1200001
VECTOR(edges)[2] = 846
VECTOR(edges)[3] = 30000000
VECTOR(edges)[4] = 1200001
VECTOR(edges)[5] = 846
...
igraph_create(&graph, &edges, 0, IGRAPH_DIRECTED)
How many memory is reserved for the vertex vector? --> 4 or 30000000
positions?
because if you call function igraph_vcount(&graph), the return is
30000000 instead of 4.
Why this functions returns the maximum vertex id? instead of the number
of vertex in the graph
Regards,
Christian
- [igraph] vertex ids and function igraph_vcount(const igraph_t *graph),
Christian Gonzalez <=