state¶
The state module. Specifies a wrapper to a state such that it exposes column distortions and the bin index of the overall distortion.
- class state.StateIterator(values: List)¶
StateIterator class. Helper class to iterate over the columns of a State object
- __init__(values: List)¶
- __len__()¶
Returns the total number of items in the iterator :return:
- property at: Any¶
Returns the value of the iterator at the current position without incrementing the position of the iterator :return: Any
- property finished: bool¶
Returns true if the iterator is exhausted :return:
- class state.State¶
Helper to represent a State
- __contains__(column_name: str) bool ¶
Returns true if column_name is in the column_distortions keys
- Parameters
column_name (The column name to query) –
- Returns
A boolean indicating if column_name is in the column_distortions
keys or not.
- __getitem__(name: str) float ¶
Get the distortion corresponding to the name-th column
- Parameters
name (The name of the column) –
- Return type
The column distortion
- __init__()¶