Raphtory
Raphtory copied to clipboard
Local object in Eval Api includes results for the whole graph even if running on a subgraph
Pagerank example:
let out: HashMap<VID, f64> = runner.run(
vec![Job::new(step1)],
vec![Job::new(step2), Job::new(step3), Job::new(step4), step5],
PageRankState::new(num_vertices),
|g, _, _, local| {
local
.iter()
.enumerate()
.map(|(v_ref, score)| (v_ref.into(), score.score))
.collect::<HashMap<_, _>>()
},
threads,
iter_count,
None,
None,
);
If this is run on a VertexSubgraph the local.iter() part still iterates over the whole graph, which might be unexpected. Might also need to be careful with the assumption that the position in the list is equal to the vertex id when subgraphs are involved.