to_edgesΒΆ
- to_edges(poly: Poly) list[tuple[int, int]]ΒΆ
Convert a polynomial to its graph edge list.
Second-order terms are converted to edges, and first-order terms are represented as self-loops.
- Parameters:
poly (Poly) β Polynomial to convert.
- Returns:
Edges represented by node ID pairs.
- Return type:
list[tuple[int, int]]