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

Method get_neighbors

graphlite/src/storage/graph_cache.rs:252–257  ·  view source on GitHub ↗

Get neighbors of a node (nodes connected by outgoing edges)

(&self, node_id: &str)

Source from the content-addressed store, hash-verified

250
251 /// Get neighbors of a node (nodes connected by outgoing edges)
252 pub fn get_neighbors(&self, node_id: &str) -> Vec<&Node> {
253 self.get_outgoing_edges(node_id)
254 .into_iter()
255 .filter_map(|edge| self.nodes.get(&edge.to_node))
256 .collect()
257 }
258
259 /// Get all neighbors (both incoming and outgoing connections)
260 pub fn get_all_neighbors(&self, node_id: &str) -> Vec<&Node> {

Callers

nothing calls this directly

Calls 2

get_outgoing_edgesMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected