Bipartition helpers
This page contains the documentation for various helper functions for manipulating bipartitions.
This page contains the documentation for the bipartition subpackage, that
contains helper functions for the Bipartition class.
- bipartition.one(f: Bipartition) Bipartition
- Return the identity bipartition with the same degree as the given bipartition. - The identity bipartition of degree \(n\) has blocks \(\{i, -i\}\) for all \(i\in \{0, \ldots, n - 1\}\). This function returns a new identity bipartition of degree equal to the degree of self. - Parameters:
- f (Bipartition) – a bipartition 
- Returns:
- A newly constructed - Bipartition.
- Return type:
 
- bipartition.underlying_partition(f: Bipartition) list[list[int]]
- Return the underlying partition of a - Bipartitionobject. The underlying partition of a bipartition f is the partition of a subset \(P\) of \(\{-n, \ldots, -1\}\cup \{1, \ldots, n\}\) such that:- \(\{|y|\mid y\in P\} = \{1, \ldots, n\}\) ; 
- a block of the partition consists of negative numbers if and only if the corresponding block of y is a transverse block. 
 - Parameters:
- f (Bipartition) – the bipartition 
- Returns:
- The underlying partition of the - Bipartition.
- Return type:
- Complexity:
- \(O(n)\) where \(n\) is the degree().