Skip to main content

Module graph

Module graph 

Source
Expand description

Graph containers, formatters, and random graph/tree generators. Graph containers and random graph generators.

This module covers both representation and construction. You can build graphs manually, generate structured families such as trees or DAGs, inspect adjacency representations, and merge or relabel existing graphs.

§Example

use hpdg::graph::Graph;

let graph = Graph::chain(5, None, false, None);
assert_eq!(graph.node_count(), 5);
assert_eq!(graph.edge_count(), 4);

§Display-Oriented Output

Many graph utilities in this module can be inspected directly as text:

Structs§

Edge
Graph edge with an optional integral weight.
Graph
Adjacency-list graph container used by most graph APIs in the crate.
GraphGenOptions
Options shared by some graph-generation helpers.
GraphMatrix
Dense adjacency-matrix helper.
GraphStats
Summary statistics for a Graph.
Merger
Merge multiple graphs into one graph view.
SwitchGraph
A switchable multigraph to perform edge-switch operations.

Enums§

DegreeSequence
Degree-sequence input accepted by Graph::from_degree_sequence.