pyphi.resolve_ties.resolve#
- pyphi.resolve_ties.resolve(objects, strategy, operation, default=<object object>)[source]#
Filter φ-objects to those extremal under
strategy.Strategy components apply lexicographically: for each component in order, the exact extremum of the component’s key is computed over the surviving objects, and every object whose key ties it survives (float keys tie up to
config.numerics.precision; other key types compare exactly). Later components only see the survivors of earlier ones. The surviving set is independent of input order.- Parameters:
objects (Iterable) – The φ-objects to filter.
strategy (str or list of str) – A tie-resolution strategy name, or a list of names applied lexicographically. The special value
"NONE"disables filtering and yields every object.operation (callable) – The extremum function applied per component —
max()ormin().default (Any, optional) – Yielded when
objectsis empty.
- Yields:
object – Each φ-object extremal under
strategy.- Return type: