pyphi.convert.state2be_index#
- pyphi.convert.state2be_index(state)[source]#
Convert a PyPhi state-tuple to a decimal index using the big-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 big-endian convention.
Examples
>>> state2be_index((1, 0, 0, 0, 0)) 16 >>> state2be_index((1, 1, 1, 0, 0, 0, 0, 0)) 224