1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#![doc(html_root_url="https://docs.rs/fera-graph/0.1.0/")]
#![cfg_attr(feature = "cargo-clippy", allow(inline_always))]

//! Graph data structures and algorithms.

#[cfg(test)]
extern crate itertools;

#[cfg(feature = "quickcheck")]
extern crate quickcheck;

extern crate fera_fun;
extern crate fera_optional;
extern crate fera_unionfind;
extern crate num_traits;
extern crate rand;

#[cfg(test)]
#[macro_use]
pub mod tests;

// basic
#[macro_use]
pub mod builder;

#[macro_use]
pub mod params;

pub mod algs;
pub mod graphs;
pub mod props;
pub mod traverse;

// others
#[cfg(feature = "quickcheck")]
pub mod arbitrary;
pub mod choose;
pub mod ext;
pub mod sets;
pub mod unionfind;

mod fun;
pub use fun::*;

/// The fera graph prelude.
pub mod prelude {
    pub use graphs::adjset::{AdjSetGraph, AdjSetDigraph};
    pub use graphs::complete::{CompleteGraph, CompleteDigraph};
    pub use graphs::static_::{StaticGraph, StaticDigraph};
    pub use graphs::adaptors::{Subgraph, SpanningSubgraph, WithSubgraph};
    pub use graphs::{
        Adjacency,
        AdjacencyDigraph,
        AdjacencyGraph,
        DefaultEdgePropMut,
        DefaultVertexPropMut,
        Digraph,
        Directed,
        Edge,
        EdgeIndexProp,
        EdgeIter,
        EdgeKind,
        EdgeList,
        EdgeTypes,
        Graph,
        GraphItem,
        Incidence,
        IncidenceDigraph,
        IncidenceGraph,
        Mixed,
        OptionEdge,
        OptionVertex,
        Orientation,
        OutEdgeIter,
        OutNeighborIter,
        Undirected,
        UniformEdgeKind,
        Vertex,
        VertexIndexProp,
        VertexIter,
        VertexList,
        VertexTypes,
        WithEdge,
        WithVertex,
    };
    pub use props::{
        BasicEdgeProps,
        BasicProps,
        BasicVertexProps,
        EdgeProp,
        EdgePropGet,
        EdgePropMut,
        EdgePropMutNew,
        PropGet,
        PropIndexMut,
        VertexProp,
        VertexPropGet,
        VertexPropMut,
        VertexPropMutNew,
        WithEdgeIndexProp,
        WithEdgeProp,
        WithVertexIndexProp,
        WithVertexProp,
    };
    pub use builder::{Builder, WithBuilder};
    pub use ext::{GraphsSliceExt, GraphsVecExt};
    pub use fera_optional::Optional;
}