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

Function subgraph_materialization

nodedb-graph/src/traversal.rs:444–451  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

442
443 #[test]
444 fn subgraph_materialization() {
445 let csr = make_csr();
446 let edges = csr.subgraph(&["a"], None, 2, DEFAULT_MAX_VISITED);
447 assert_eq!(edges.len(), 3);
448 assert!(edges.contains(&("a".into(), "KNOWS".into(), "b".into())));
449 assert!(edges.contains(&("a".into(), "WORKS".into(), "e".into())));
450 assert!(edges.contains(&("b".into(), "KNOWS".into(), "c".into())));
451 }
452
453 #[test]
454 fn large_graph_bfs() {

Callers

nothing calls this directly

Calls 2

subgraphMethod · 0.80
make_csrFunction · 0.70

Tested by

no test coverage detected