simple-pagerank

Crates.iosimple-pagerank
lib.rssimple-pagerank
version0.2.0
sourcesrc
created_at2021-03-21 23:53:04.036049
updated_at2022-01-07 17:21:26.515149
descriptionSimple library to calculate the PageRank of a graph
homepage
repositoryhttps://github.com/crodas/pagerank-rs
max_upload_size
id371889
size15,327
César D. Rodas (crodas)

documentation

README

Simple page rank

Very simple implementation of the PageRank algorithm.

Features

  • Small footprint
  • Zero dependency
  • Easy to use API
  • Fast `

Usage

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);

Built-in binary example

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
Commit count: 6

cargo fmt