rs_graph/lib.rs
1// Copyright (c) 2015-2023 Frank Fischer <frank-fischer@shadow-soft.de>
2//
3// This program is free software: you can redistribute it and/or
4// modify it under the terms of the GNU General Public License as
5// published by the Free Software Foundation, either version 3 of the
6// License, or (at your option) any later version.
7//
8// This program is distributed in the hope that it will be useful, but
9// WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// General Public License for more details.
12//
13// You should have received a copy of the GNU General Public License
14// along with this program. If not, see <http://www.gnu.org/licenses/>
15//
16
17//#![forbid(unsafe_code)]
18
19//! A library for basic graph data structures and algorithms.
20
21mod num {
22 pub use num_iter as iter;
23 pub use num_traits as traits;
24}
25
26// # Data structures
27
28pub mod traits;
29pub use self::traits::{Digraph, Graph};
30pub use self::traits::{IndexDigraph, IndexGraph};
31pub use self::traits::{NumberedDigraph, NumberedGraph};
32
33pub mod adapters;
34pub use self::adapters::{reverse, Network, ReverseDigraph};
35
36pub mod adjacencies;
37
38// pub mod filtered;
39
40pub mod builder;
41pub use crate::builder::{Buildable, Builder};
42
43pub mod linkedlistgraph;
44pub use self::linkedlistgraph::LinkedListGraph;
45
46pub mod vecgraph;
47pub use self::vecgraph::VecGraph;
48
49pub mod attributes;
50pub use self::attributes::{AttributedGraph, EdgeAttributes, NodeAttributes};
51
52/// Graph classes
53pub mod classes;
54
55/// The default graph type.
56///
57/// A vector graph with up to 2^31 nodes and edges.
58pub type Net = self::VecGraph<u32>;
59
60pub mod collections;
61
62// # Algorithms
63
64pub mod algorithms;
65pub mod branching;
66pub mod maxflow;
67pub mod mcf;
68pub mod mst;
69pub mod search;
70pub mod shortestpath;
71
72// # Drawing
73
74pub mod draw;
75pub mod string;
76
77#[cfg(feature = "dimacs")]
78pub mod dimacs;
79#[cfg(feature = "mps")]
80pub mod mps;
81#[cfg(feature = "steinlib")]
82pub mod steinlib;