Skip to content

arclabs561/graphops

graphops

crates.io Documentation CI

Graph operators and centralities as a small Rust crate.

Usage

[dependencies]
graphops = { version = "0.1.0", features = ["petgraph"] }
petgraph = "0.6"

Example:

use graphops::{pagerank, PageRankConfig};
use petgraph::prelude::*;

let mut g: DiGraph<(), f64> = DiGraph::new();
let a = g.add_node(());
let b = g.add_node(());
g.add_edge(a, b, 1.0);

let scores = pagerank(&g, PageRankConfig::default());
assert_eq!(scores.len(), g.node_count());

Implemented Operators

  • PageRank and Personalized PageRank
  • Random walks and biased walks (node2vec-style)
  • Reachability counts
  • Connected components / label propagation
  • Top-k helpers
  • (feature-gated) Betweenness centrality via petgraph

Features

  • serde: enable serde on some graph adapters.
  • parallel: enable parallel walk generation.
  • petgraph: enable petgraph adapters + betweenness helper.

Development

cargo test

About

Graph operators: PageRank, PPR, reachability, betweenness, node2vec. Higher-level composition over walk primitives.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages