pyphi.partition#

Utilities for generating partitions.

Functions

all_edge_cuts(node_indices[, node_labels])

Yield every edge cut on the given nodes (with the complete cut).

all_joint_partitions(mechanism, purview[, ...])

Return all possible partitions of a mechanism and purview.

atomic_joint_partition(elements)

Return the partition that isolates every element.

bidirectional_edge_cuts(node_indices[, ...])

Yield every bidirectional (symmetric) edge cut on the given nodes.

bipartition(seq[, nontrivial])

Return a list of bipartitions for a sequence.

bipartition_indices(N)

Return indices for undirected bipartitions of a sequence.

bipartition_of_one(seq)

Generate bipartitions where one part contains exactly one element.

complete_joint_partition(mechanism, purview)

Return the partition that disconnects mechanism and purview entirely.

directed_bipartition(seq[, nontrivial])

Return a list of directed bipartitions for a sequence.

directed_bipartition_indices(N)

Return indices for directed bipartitions of a sequence.

directed_bipartition_of_one(seq)

Generate directed bipartitions where one part is of length 1.

directed_bipartitions(nodes)

Yield every nontrivial directed bipartition of the given nodes.

directed_bipartitions_cut_one(nodes)

Yield directed bipartitions where one part has a single node.

directed_bipartitions_sequential(nodes[, ...])

Yield directed bipartitions by linearly splitting the node sequence.

directed_set_partitions(node_indices[, ...])

Yield every directed set partition of the given nodes.

directed_tripartition(seq)

Generator over all directed tripartitions of a sequence.

directed_tripartition_indices(N)

Return indices for directed tripartitions of a sequence.

joint_bipartitions(mechanism, purview[, ...])

Return a generator of all φ bipartitions of a mechanism over a purview.

k_partitions(collection, k)

Generate all k-partitions of a collection.

mechanism_partitions(mechanism, purview[, ...])

Return a generator over all mechanism-purview partitions, based on the current configuration.

num_edge_cuts(n)

Return the number of possible edge cuts on n nodes.

reverse_elements(seq)

Yield each element of seq reversed.

system_partitions(nodes[, node_labels, ...])

Return the currently configured system partitions for the given nodes.

wedge_tripartitions(mechanism, purview[, ...])

Return an iterator over all wedge partitions.

Classes

AtomicJointPartition(*parts[, node_labels])

Represents the partition that separates all inter-element connections.

CompleteJointPartition(*parts[, node_labels])

Represents the partition that completely separates mechanism and purview.

PartitionRegistry()

Storage for mechanism-level partition schemes registered with PyPhi.

SystemPartitionRegistry()

Storage for system-level partition schemes registered with PyPhi.