IndexMap is an internal abstraction used by the randomness system to help align
random numbers for the same simulants across multiple simulations. It’s key idea is to take
a set of static identifying characteristics about a simulant and hash them to a consistent
positional index within a stream of seeded random numbers.
- class vivarium.framework.randomness.index_map.IndexMap(key_columns=None, size=1000000)
A key-index mapping with a vectorized hash and vectorized lookups.
- SIM_INDEX_COLUMN = 'simulant_index'
- TEN_DIGIT_MODULUS = 10000000000
- update(new_keys, clock_time)
Adds the new keys to the mapping.