pyphi.campaign.shards.bottleneck_order#
- pyphi.campaign.shards.bottleneck_order(partitions, indices, cm, direction)[source]#
Reorder a partition slice so likely-reducible partitions come first.
Sorts by ascending count of severed present connections: a partition that cuts no present connection yields φ = 0, so on sparse substrates the sweep’s zero-φ short-circuit fires within the first evaluations. Ordering never affects results — the minimum is order-independent and tie resolution runs on the collected set — only time to short-circuit. The sort is stable, so equal-count partitions keep enumeration order.