Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crates.io docs.rs

Rust fa2 crate

Full documentation


The fa2 crate provide a Rust implementation of the ForceAtlas2 graph layout algorithm.

Jacomy M, Venturini T, Heymann S, Bastian M (2014) ForceAtlas2, a Continuous Graph Layout Algorithm for Handy Network Visualization Designed for the Gephi Software. PLoS ONE 9(6): e98679. https://doi.org/10.1371/journal.pone.0098679

This implementation is generic over its float precision so you can run it with f32 or f64.

Running the algorithm

// First you need to populate the graph data on which the algorithm will run:
let mut data = FA2Data::<f32>::new();

// Then you need to instantiate settings
let settings = FA2Settings::default();

// Then you can build the layout runner
let layout = settings.build(data);

// Running a fixed number of iterations
layout.run(100);

// Retrieving positions
layout.data().positions()

For a command line tool able to run this implementation of the algorithm and/or to read a real-life example, check out the run example of this crate.

About

Rust implementation of the Force Atlas 2 graph layout algorithm.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages