pyphi.convert.state2le_index#
- pyphi.convert.state2le_index(state)[source]#
Convert a PyPhi state-tuple to a decimal index using the little-endian convention.
- Parameters:
state (tuple[int]) – A state-tuple where the i-th element gives the state of the i-th node.
- Returns:
int – A decimal integer corresponding to a substrate state under the little-endian convention.
Examples
>>> state2le_index((1, 0, 0, 0, 0)) 1 >>> state2le_index((1, 1, 1, 0, 0, 0, 0, 0)) 7