models.cuts
¶
Objects that represent partitions of sets of nodes.

class
pyphi.models.cuts.
NullCut
(indices)¶ The cut that does nothing.

is_null
¶ This is the only cut where
is_null == True
.

indices
¶ Indices of the cut.

cut_matrix
(n)¶ Return a matrix of zeros.

to_json
()¶


class
pyphi.models.cuts.
Cut
¶ Represents a unidirectional cut.

from_nodes
¶ tuple[int] – Connections from this group of nodes to those in
to_nodes
are from_nodes.

to_nodes
¶ tuple[int] – Connections to this group of nodes from those in
from_nodes
are from_nodes.
Create new instance of Cut(from_nodes, to_nodes)

indices
¶ Returns the indices of this cut.

cut_matrix
(n)¶ Compute the cut matrix for this cut.
The cut matrix is a square matrix which represents connections severed by the cut.
Parameters: n (int) – The size of the network. Example
>>> cut = Cut((1,), (2,)) >>> cut.cut_matrix(3) array([[ 0., 0., 0.], [ 0., 0., 1.], [ 0., 0., 0.]])

to_json
()¶ Return a JSONserializable representation.


class
pyphi.models.cuts.
KCut
(direction, partition)¶ A cut that severs all connections between parts of a Kpartition.

indices
¶

cut_matrix
(n)¶ The matrix of connections that are severed by this cut.

to_json
()¶


class
pyphi.models.cuts.
ActualCut
(direction, partition)¶ Represents an cut for a
Transition
.
indices
¶


class
pyphi.models.cuts.
Part
¶ Represents one part of a
Bipartition
.
mechanism
¶ tuple[int] – The nodes in the mechanism for this part.

purview
¶ tuple[int] – The nodes in the mechanism for this part.
Example
When calculating \(\varphi\) of a 3node subsystem, we partition the system in the following way:
mechanism: A,C B ─── ✕ ─── purview: B A,C
This class represents one term in the above product.
Create new instance of Part(mechanism, purview)

to_json
()¶ Return a JSONserializable representation.


class
pyphi.models.cuts.
KPartition
¶ A partition with an arbitrary number of parts.
Construct the base tuple with multiple
Part
arguments.
__getnewargs__
()¶ And support unpickling with this
__new__
signature.

mechanism
¶ tuple[int] – The nodes of the mechanism in the partition.

purview
¶ tuple[int] – The nodes of the purview in the partition.

normalize
()¶ Normalize the order of parts in the partition.

to_json
()¶

classmethod
from_json
(dct)¶


class
pyphi.models.cuts.
Bipartition
¶ A bipartition of a mechanism and purview.

part0
¶ Part – The first part of the partition.

part1
¶ Part – The second part of the partition.
Construct the base tuple with multiple
Part
arguments.
to_json
()¶ Return a JSONserializable representation.

classmethod
from_json
(dct)¶
