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

Function sssp_single_node

nodedb/src/engine/graph/algo/sssp.rs:240–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

238
239 #[test]
240 fn sssp_single_node() {
241 let mut csr = CsrIndex::new();
242 csr.add_node("solo").unwrap();
243 csr.compact().expect("no governor, cannot fail");
244
245 let params = AlgoParams {
246 source_node: Some("solo".into()),
247 ..Default::default()
248 };
249 let batch = run(&csr, &params).unwrap();
250 let dists = parse_results(&batch);
251 assert_eq!(dists["solo"], 0.0);
252 }
253
254 #[test]
255 fn sssp_to_record_batch() {

Callers

nothing calls this directly

Calls 5

parse_resultsFunction · 0.85
runFunction · 0.70
add_nodeMethod · 0.45
expectMethod · 0.45
compactMethod · 0.45

Tested by

no test coverage detected