MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / get_incoming_edges

Method get_incoming_edges

graphlite/src/storage/graph_cache.rs:232–242  ·  view source on GitHub ↗

Get all incoming edges to a node

(&self, node_id: &str)

Source from the content-addressed store, hash-verified

230
231 /// Get all incoming edges to a node
232 pub fn get_incoming_edges(&self, node_id: &str) -> Vec<&Edge> {
233 self.adjacency_in
234 .get(node_id)
235 .map(|edge_ids| {
236 edge_ids
237 .iter()
238 .filter_map(|id| self.edges.get(id))
239 .collect()
240 })
241 .unwrap_or_default()
242 }
243
244 /// Get all edges connected to a node (both incoming and outgoing)
245 pub fn get_connected_edges(&self, node_id: &str) -> Vec<&Edge> {

Callers 4

get_connected_edgesMethod · 0.80
get_all_neighborsMethod · 0.80

Calls 2

getMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected