Crates.io | simple-pagerank |
lib.rs | simple-pagerank |
version | 0.2.0 |
source | src |
created_at | 2021-03-21 23:53:04.036049 |
updated_at | 2022-01-07 17:21:26.515149 |
description | Simple library to calculate the PageRank of a graph |
homepage | |
repository | https://github.com/crodas/pagerank-rs |
max_upload_size | |
id | 371889 |
size | 15,327 |
Very simple implementation of the PageRank algorithm.
let mut pr = Pagerank::<&str>::new();
pr.add_edge("source", "target");
pr.add_edge("source", "another target");
pr.calculate();
// print result (always sorted)
pr.nodes()
.iter()
.map(|(node, score)| println!("page {} with score {}", node, score))
.for_each(drop);
The repository has a built-in binary example which works with WikiLinkGraphs dataset.
gzcat eswiki.wikilink_graph.2018-03-01.csv.gz| cargo run --release wikilink