GraphNodeAt
Description
Access node payload at given node id.
Parameters
| Name | Direction | Description |
|---|---|---|
g |
in | Graph to query. |
node_id |
in | Node id to access. |
Failure
Does not return on invalid or stale node id.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Graph.Ops.c:282:
result = result && (counts[GraphNodeIdIndex(reused)] == 0);
result = result && (counts[GraphNodeIdIndex(a)] == 11);
result = result && (GraphNodeAt(&graph, reused) == 99);
GraphDeinit(&graph); bool result = GraphNodeCount(&graph) == 3 && GraphEdgeCount(&graph) == 3 && !GraphEmpty(&graph);
result = result && GraphContainsNode(&graph, a) && GraphContainsNode(&graph, b) && GraphContainsNode(&graph, c);
result = result && GraphNodeAt(&graph, b) == 25;
result = result && GraphNodeData(&graph, node_b) == 25;
result = result && GraphNodeGetId(node_b) == b; bool result = GraphNodeIdIndex(id0) == 0 && GraphNodeIdGeneration(id0) == 1 && GraphNodeIdIndex(id1) == 1;
result = result && owned == 0 && shared == 7;
result = result && GraphNodeAt(&graph, id0) == 42;
result = result && GraphNodeAt(&graph, id1) == 7; result = result && owned == 0 && shared == 7;
result = result && GraphNodeAt(&graph, id0) == 42;
result = result && GraphNodeAt(&graph, id1) == 7;
GraphDeinit(&graph);
Last updated on