GraphNeighbors
Description
Adjacency list for a single graph node.
Each item is a GraphNodeId referring to another live node. Graph uses this same vector shape for both outgoing and incoming adjacency storage.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Graph.c:235:
}
static bool graph_neighbors_contains(const GraphNeighbors *neighbors, GraphNodeId node_id) {
size idx;- In
Graph.c:247:
}
static size graph_find_neighbor_index(const GraphNeighbors *neighbors, GraphNodeId node_id) {
size idx;- In
Graph.c:273:
static bool graph_remove_edge_now(GenericGraph *graph, GraphNodeId from, GraphNodeId to) {
GraphNeighbors *out_neighbors;
GraphNeighbors *in_neighbors;
size out_idx;- In
Graph.c:274:
static bool graph_remove_edge_now(GenericGraph *graph, GraphNodeId from, GraphNodeId to) {
GraphNeighbors *out_neighbors;
GraphNeighbors *in_neighbors;
size out_idx;
size in_idx;- In
Graph.c:298:
static size graph_remove_marked_outgoing_edges(GenericGraph *graph, GraphNodeId from) {
size removed = 0;
GraphNeighbors *neighbors = graph_out_neighbors_ptr(graph, from);
size idx = 0;- In
Graph.c:323:
static size graph_remove_all_outgoing_edges(GenericGraph *graph, GraphNodeId from) {
size removed = 0;
GraphNeighbors *neighbors = graph_out_neighbors_ptr(graph, from);
while (neighbors->length) {- In
Graph.c:445:
for (free_index_i = 0; free_index_i < graph->pending_edge_removals.length; free_index_i++) {
const GraphPendingEdgeRemoval *pending = VecPtrAt((GraphPendingEdgeRemovals *)&graph->pending_edge_removals, free_index_i);
const GraphNeighbors *neighbors;
graph_validate_node_id(graph, pending->from);- In
Graph.c:648:
}
GraphNeighbors *graph_out_neighbors_ptr(GenericGraph *graph, GraphNodeId node_id) {
return &graph_require_live_slot(graph, node_id)->out_neighbors;
}- In
Graph.c:652:
}
GraphNeighbors *graph_in_neighbors_ptr(GenericGraph *graph, GraphNodeId node_id) {
return &graph_require_live_slot(graph, node_id)->in_neighbors;
}- In
Graph.c:665:
GraphNodeId graph_neighbor_at(GenericGraph *graph, GraphNodeId from, size neighbor_idx) {
GraphNeighbors *neighbors;
ValidateGraph(graph);- In
Graph.c:679:
GraphNodeId graph_predecessor_at(GenericGraph *graph, GraphNodeId to, size predecessor_idx) {
GraphNeighbors *neighbors;
ValidateGraph(graph);- In
Graph.c:693:
bool graph_has_edge(GenericGraph *graph, GraphNodeId from, GraphNodeId to) {
GraphNeighbors *neighbors;
ValidateGraph(graph);- In
Graph.c:704:
bool graph_add_edge(GenericGraph *graph, GraphNodeId from, GraphNodeId to) {
GraphNeighbors *out_neighbors;
GraphNeighbors *in_neighbors;- In
Graph.c:705:
bool graph_add_edge(GenericGraph *graph, GraphNodeId from, GraphNodeId to) {
GraphNeighbors *out_neighbors;
GraphNeighbors *in_neighbors;
ValidateGraph(graph);- In
Graph.c:970:
bool graph_neighbor_iter_next(GenericGraphNeighborIter *iter, GraphNode *out_node) {
GraphNeighbors *neighbors;
if (!iter || !out_node) {- In
Graph.c:1017:
bool graph_predecessor_iter_next(GenericGraphPredecessorIter *iter, GraphNode *out_node) {
GraphNeighbors *neighbors;
if (!iter || !out_node) {- In
Type.h:79:
typedef struct {
GraphNeighbors out_neighbors;
GraphNeighbors in_neighbors;
void *data;- In
Type.h:80:
typedef struct {
GraphNeighbors out_neighbors;
GraphNeighbors in_neighbors;
void *data;
u64 visit_count;
Last updated on