| igraph Reference Manual |
|---|
int igraph_vit_create(const igraph_t *graph, igraph_vs_t vs, igraph_vit_t *vit);
This function instantiates a vertex selector object with a given
graph. This is the step when the actual vertex ids are created from
the logical notion of the vertex selector based on the graph.
Eg. a vertex selector created with igraph_vs_all() contains
knowledge that all vertices are included in a (yet indefinite)
graph. When instantiating it a vertex iterator object is created,
this contains the actual vertex ids in the graph supplied as a
parameter.
The same vertex selector object can be used to instantiate any number vertex iterators.
Arguments:
graph: |
An igraph_t object, a graph. |
vs: |
A vertex selector object. |
vit: |
Pointer to an uninitialized vertex iterator object. |
Returns:
|
Error code. |
See also:
Time complexity: it depends on the vertex selector type. O(1) for
vertex selectors created with igraph_vs_all(), igraph_vs_none(), igraph_vs_1, igraph_vs_vector, igraph_vs_seq(), igraph_vs_vector(), igraph_vs_vector_small(). O(d) for igraph_vs_adj(), d is the
number of vertex ids to be included in the iterator. O(|V|) for
igraph_vs_nonadj(), |V| is the number of vertices in the graph.
| << 5. Vertex iterators | 5.2. igraph_vit_destroy — Destroys a vertex iterator. >> |