combin · Graph¶
29 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.
Worked example¶
The complete checked program Canonically label a cycle and compute its automorphism group uses this API directly.
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Benjamin Antieau and Deven Manam
"""Canonically label a cycle and compute its automorphism group."""
from noether.combin import Graph
def main() -> None:
cycle = Graph.from_unweighted(
5,
[(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)],
directed=False,
)
canonical = cycle.canonical_label()
assert canonical.verify(cycle)
assert canonical.automorphism_group.order == 10
assert cycle.laplacian()[0] == [2, -1, 0, 0, -1]
print(f"Aut(C5) has order {canonical.automorphism_group.order}")
if __name__ == "__main__":
main()
Run it with .venv/bin/python examples/21_graph_symmetry.py.
combin.Graph¶
The thin Python projection of Noether's CSR graph value.
Detailed contract
The thin Python projection of Noether's CSR graph value.
Canonical defining content is the wrapped graph_core::Graph value:
(order, edges, directed). Serialization delegates to that value and
never exposes its derived CSR layout. The optional display name is
deliberately not mathematical identity.
Construct via Graph.from_edges (with weights) or
Graph.from_unweighted (every edge weight = 1). Directed or
undirected; parallel edges and self-loops are accepted verbatim
(graph-core is multigraph-capable).
noether::combin::Graph · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: examples/21_graph_symmetry.py:5 · examples/21_graph_symmetry.py:9 · validation/unit/combin/test_acceptance_workload.py:10 · validation/unit/combin/test_acceptance_workload.py:90 · validation/unit/combin/test_graph_facade.py:110 · validation/unit/combin/test_graph_facade.py:114
combin.Graph.__eq__¶
Test mathematical equality with another value.
noether::combin::Graph · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
combin.Graph.automorphism_group¶
The exact automorphism group acting on this graph's vertex ids.
noether::combin::Graph::automorphism_group · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | released |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: examples/21_graph_symmetry.py:16 · examples/21_graph_symmetry.py:18 · examples/29_integral_line_configurations.py:10 · validation/unit/category/test_category.py:55 · validation/unit/combin/test_acceptance_workload.py:31 · validation/unit/combin/test_graph_facade.py:91
combin.Graph.bfs¶
Breadth-first search from source.
Detailed contract
Breadth-first search from source. Returns a [Traversal]
(order / predecessor / depth /
path_to). Raises IndexError if source >= order.
Run breadth-first search from source. The traversal uses the graph’s deterministic ascending-neighbor order. §Errors GraphError::VertexOutOfRange if source >= self.order().
noether::combin::Graph::bfs · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | released |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_graph_facade.py:27 · validation/unit/combin/test_graph_facade.py:71 · validation/parity/u1_graph_core.py:274 · validation/parity/u1_graph_core.py:310 · validation/parity/u1_graph_core.py:41
combin.Graph.canonical_label¶
Compute an exact canonical labeling of this directed, weighted multigraph.
Detailed contract
Compute an exact canonical labeling of this directed, weighted multigraph. The result also carries the native automorphism group found by the same bounded individualization/refinement search.
noether::combin::Graph::canonical_label · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | released |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: examples/21_graph_symmetry.py:14 · validation/unit/category/test_category.py:16 · validation/unit/category/test_category.py:17 · validation/unit/combin/test_graph_facade.py:84 · validation/unit/combin/test_graph_facade.py:85 · validation/unit/combinatorics/test_poset.py:106
combin.Graph.connected_components¶
Connected (weak, for digraphs) component labelling.
Detailed contract
Connected (weak, for digraphs) component labelling. Returns a
[Components].
Never fails.
Compute the canonical weakly connected-component labeling.
noether::combin::Graph::connected_components · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | released |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_graph_facade.py:32 · validation/unit/combinatorics/test_poset.py:82 · validation/parity/combinatorics/test_tree_core_parity.py:258 · validation/parity/u1_graph_core.py:310 · validation/parity/u1_graph_core.py:43 · validation/backends/graph/igraph_oracle.py:10
combin.Graph.csr_adjacency¶
The raw CSR (offsets, targets) arrays.
Detailed contract
The raw CSR (offsets, targets) arrays.
offsets has length order + 1; vertex v's neighbours are
targets[offsets[v] : offsets[v + 1]], sorted ascending.
Returns (list[int], list[int]).
noether::combin::Graph · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/parity/u1_graph_core.py:30 · validation/parity/u1_graph_core.py:309
combin.Graph.degree¶
The out-degree of v (or, for an undirected graph, the degree, with a self-loop contributing 1).
Detailed contract
The out-degree of v (or, for an undirected graph, the
degree, with a self-loop contributing 1).
Raises IndexError if v >= order.
The out-degree of v (for an undirected graph, the degree, with a self-loop contributing 1). §Panics Panics if v >= order().
noether::combin::Graph::degree · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: examples/14_weighted_polynomials.py:16 · examples/14_weighted_polynomials.py:18 · examples/15_groebner_twisted_cubic.py:15 · examples/15_groebner_twisted_cubic.py:28 · examples/31_local_fields_and_precision.py:37 · examples/33_simplicial_cohomology_operations.py:26
combin.Graph.degree_sequence¶
The degree of each vertex, sorted descending (undirected; a self-loop would contribute 2, but simple graphs have none).
Detailed contract
The degree of each vertex, sorted descending (undirected; a self-loop would contribute 2, but simple graphs have none).
noether::combin::Graph::degree_sequence · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_acceptance_workload.py:93 · validation/corpus/combin/bernhart-kainen-algebraic-graph.py:24 · validation/corpus/combin/bernhart-kainen-algebraic-graph.py:43 · validation/corpus/linalg/graph-minimum-rank-witness.py:27
combin.Graph.dfs¶
Depth-first search from source.
Detailed contract
Depth-first search from source. Iterative (no recursion). Returns a
[Traversal].
Raises IndexError if source >= order.
Run iterative depth-first search from source. §Errors GraphError::VertexOutOfRange if source >= self.order().
noether::combin::Graph::dfs · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | released |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/parity/u1_graph_core.py:310 · validation/parity/u1_graph_core.py:41
combin.Graph.edge_count¶
The number of edges (each undirected pair counted once; parallel edges counted with multiplicity).
Detailed contract
The number of edges (each undirected pair counted once; parallel edges counted with multiplicity).
The number of edges as supplied (each undirected pair counted once; parallel edges counted with multiplicity).
noether::combin::Graph::edge_count · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_graph_facade.py:23 · validation/parity/u1_graph_core.py:34 · validation/parity/u1_graph_core.py:38 · validation/backends/graph/igraph_oracle.py:111 · validation/backends/graph/igraph_oracle.py:131 · validation/backends/graph/invariants.py:118
combin.Graph.edges¶
The defining edges as sorted [u, v] pairs, with weights dropped.
Detailed contract
The defining edges as sorted [u, v] pairs, with weights dropped. For
an undirected simple graph this is the
canonical edge multiset in construction order.
The user-supplied edges, in insertion order.
noether::combin::Graph::edges · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_graph_facade.py:101 · validation/unit/infra/test_magma_release_protocol.py:256 · validation/unit/infra/test_magma_release_protocol.py:258 · validation/parity/combinatorics/test_crystals_parity.py:82 · validation/parity/combinatorics/test_crystals_parity.py:88 · validation/parity/combinatorics/test_tree_core_parity.py:119
combin.Graph.from_edges¶
Construct a graph from a list of (source, target, weight) triples.
Detailed contract
Construct a graph from a list of (source, target, weight)
triples. directed is a
required positional (pass False for an undirected graph); it has
no default by design.
Raises ValueError if edges is not a list of weighted 3-tuples (for
unweighted (source, target) pairs use from_unweighted), and
IndexError if any endpoint is >= n.
Construct a graph from an edge list over n vertices. edges is (source, target, weight) triples. Pass weight 1 for an unweighted graph (or use [graph_from_unweighted]). directed selects the directed or undirected interpretation. Parallel edges and self-loops are accepted verbatim — this is a multigraph-capable constructor. §Errors GraphError::VertexOutOfRange if any endpoint is >= n. The empty graph (n = 0, no edges) and the edgeless graph (n > 0, no edges) are both valid.
noether::combin::Graph::from_edges · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_graph_facade.py:114 · validation/unit/combin/test_graph_facade.py:40 · validation/unit/combin/test_graph_facade.py:75 · validation/parity/combinatorics/test_tree_pyo3.py:17 · validation/parity/combinatorics/test_tree_pyo3.py:197 · validation/parity/combinatorics/test_tree_pyo3.py:280
combin.Graph.from_json¶
Deserialize and revalidate a graph's defining content.
noether::combin::Graph · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/category/test_category.py:14 · validation/unit/combin/test_acceptance_workload.py:65 · validation/unit/combin/test_acceptance_workload.py:86 · validation/unit/combin/test_graph_facade.py:106 · validation/unit/combin/test_graph_facade.py:25 · validation/unit/combinatorics/test_kashiwara_crystal.py:32
combin.Graph.from_unweighted¶
Construct an unweighted graph from a list of (source, target) pairs.
Detailed contract
Construct an unweighted graph from a list of (source, target)
pairs. Every
edge gets weight 1.
Raises IndexError if any endpoint is >= n.
Construct an unweighted graph from (source, target) pairs. Every edge receives weight 1. Parallel edges and self-loops are accepted, as in Graph::from_edges. §Errors GraphError::VertexOutOfRange if any endpoint is >= n.
noether::combin::Graph::from_unweighted · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: examples/21_graph_symmetry.py:9 · validation/unit/combin/test_acceptance_workload.py:90 · validation/unit/combin/test_graph_facade.py:110 · validation/unit/combin/test_graph_facade.py:19 · validation/unit/combin/test_graph_facade.py:55 · validation/unit/combin/test_graph_facade.py:68
combin.Graph.is_directed¶
True if this is a directed graph, False for undirected.
Detailed contract
true if this is a directed graph.
noether::combin::Graph::is_directed · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combinatorics/test_poset.py:25
combin.Graph.laplacian¶
The Laplacian matrix L = D - A as a dense list[list[int]], computed from the defining edges (treated as undirected).
Detailed contract
The Laplacian matrix L = D - A as a dense list[list[int]], computed
from the defining edges (treated as undirected).
noether::combin::Graph::laplacian · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: examples/21_graph_symmetry.py:17 · validation/unit/combin/test_acceptance_workload.py:94
combin.Graph.laplacian_spectrum¶
The Laplacian spectrum: eigenvalues of [laplacian] in ascending order.
Detailed contract
The Laplacian spectrum: eigenvalues of [laplacian] in ascending
order. The Laplacian is symmetric (undirected by construction, like
laplacian() itself), so every eigenvalue is real; the smallest is
always 0.0, with multiplicity equal to the number of connected
components. Bound-tier (native f64 via LAPACK dsyev) — the
Laplacian is exact-integer, so this trades exactness for the speed
and familiarity of a plain numeric spectrum (the convention every
other graph library uses); raises on the (pathological) case where
LAPACK fails to converge.
noether::combin::Graph::laplacian_spectrum · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | documented numeric bound |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | released |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_acceptance_workload.py:96
combin.Graph.n_edges¶
The number of edges (len(edges)).
noether::combin::Graph · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_acceptance_workload.py:92
combin.Graph.n_vertices¶
The number of vertices (alias of order).
noether::combin::Graph · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/parity/polyhedral/test_convex_hull_parity.py:190
combin.Graph.name¶
The optional human-readable name (e.g.
Detailed contract
The optional human-readable name (e.g. "K_4"), or None.
noether::combin::Graph · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: examples/12_number_field_ideals.py:12 · validation/unit/commalg/test_polynomial_facade.py:345 · validation/unit/commalg/test_polynomial_facade.py:44 · validation/unit/commalg/test_polynomial_facade.py:61 · validation/unit/commalg/test_polynomial_facade.py:65 · validation/unit/commalg/test_polynomial_facade.py:72
combin.Graph.neighbors¶
Vertex v's out-neighbours (directed) or all neighbours (undirected), in ascending target-id order, with multiplicity.
Detailed contract
Vertex v's out-neighbours (directed) or all neighbours
(undirected), in ascending target-id order, with multiplicity.
Returns a list[int]. Raises IndexError if v >= order.
Vertex v’s out-neighbours (for a directed graph) or all neighbours (for an undirected graph), sorted ascending. Returns the slice with multiplicity — a vertex reached by k parallel edges appears k times. §Panics Panics if v >= order(). This is an internal index accessor, not a fallible entry point — callers within the crate hold v < n by construction. External callers should bound-check.
noether::combin::Graph::neighbors · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_graph_facade.py:24 · validation/unit/combin/test_graph_facade.py:51 · validation/unit/combin/test_graph_facade.py:73 · validation/corpus/combin/johnson-strongly-regular-graph.py:24 · validation/corpus/combin/johnson-strongly-regular-graph.py:25
combin.Graph.order¶
The number of vertices.
Detailed contract
The number of vertices. Valid vertex ids are 0..order.
The number of vertices. Valid vertex ids are 0..order().
noether::combin::Graph::order · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: examples/11_qadic_witt_vectors.py:14 · examples/12_number_field_ideals.py:13 · examples/12_number_field_ideals.py:14 · examples/12_number_field_ideals.py:17 · examples/15_groebner_twisted_cubic.py:18 · examples/19_permutation_groups.py:13
combin.Graph.reduced_laplacian¶
The reduced Laplacian: the Laplacian with the row and column of delete_vertex removed.
Detailed contract
The reduced Laplacian: the Laplacian with the row and column of
delete_vertex removed. Its cokernel is the sandpile group K(G).
Raises IndexError if delete_vertex is out of range.
noether::combin::Graph::reduced_laplacian · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_acceptance_workload.py:95 · validation/corpus/combin/igraph-grid-spanning-trees.py:14 · validation/corpus/combin/igraph-k4-spanning-trees.py:15
combin.Graph.shortest_path¶
A shortest s–t path.
Detailed contract
A shortest s–t path. Uses BFS when every edge weight is 1 and
Dijkstra otherwise.
Returns a [ShortestPath] when t is reachable, None when
it is not. Raises IndexError if s / t >= order or
ValueError on a negative weight reached by Dijkstra.
Compute a shortest path from source to target. Unit-weight graphs use BFS and other nonnegative graphs use Dijkstra. A missing path is Ok(None). §Errors GraphError::VertexOutOfRange if either endpoint is outside the graph, or GraphError::NegativeWeight if Dijkstra encounters a negative edge weight.
noether::combin::Graph::shortest_path · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | released |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_graph_facade.py:46 · validation/unit/combin/test_graph_facade.py:77 · validation/parity/u1_graph_core.py:311 · validation/parity/u1_graph_core.py:44 · validation/corpus/combin/cozero-divisor-wiener-index.py:21
combin.Graph.subgraph¶
The induced subgraph on vertices.
Detailed contract
The induced subgraph on vertices.
Returns a 2-tuple, not a bare Graph (the name notwithstanding):
(sub: Graph, vertex_map: list[int]), where new vertex i is the
original vertex vertex_map[i] — you need vertex_map to map results
back to the parent's vertex ids. Unpack it as sub, vmap = g.subgraph(...).
Raises IndexError if any entry of vertices is out of range.
The induced subgraph on vertices. Returns a new graph whose vertices are exactly the distinct entries of vertices, renumbered 0..k in the order they first appear, together with every edge of self both of whose endpoints lie in the set. Directedness, weights, and edge multiplicity are preserved. The returned Graph is paired with the vertex map — a Vec
noether::combin::Graph::subgraph · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_graph_facade.py:59 · validation/unit/combin/test_graph_facade.py:60 · validation/parity/u1_graph_core.py:106 · validation/parity/u1_graph_core.py:110 · validation/parity/u1_graph_core.py:286 · validation/parity/u1_graph_core.py:287
combin.Graph.to_json¶
Serialize the graph's validated defining content.
noether::combin::Graph · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/category/test_category.py:14 · validation/unit/category/test_category.py:15 · validation/unit/combin/test_acceptance_workload.py:30 · validation/unit/combin/test_acceptance_workload.py:65 · validation/unit/combin/test_acceptance_workload.py:86 · validation/unit/combin/test_graph_facade.py:106
combin.Graph.transpose¶
The reverse digraph.
Detailed contract
The reverse digraph. The identity on undirected graphs (returns a clone).
The reverse digraph: every edge u → v becomes v → u. For an undirected graph transposition is the identity — the returned graph equals self. For a directed graph the vertex set, weights, and edge multiplicity are preserved; only edge orientation flips. transpose(transpose(g)) == g for every graph g (the involution invariant — see the crate tests).
noether::combin::Graph::transpose · Direct Rust declaration
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: examples/39_kahler_differentials.py:26 · examples/distributed/f2_linear_algebra.py:31 · validation/unit/combin/test_graph_facade.py:51 · validation/unit/commalg/test_power_series_facade.py:347 · validation/unit/commalg/test_quotient_facade.py:162 · validation/unit/infra/test_boundary_properties.py:54
combin.Graph.weighted_edges¶
The defining (source, target, weight) triples in construction order.
Detailed contract
The defining (source, target, weight) triples in construction order.
This is the lossless edge view for directed, weighted, and multigraph
inputs.
noether::combin::Graph · Python projection
| Contract | Value |
|---|---|
| Guarantee | checked deterministic result |
| Determinism | deterministic |
| Availability | default CPU build |
| Domain implementation crates | noether, graph-core, perm-core |
| GIL | attached / bounded |
| Semantic ID | noether/combin/Graph@1 |
Executable usage: validation/unit/combin/test_graph_facade.py:50 · validation/unit/combinatorics/test_poset.py:26 · validation/parity/combinatorics/test_poset_parity.py:73