Skip to content

Graph operations and helpers (petgraph-first).

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

arclabs561/graphops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphops

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 operations and helpers (petgraph-first).

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages