GraphInDegree
Description
Number of incoming neighbors for a node. Includes edges marked for removal but not yet committed.
Parameters
| Name | Direction | Description |
|---|---|---|
g |
in | Graph to query. |
node_id |
in | Node id whose in-degree is requested. |
Success
Returns the in-degree as a u64. The graph is not modified.
Failure
Does not return - aborts via LOG_FATAL for an invalid or stale node id (caller bug).
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Ops.c:63:
result = result && !GraphContainsNode(&graph, b);
result = result && (GraphOutDegree(&graph, a) == 0);
result = result && (GraphInDegree(&graph, a) == 1);
result = result && (GraphInDegree(&graph, c) == 0);
result = result && GraphHasEdge(&graph, c, a);- In
Ops.c:64:
result = result && (GraphOutDegree(&graph, a) == 0);
result = result && (GraphInDegree(&graph, a) == 1);
result = result && (GraphInDegree(&graph, c) == 0);
result = result && GraphHasEdge(&graph, c, a);
result = result && (GraphPredecessorAt(&graph, a, 0) == c);- In
Ops.c:146:
result = result && (GraphEdgeCount(&graph) == 1);
result = result && (GraphOutDegree(&graph, a) == 1);
result = result && (GraphInDegree(&graph, b) == 0);
result = result && (GraphInDegree(&graph, c) == 1);
result = result && (GraphNeighborAt(&graph, a, 0) == c);- In
Ops.c:147:
result = result && (GraphOutDegree(&graph, a) == 1);
result = result && (GraphInDegree(&graph, b) == 0);
result = result && (GraphInDegree(&graph, c) == 1);
result = result && (GraphNeighborAt(&graph, a, 0) == c);
result = result && (GraphPredecessorAt(&graph, c, 0) == a);- In
Ops.c:211:
result = result && !GraphHasEdge(&graph, a, c);
result = result && (GraphOutDegree(&graph, a) == 1);
result = result && (GraphInDegree(&graph, b) == 1);
result = result && (GraphInDegree(&graph, c) == 0);- In
Ops.c:212:
result = result && (GraphOutDegree(&graph, a) == 1);
result = result && (GraphInDegree(&graph, b) == 1);
result = result && (GraphInDegree(&graph, c) == 0);
GraphDeinit(&graph);- In
Ops.c:231:
bool result = GraphAddEdge(&graph, a, a);
result = result && (GraphOutDegree(&graph, a) == 1);
result = result && (GraphInDegree(&graph, a) == 1);
result = result && (GraphNeighborAt(&graph, a, 0) == a);
result = result && (GraphPredecessorAt(&graph, a, 0) == a);- In
Ops.c:238:
result = result && (GraphEdgeCount(&graph) == 0);
result = result && (GraphOutDegree(&graph, a) == 0);
result = result && (GraphInDegree(&graph, a) == 0);
GraphDeinit(&graph);- In
Ops.c:272:
result = result && (GraphOutDegree(&graph, a) == 0);
result = result && (GraphOutDegree(&graph, d) == 0);
result = result && (GraphInDegree(&graph, c) == 0);
result = result && (GraphInDegree(&graph, a) == 0);
result = result && (GraphInDegree(&graph, d) == 0);- In
Ops.c:273:
result = result && (GraphOutDegree(&graph, d) == 0);
result = result && (GraphInDegree(&graph, c) == 0);
result = result && (GraphInDegree(&graph, a) == 0);
result = result && (GraphInDegree(&graph, d) == 0);- In
Ops.c:274:
result = result && (GraphInDegree(&graph, c) == 0);
result = result && (GraphInDegree(&graph, a) == 0);
result = result && (GraphInDegree(&graph, d) == 0);
GraphDeinit(&graph);- In
Ops.c:485:
result = result && (GraphNodeCount(&graph) == 1);
result = result && (GraphEdgeCount(&graph) == 0);
result = result && (GraphInDegree(&graph, c) == 0);
GraphDeinit(&graph);- In
Insert.c:71:
result = result && GraphEdgeCount(&graph) == 2;
result = result && GraphOutDegree(&graph, a) == 2;
result = result && GraphInDegree(&graph, a) == 0;
result = result && GraphInDegree(&graph, b) == 1;
result = result && GraphInDegree(&graph, c) == 1;- In
Insert.c:72:
result = result && GraphOutDegree(&graph, a) == 2;
result = result && GraphInDegree(&graph, a) == 0;
result = result && GraphInDegree(&graph, b) == 1;
result = result && GraphInDegree(&graph, c) == 1;
result = result && GraphNeighborAt(&graph, a, 0) == b;- In
Insert.c:73:
result = result && GraphInDegree(&graph, a) == 0;
result = result && GraphInDegree(&graph, b) == 1;
result = result && GraphInDegree(&graph, c) == 1;
result = result && GraphNeighborAt(&graph, a, 0) == b;
result = result && GraphNeighborAt(&graph, a, 1) == c;- In
Insert.c:102:
result = result && (GraphEdgeCount(&graph) == 3);
result = result && (GraphOutDegree(&graph, a) == 1);
result = result && (GraphInDegree(&graph, a) == 3);
result = result && (GraphNeighborAt(&graph, a, 0) == a);
result = result && (GraphPredecessorAt(&graph, a, 0) == a);- In
Foreach.c:199:
bool result = (predecessor_count == 3);
result = result && (predecessor_sum == 6);
result = result && (GraphInDegree(&graph, d) == 3);
result = result && (GraphInDegree(&graph, a) == 0);- In
Foreach.c:200:
result = result && (predecessor_sum == 6);
result = result && (GraphInDegree(&graph, d) == 3);
result = result && (GraphInDegree(&graph, a) == 0);
GraphDeinit(&graph);- In
Access.c:44:
result = result && GraphNodeIndex(node_b) == GraphNodeIdIndex(b);
result = result && GraphOutDegree(&graph, a) == 2;
result = result && GraphInDegree(&graph, a) == 1;
result = result && GraphInDegree(&graph, b) == 1;
result = result && GraphInDegree(&graph, c) == 1;- In
Access.c:45:
result = result && GraphOutDegree(&graph, a) == 2;
result = result && GraphInDegree(&graph, a) == 1;
result = result && GraphInDegree(&graph, b) == 1;
result = result && GraphInDegree(&graph, c) == 1;
result = result && GraphNeighborAt(&graph, a, 0) == b && GraphNeighborAt(&graph, a, 1) == c;- In
Access.c:46:
result = result && GraphInDegree(&graph, a) == 1;
result = result && GraphInDegree(&graph, b) == 1;
result = result && GraphInDegree(&graph, c) == 1;
result = result && GraphNeighborAt(&graph, a, 0) == b && GraphNeighborAt(&graph, a, 1) == c;
result = result && GraphNeighborAt(&graph, c, 0) == a;
Last updated on