Expand description
Graph — pure-Rust port of igraph_t.
Storage is the indexed edge list that upstream igraph uses (see
references/igraph/include/igraph_datatype.h:105-116):
from[e],to[e]— canonical edge list. Edgeeruns fromfrom[e]toto[e];|from| == |to| == ecount.oi[i]— edge ids ordered byfrom(and thento).ii[i]— edge ids ordered byto(and thenfrom).os[v]..os[v+1]— slice ofoicovering vertexv’s out-edges.is[v]..is[v+1]— slice ofiicovering vertexv’s in-edges.
For undirected graphs the edge list is canonicalised so from[e] <= to[e]
(matching upstream igraph’s invariant in type_indexededgelist.c:282-288).
The doubled in/out indexing makes neighbors() symmetric for undirected
graphs without storing each edge twice.
ALGO-CORE-001a (Phase 1, this file): struct + new/with_vertices +
add_vertices/add_edge/add_edges + vcount/ecount/is_directed +
neighbors/degree + Clone.
Follow-up AWUs:
- 001b:
incident, edge-id helpers. - 001c:
delete_vertices/delete_edges. - 001d:
edge/edges/get_eid/get_eids/get_all_eids_between. - 001e: property cache,
is_same_graph.
Attribute system → ALGO-AT-* (out of scope here).
Structs§
- Graph
- Counterpart of
igraph_t(seereferences/igraph/include/igraph_datatype.h).