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

Method get_outgoing_edges

graphlite/src/storage/graph_cache.rs:219–229  ·  view source on GitHub ↗

Get all outgoing edges from a node

(&self, node_id: &str)

Source from the content-addressed store, hash-verified

217
218 /// Get all outgoing edges from a node
219 pub fn get_outgoing_edges(&self, node_id: &str) -> Vec<&Edge> {
220 self.adjacency_out
221 .get(node_id)
222 .map(|edge_ids| {
223 edge_ids
224 .iter()
225 .filter_map(|id| self.edges.get(id))
226 .collect()
227 })
228 .unwrap_or_default()
229 }
230
231 /// Get all incoming edges to a node
232 pub fn get_incoming_edges(&self, node_id: &str) -> Vec<&Edge> {

Callers 5

get_connected_edgesMethod · 0.80
get_neighborsMethod · 0.80
get_all_neighborsMethod · 0.80

Calls 2

getMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected