Bipartition

This page contains the documentation for functionality in libsemigroups_pybind11 for bipartitions.

Bipartition

A bipartition is a partition of the set \(\{0, ..., 2n - 1\}\) for some non-negative integer \(n\) see the Semigroups package for GAP documentation for more details.

Bipartition.__getitem__

Returns the index of the block containing a value.

Bipartition.__eq__

Equality comparison.

Bipartition.__lt__

Less than comparison.

Bipartition.__mul__

Right multiply self by that.

Bipartition.degree

Returns the degree of the Bipartition.

Bipartition.identity

Returns an identity bipartition.

Bipartition.left_blocks

Returns an iterator pointing to the index of the first left

Bipartition.make

Validates the arguments, constructs a bipartition and validates it.

Bipartition.make_identity

Returns an identity bipartition.

Bipartition.product_inplace

Modify the current bipartition in-place to contain the product of two bipartitions.

Bipartition.rank

Returns the number of transverse blocks.

Bipartition.right_blocks

Returns an iterator pointing to the index of the first right block.

class Bipartition(self: _libsemigroups_pybind11.Bipartition, arg0: _libsemigroups_pybind11.Bipartition)

A bipartition is a partition of the set \(\{0, ..., 2n - 1\}\) for some non-negative integer \(n\) see the Semigroups package for GAP documentation for more details.

__eq__(self: _libsemigroups_pybind11.Bipartition, that: _libsemigroups_pybind11.Bipartition) bool

Equality comparison.

Returns True if self equals that by comparing their image values.

Parameters

that (Bipartition) -- the Bipartition for comparison.

Returns

A bool.

__getitem__(self: _libsemigroups_pybind11.Bipartition, i: int) int

Returns the index of the block containing a value.

Parameters

i (int) -- an integer

Returns

A int.

__lt__(self: _libsemigroups_pybind11.Bipartition, that: _libsemigroups_pybind11.Bipartition) bool

Less than comparison.

Returns True if self is less than that.

Parameters

that (Bipartition) -- the Bipartition for comparison.

Returns

A bool.

__mul__(self: _libsemigroups_pybind11.Bipartition, that: _libsemigroups_pybind11.Bipartition) _libsemigroups_pybind11.Bipartition

Right multiply self by that.

Parameters

that (Bipartition) -- the Bipartition to multiply with.

Returns

A Bipartition.

degree(self: _libsemigroups_pybind11.Bipartition) int

Returns the degree of the Bipartition.

Parameters

None.

Returns

An int.

identity(self: _libsemigroups_pybind11.Bipartition) _libsemigroups_pybind11.Bipartition

Returns an identity bipartition.

Returns

A newly constructed Bipartition.

is_transverse_block(self: _libsemigroups_pybind11.Bipartition, index: int) bool

Check if a block is a transverse block.

Parameters

index (int) -- the index of a block

Returns

A bool.

left_blocks(self: _libsemigroups_pybind11.Bipartition) Iterator

Returns an iterator pointing to the index of the first left block.

Parameters

None.

Returns

An iterator.

lookup(self: _libsemigroups_pybind11.Bipartition) List[bool]

Returns a list whose i-th entry indicates whether or not the block with index i is transverse or not.

Parameters

None.

Returns

A list.

static make(arg0: List[int]) _libsemigroups_pybind11.Bipartition

Validates the arguments, constructs a bipartition and validates it.

static make_identity(n: int) _libsemigroups_pybind11.Bipartition

Returns an identity bipartition.

Parameters

n (int) - the degree of the identity to be returned.

Returns

A newly constructed Bipartition.

number_of_blocks(self: _libsemigroups_pybind11.Bipartition) int

Returns the number of blocks in a Bipartition.

Parameters

None.

Returns

An int.

number_of_left_blocks(self: _libsemigroups_pybind11.Bipartition) int

Returns the number of blocks containing a positive integer.

Parameters

None.

Returns

An int.

number_of_right_blocks(self: _libsemigroups_pybind11.Bipartition) int

Returns the number of blocks containing a negative integer.

Parameters

None.

Returns

An int.

product_inplace(self: _libsemigroups_pybind11.Bipartition, x: _libsemigroups_pybind11.Bipartition, y: _libsemigroups_pybind11.Bipartition, thread_id: int = 0) None

Modify the current bipartition in-place to contain the product of two bipartitions.

Parameters
  • x (Bipartition) -- the first bipartition to multiply

  • y (Bipartition) -- the second bipartition to multiply

  • thread_id (int) -- the index of the calling thread (defaults to 0)

Returns

(None)

rank(self: _libsemigroups_pybind11.Bipartition) int

Returns the number of transverse blocks.

Parameters

None.

Returns

An int

right_blocks(self: _libsemigroups_pybind11.Bipartition) Iterator

Returns an iterator pointing to the index of the first right block.

Parameters

None.

Returns

An iterator.