#graph #sorting #ranking #pagerank #generic #calculate #page-rank

bin+lib simple-pagerank

Simple library to calculate the PageRank of a graph

4 releases

0.2.0 Jan 7, 2022
0.1.2 Mar 29, 2021
0.1.1 Mar 29, 2021
0.1.0 Mar 21, 2021

#1212 in Algorithms

Download history 3/week @ 2024-05-03 4/week @ 2024-05-10 5/week @ 2024-05-17 19/week @ 2024-05-24 114/week @ 2024-05-31 26/week @ 2024-06-07 10/week @ 2024-06-14 27/week @ 2024-06-21 25/week @ 2024-06-28 16/week @ 2024-07-05 33/week @ 2024-07-12 22/week @ 2024-07-19 41/week @ 2024-07-26 13/week @ 2024-08-02 17/week @ 2024-08-09 17/week @ 2024-08-16

92 downloads per month

MIT license

14KB
340 lines

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

lib.rs:

Simple Pagerank

Pretty simple generic implementation of the PageRank graph sorting algorithm.

No runtime deps