ValidateGraph
Description
Validate whether a given Graph object is valid. Aborts if provided graph is uninitialized or corrupted.
Parameters
| Name | Direction | Description |
|---|---|---|
g |
in | Pointer to Graph object to validate. |
Success
Continue execution, meaning given graph is most probably valid.
Failure
abort
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Graph.c:127:
}
ValidateGraph(graph);
graph_validate_node_id(graph, node.__id);
return node;- In
Graph.c:470:
void deinit_graph(GenericGraph *graph, size item_size) {
ValidateGraph(graph);
clear_graph(graph, item_size);- In
Graph.c:491:
u64 slot_index;
ValidateGraph(graph);
for (slot_index = 0; slot_index < graph->slots.length; slot_index++) {- In
Graph.c:525:
(void)item_size;
ValidateGraph(graph);
old_capacity = graph->slots.capacity;- In
Graph.c:544:
}
ValidateGraph(graph);
if (graph->free_indices.length) {- In
Graph.c:610:
}
ValidateGraph(graph);
index = GraphNodeIdIndex(node_id);- In
Graph.c:626:
GraphNode node;
ValidateGraph(graph);
graph_validate_node_id(graph, node_id);- In
Graph.c:667:
GraphNeighbors *neighbors;
ValidateGraph(graph);
graph_validate_node_id(graph, from);
neighbors = graph_out_neighbors_ptr(graph, from);- In
Graph.c:681:
GraphNeighbors *neighbors;
ValidateGraph(graph);
graph_validate_node_id(graph, to);
neighbors = graph_in_neighbors_ptr(graph, to);- In
Graph.c:695:
GraphNeighbors *neighbors;
ValidateGraph(graph);
graph_validate_node_id(graph, from);
graph_validate_node_id(graph, to);- In
Graph.c:707:
GraphNeighbors *in_neighbors;
ValidateGraph(graph);
graph_validate_node_id(graph, from);
graph_validate_node_id(graph, to);- In
Graph.c:813:
GraphPendingEdgeRemoval pending;
ValidateGraph(graph);
graph_validate_node_id(graph, from);
graph_validate_node_id(graph, to);- In
Graph.c:839:
bool graph_edge_marked_for_removal(GenericGraph *graph, GraphNodeId from, GraphNodeId to) {
ValidateGraph(graph);
graph_validate_node_id(graph, from);
graph_validate_node_id(graph, to);- In
Graph.c:849:
size idx;
ValidateGraph(graph);
graph_validate_node_id(graph, from);
graph_validate_node_id(graph, to);- In
Graph.c:868:
u64 explicit_edge_removal_count;
ValidateGraph(graph);
if (!graph->pending_delete_count && !graph->pending_edge_removals.length) {- In
Graph.c:918:
GenericGraphNodeIter iter;
ValidateGraph(graph);
iter.graph = graph;- In
Graph.c:935:
}
ValidateGraph(iter->graph);
if (iter->expected_mutation_epoch != iter->graph->mutation_epoch) {
LOG_FATAL("graph structure changed during node iteration");- In
Graph.c:980:
}
ValidateGraph(iter->graph);
if (iter->expected_mutation_epoch != iter->graph->mutation_epoch) {
LOG_FATAL("graph structure changed during neighbor iteration");- In
Graph.c:1027:
}
ValidateGraph(iter->graph);
if (iter->expected_mutation_epoch != iter->graph->mutation_epoch) {
LOG_FATAL("graph structure changed during predecessor iteration");- In
Graph.Init.c:14:
GraphReserve(&graph, 8);
ValidateGraph(&graph);
bool result = graph.slots.capacity >= 8;- In
Graph.Type.c:12:
IntGraph graph = GraphInit();
ValidateGraph(&graph);
bool result = GraphNodeCount(&graph) == 0 && GraphEdgeCount(&graph) == 0 && GraphEmpty(&graph) && GraphAddEdge(&graph, c, a);
ValidateGraph(&graph);
node_b = GraphGetNode(&graph, b);- In
Foreach.h:32:
#define GraphForeachNode(g, node) \
for (TYPE_OF(g) UNPL(pg) = (g); UNPL(pg); UNPL(pg) = NULL) \
if ((ValidateGraph(UNPL(pg)), 1) && GraphNodeCount(UNPL(pg)) > 0) \
for (GenericGraphNodeIter UNPL(iter) = graph_node_iter_begin(GENERIC_GRAPH(UNPL(pg))); UNPL(iter).graph; \
UNPL(iter).graph = NULL) \
Last updated on