diplib/graph.h file

Representing graphs and working with an image as a graph. See Graphs.

Contents

Classes

class dip::Graph
A non-directed, edge-weighted graph.
class dip::DirectedGraph
A directed, edge-weighted graph.

Functions

auto dip::MinimumSpanningForest(dip::Graph const& graph, std::vector<Graph::VertexIndex> const& roots = {}) -> dip::Graph
Computes the minimum spanning forest (MSF) of a graph using Prim’s algorithm.
void dip::GraphCut(dip::DirectedGraph& graph, dip::DirectedGraph::VertexIndex sourceIndex, dip::DirectedGraph::VertexIndex sinkIndex)
Computes the minimum cut of the graph, separating the source node from the sink node.
auto dip::Label(dip::Graph const& graph) -> dip::LabelMap
Connected component analysis of a graph.
auto dip::Label(dip::DirectedGraph const& graph) -> dip::LabelMap
Connected component analysis of a graph.