MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / add_edge

Method add_edge

nodedb-graph/src/csr/index/mutation.rs:15–17  ·  view source on GitHub ↗

Incrementally add an unweighted edge (goes into mutable buffer). Uses weight 1.0 if the graph already has weighted edges. Returns `Err(GraphError::LabelOverflow)` if the label id space is exhausted. Production callers should always surface this to the client; silently ignoring it reproduces the silent-wrap bug the `u32` widening was meant to fix.

(&mut self, src: &str, label: &str, dst: &str)

Source from the content-addressed store, hash-verified

13 /// client; silently ignoring it reproduces the silent-wrap bug the
14 /// `u32` widening was meant to fix.
15 pub fn add_edge(&mut self, src: &str, label: &str, dst: &str) -> Result<(), crate::GraphError> {
16 self.add_edge_internal(src, label, dst, 1.0, false)
17 }
18
19 /// Incrementally add a weighted edge (goes into mutable buffer).
20 ///

Callers 15

make_csrFunction · 0.80
bfs_cycleFunction · 0.80
large_graph_bfsFunction · 0.80
statistics_basicFunction · 0.80
degree_histogram_valuesFunction · 0.80
label_edge_count_directFunction · 0.80

Calls 1

add_edge_internalMethod · 0.80