models.cuts
¶
-
class
pyphi.models.cuts.
Cut
¶ Represents a unidirectional cut.
-
severed
¶ tuple(int – Connections from this group of nodes to those in
intact
are severed.
-
intact
¶ tuple(int – Connections to this group of nodes from those in
severed
are severed.
-
indices
¶ Returns the indices of this cut.
-
splits_mechanism
(mechanism)¶ Check if this cut splits a mechanism.
Parameters: mechanism (tuple(int) – The mechanism in question Returns: - True if mechanism has elements on both sides
- of the cut, otherwise False.
Return type: (bool)
-
cuts_connections
(a, b)¶ Check if this cut severs any connections from nodes a to b.
-
all_cut_mechanisms
()¶ Return all mechanisms with elements on both sides of this cut.
Returns: tuple Return type: tuple(int
-
cut_matrix
()¶ Compute the cut matrix for this cut.
The cut matrix is a square matrix which represents connections severed by the cut. The matrix is shrunk to the size of the cut subsystem–not necessarily the size of the entire network.
Example
>>> cut = Cut((1,), (2,)) >>> cut.cut_matrix() array([[ 0., 1.], [ 0., 0.]])
-
-
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 3-node subsystem, we partition the system in the following way:
mechanism: A C B ----- X ----- purview: B A C
This class represents one term in the above product.
-