pyphi.partition.directed_bipartition_of_one#
- pyphi.partition.directed_bipartition_of_one(seq)[source]#
Generate directed bipartitions where one part is of length 1.
- Parameters:
seq (Iterable) – The sequence to partition.
- Returns:
Iterator[tuple[tuple, tuple]] – An iterator over each
(single, remainder)bipartition and its reverse. Bipartitions with an empty part are excluded, so a single-element sequence yields nothing.
Examples
>>> partitions = directed_bipartition_of_one((1, 2, 3)) >>> list(partitions) [((1,), (2, 3)), ((2,), (1, 3)), ((3,), (1, 2)), ((2, 3), (1,)), ((1, 3), (2,)), ((1, 2), (3,))] >>> list(directed_bipartition_of_one((1,))) []