matrixgraph 0.1.0

A graph implementation based on dense adjacency matrices
Documentation
  • Coverage
  • 100%
    10 out of 10 items documented1 out of 2 items with examples
  • Size
  • Source code size: 27.3 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.22 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Documentation
  • equescalculi/matrixgraph
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • equescalculi

Crate matrixgraph

A graph implementation based on dense adjacency matrices

WARNING! Please expect odd bugs and backward incompatible changes at this early stage!

Features

Supported structs:

  • SimpleGraph: a simple graph represented by the upper right triangle of an adjacency matrix of fixed size
  • Digraph: a digraph represented by a dense adjacency matrix of fixed size

Usage

Add this library as a crate to your project:

extern crate matrixgraph;

Define a graph:

use matrixgraph::{Digraph, BasicGraphMethods};

let mut digraph = Digraph::new(3);
digraph.set_edge((0, 1), Some(1.0f64));
digraph.set_edge((0, 2), Some(4.0f64));
digraph.set_edge((1, 2), Some(2.0f64));