pyphi.partition.directed_bipartition#

pyphi.partition.directed_bipartition(seq, nontrivial=False)[source]#

Return a list of directed bipartitions for a sequence.

Parameters:
  • seq (Sequence) – The sequence to partition.

  • nontrivial (bool, optional) – If True, omit the two bipartitions that have an empty part (the first and last).

Returns:

list[tuple[tuple, tuple]] – A list of tuples containing each of the two parts.

Return type:

list[tuple[tuple, tuple]]

Examples

>>> directed_bipartition((1, 2, 3))
    [((), (1, 2, 3)),
     ((1,), (2, 3)),
     ((2,), (1, 3)),
     ((1, 2), (3,)),
     ((3,), (1, 2)),
     ((1, 3), (2,)),
     ((2, 3), (1,)),
     ((1, 2, 3), ())]