competitive/graph/
mod.rs

1//! graph structures and algorithms
2
3use crate::{
4    algebra::{Monoid, SemiRing},
5    algorithm::BitDpExt,
6    num::Bounded,
7    tools::{IterScan, MarkedIterScan, PartialIgnoredOrd},
8};
9
10#[codesnip::entry("AdjacencyListGraph")]
11pub use self::adjacency_list::{AdjacencyListGraph, AdjacencyListGraphScanner};
12#[codesnip::entry("BipartiteMatching")]
13pub use self::bipartite_matching::BipartiteMatching;
14#[codesnip::entry("ClosureGraph")]
15pub use self::closure::{ClosureGraph, UsizeGraph};
16#[codesnip::entry("dulmage_mendelsohn_decomposition")]
17pub use self::dulmage_mendelsohn_decomposition::dulmage_mendelsohn_decomposition;
18#[codesnip::entry("EdgeListGraph")]
19pub use self::edge_list::{EdgeListGraph, EdgeListGraphScanner};
20#[codesnip::entry("GraphBase")]
21pub use self::graph_base::*;
22#[codesnip::entry("GridGraph")]
23pub use self::grid::GridGraph;
24#[codesnip::entry("LowLink")]
25pub use self::low_link::LowLink;
26#[codesnip::entry("Dinic")]
27pub use self::maximum_flow::{Dinic, DinicBuilder};
28#[codesnip::entry("PrimalDual")]
29pub use self::minimum_cost_flow::{PrimalDual, PrimalDualBuilder};
30#[codesnip::entry("ProjectSelectionProblem")]
31pub use self::project_selection_problem::ProjectSelectionProblem;
32#[codesnip::entry("shortest_path")]
33pub use self::shortest_path::*;
34#[codesnip::entry("SparseGraph")]
35pub use self::sparse_graph::*;
36#[codesnip::entry("steiner_tree")]
37pub use self::steiner_tree::{SteinerTreeExt, SteinerTreeOutput};
38#[codesnip::entry("StronglyConnectedComponent")]
39pub use self::strongly_connected_component::StronglyConnectedComponent;
40#[codesnip::entry("TwoSatisfiability")]
41pub use self::two_satisfiability::TwoSatisfiability;
42
43#[cfg_attr(nightly, codesnip::entry("AdjacencyListGraph", include("scanner")))]
44mod adjacency_list;
45#[cfg_attr(nightly, codesnip::entry("BipartiteMatching"))]
46mod bipartite_matching;
47#[cfg_attr(nightly, codesnip::entry("ClosureGraph", include("GraphBase")))]
48mod closure;
49#[cfg_attr(
50    nightly,
51    codesnip::entry(
52        "dulmage_mendelsohn_decomposition",
53        include("BipartiteMatching", "StronglyConnectedComponent")
54    )
55)]
56mod dulmage_mendelsohn_decomposition;
57#[cfg_attr(nightly, codesnip::entry("EdgeListGraph", include("scanner")))]
58mod edge_list;
59#[cfg_attr(nightly, codesnip::entry("GraphBase"))]
60mod graph_base;
61#[cfg_attr(nightly, codesnip::entry("graphvis", include("SparseGraph")))]
62mod graphvis;
63#[cfg_attr(nightly, codesnip::entry("GridGraph", include("GraphBase")))]
64mod grid;
65#[cfg_attr(nightly, codesnip::entry("LowLink", include("SparseGraph")))]
66mod low_link;
67#[cfg_attr(nightly, codesnip::entry("Dinic", include("SparseGraph")))]
68mod maximum_flow;
69#[cfg_attr(nightly, codesnip::entry("PrimalDual", include("SparseGraph")))]
70mod minimum_cost_flow;
71mod minimum_spanning_tree;
72mod order;
73#[cfg_attr(nightly, codesnip::entry("ProjectSelectionProblem", include("Dinic")))]
74mod project_selection_problem;
75#[cfg_attr(
76    nightly,
77    codesnip::entry(
78        "shortest_path",
79        include("GraphBase", "ring", "PartialIgnoredOrd", "bounded")
80    )
81)]
82mod shortest_path;
83#[cfg_attr(
84    nightly,
85    codesnip::entry("SparseGraph", include("scanner", "GraphBase"))
86)]
87mod sparse_graph;
88#[cfg_attr(
89    nightly,
90    codesnip::entry("steiner_tree", include("shortest_path", "BitDp"))
91)]
92mod steiner_tree;
93#[cfg_attr(
94    nightly,
95    codesnip::entry("StronglyConnectedComponent", include("SparseGraph"))
96)]
97mod strongly_connected_component;
98#[cfg_attr(nightly, codesnip::entry("topological_sort", include("SparseGraph")))]
99mod topological_sort;
100#[cfg_attr(
101    nightly,
102    codesnip::entry("TwoSatisfiability", include("StronglyConnectedComponent"))
103)]
104mod two_satisfiability;