rs_graph/
adapters.rs

1/*
2 * Copyright (c) 2020-2022 Frank Fischer <frank-fischer@shadow-soft.de>
3 *
4 * This program is free software: you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program.  If not, see  <http://www.gnu.org/licenses/>
16 */
17
18//! Graph adapters.
19//!
20//! Graph adapters are small types wrapping another graph type. A graph
21//! adapter provides a modified view on the underlying graph. For instance,
22//! the [`ReverseDigraph`] adapter swaps the direction of each (directed)
23//! edge of a wrapped digraph.
24//!
25//! Adapters do not copy the underlying graph, they just change the meaning
26//! of the methods.
27
28pub mod network;
29pub use self::network::{Network, NetworkEdge};
30
31mod reversedigraph;
32pub use self::reversedigraph::{reverse, ReverseDigraph};