Skip to content

Rust implementation of the Weighted PageRank algorithm

License

Notifications You must be signed in to change notification settings

uxioandrade/pagerank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pagerank

Rust implementation of the Weighted PageRank algorithm

Usage

use pagerank::Graph;

fn main() {
    let mut g = Graph::new();
    g.add_link(1,2,1.0);
    g.add_link(1,3,2.0);
    g.add_link(2,3,3.0);
    g.add_link(2,4,4.0);
    g.add_link(3,1,5.0);
    g.page_rank(0.85, 0.000001, |node, rank| {println!("Node: {} - Rank: {}",node,rank); });
}

Output

Node: 1 - Rank: 0.34983779905464363
Node: 2 - Rank: 0.1688733284604475
Node: 3 - Rank: 0.3295121849483849
Node: 4 - Rank: 0.15177668753652385

This repo is a Rust implementation of the algorithm described in the following repository (which is in Go)

About

Rust implementation of the Weighted PageRank algorithm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages