Expand description
Graph operators (ALGO-OP-*). Phase 1: simplify (remove loops and/or
parallel edges, returning a new crate::Graph).
Structs§
- Bipartite
Projection - Result of a bipartite projection.
- Bipartite
Projection Size - Sizes of both bipartite projections.
- Even
Tarjan Result - Result of the Even-Tarjan reduction.
- Induced
Subgraph Result - Result of an induced subgraph extraction.
- Residual
Graph Result - Result of the residual graph computation.
- Subgraph
From Edges Result - Result of a subgraph-from-edges extraction.
Enums§
- Graph
Product Type - Selects which graph product type to compute.
- Rewire
Directed Mode - Which endpoint of a directed edge to rewire.
- ToDirected
Mode - Mode for converting an undirected graph to directed.
- ToUndirected
Mode - Mode for converting a directed graph to undirected.
Functions§
- bipartite_
projection - Project a bipartite graph onto one of its vertex types.
- bipartite_
projection_ size - Compute sizes of both bipartite projections without building them.
- cartesian_
product - Computes the Cartesian product of two graphs.
- complementer
- Returns the complementer of
graph. - compose
- Computes the composition of two graphs.
- connect_
neighborhood - Returns a new graph where each vertex is connected to all vertices
reachable within
ordersteps in the original graph. - contract_
vertices - Contracts vertices according to a grouping, merging edges.
- difference
- Returns
orig \ sub: the multiset difference of the edges. - disjoint_
union - Returns the disjoint union of
leftandright. - disjoint_
union_ many - Disjoint union of any number of graphs (ALGO-OP-002b).
- even_
tarjan_ reduction - Compute the Even-Tarjan reduction of a graph.
- graph_
power - Returns the k-th power of a graph as a simple graph.
- graph_
product - Computes a graph product selected by
product_type. - induced_
subgraph - Creates the subgraph induced by the specified vertices.
- induced_
subgraph_ edges - Returns the IDs of edges whose both endpoints lie in
vids. - intersection
- Returns the intersection of
leftandright. - intersection_
many - Returns the intersection of multiple graphs.
- invert_
permutation - Invert a permutation vector.
- is_
same_ graph - Returns
trueiffg1andg2are identical as labelled graphs: same vertex count, same directedness, same edge multiset. Edges differing only in storage order (or, for undirected, in endpoint orientation) are treated as identical. - join
- Creates the join of two graphs.
- lexicographic_
product - Computes the lexicographic product of two graphs.
- line_
graph - Construct the line graph L(G) of the input graph.
- modular_
product - Computes the modular product of two graphs.
- permute_
vertices - Creates a new graph with vertices permuted according to the given mapping.
- residual_
graph - Compute the residual graph given capacity and flow vectors.
- reverse
- Returns a new graph with all edge directions reversed.
- reverse_
edges - Returns a new graph with only the specified edges reversed.
- reverse_
residual_ graph - Compute the reverse-residual graph given capacity and flow vectors.
- rewire
- Randomly rewires a graph while preserving its degree sequence.
- rewire_
directed_ edges - Rewires one endpoint of directed edges with constant probability.
- rewire_
edges - Rewires graph edges with constant probability.
- rooted_
product - Computes the rooted product of two graphs.
- simplify
- Return a copy of
graphwith self-loops and/or parallel edges removed. - strong_
product - Computes the strong product of two graphs.
- subgraph_
from_ edges - Create a subgraph containing only the specified edges.
- tensor_
product - Computes the tensor (categorical/direct) product of two graphs.
- to_
directed - Converts an undirected graph to a directed graph.
- to_
undirected - Converts a directed graph to an undirected graph.
- union
- Returns the union of
leftandright. - union_
many - Returns the union of multiple graphs.