PBR

This page contains the documentation for functionality in libsemigroups_pybind11 for PBR. Partitioned binary relations (PBRs) are a generalisation of bipartitions, which were introduced by Martin and Mazorchuk.

PBR

Copy constructor.

PBR.__getitem__

Returns the nodes adjacent to the given node.

PBR.__eq__

Equality comparison.

PBR.__lt__

Less than comparison.

PBR.__mul__

Right multiply self by that.

PBR.degree

Returns the degree of a PBR.

PBR.identity

Returns the identity PBR with degree degree().

PBR.make

Overloaded function.

PBR.make_identity

Returns the identity PBR with specified degree.

PBR.product_inplace

Multiply two PBR objects and store the product in self.

class PBR(self: _libsemigroups_pybind11.PBR, that: _libsemigroups_pybind11.PBR)

Copy constructor.

Parameters

that (PBR) -- the PBR to copy.

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

Equality comparison.

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

Parameters

that (PBR) -- the PBR for comparison.

Returns

A bool.

__getitem__(self: _libsemigroups_pybind11.PBR, i: int) List[int]

Returns the nodes adjacent to the given node.

Parameters

i (int) -- an integer

Returns

A int.

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

Less than comparison.

Returns True if self is less than that.

Parameters

that (PBR) -- the PBR for comparison.

Returns

A bool.

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

Right multiply self by that.

Parameters

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

Returns

A PBR.

degree(self: _libsemigroups_pybind11.PBR) int

Returns the degree of a PBR.

Parameters

None.

Returns

An int.

identity(self: _libsemigroups_pybind11.PBR) _libsemigroups_pybind11.PBR

Returns the identity PBR with degree degree().

Parameters

None.

Returns

A PBR.

static make(*args, **kwargs)

Overloaded function.

  1. make(left: List[List[int]], right: List[List[int]]) -> _libsemigroups_pybind11.PBR

    Construct and validate.

    Parameters
    • left (List[List[int]]) - the 1st argument to forward to the constructor.

    • right (List[List[int]]) - the 2nd argument to forward to the constructor.

    Returns

    A PBR constructed from left and right, and validated.

  2. make(adj: List[List[int]]) -> _libsemigroups_pybind11.PBR

    Construct and validate.

    Parameters
    • adj (List[List[int]]) - the list of adjacencies.

    Returns

    A new PBR.

static make_identity(n: int) _libsemigroups_pybind11.PBR

Returns the identity PBR with specified degree.

Parameters

n (int) - the degree.

Returns

A PBR.

product_inplace(self: _libsemigroups_pybind11.PBR, x: _libsemigroups_pybind11.PBR, y: _libsemigroups_pybind11.PBR, thread_id: int) None

Multiply two PBR objects and store the product in self.

Parameters
  • x (PBR) -- a PBR.

  • y (PBR) -- a PBR.

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

Returns

(None)