Samples

Samples#

class Samples#

Collection of State samples

__new__(entries: ToSamples) Samples#
append(sample_ids: Sequence[int], state: ToState) None#

Append a sample with the given sample IDs and state.

Raises ValueError if an ID already exists in this collection or occurs more than once in sample_ids. The collection is unchanged when validation fails.

from_v1_bytes(bytes: bytes) Samples#
get_state(sample_id: int) State#

Get the state for a specific sample ID

num_samples() int#

Get the number of samples

sample_ids() set[int]#

Get all sample IDs

to_v1_bytes() bytes#