Yielded Batches
- class YieldedBatches(key_maker)[source]
Bases:
object
Keeps track of batches yielded by
Selector.select()
.Methods
get_num
()Get the number of times
Selector.select()
has yielded.has_no_yielded_molecules
(batch)Check if batch consists only of unyielded molecules.
has_yielded_molecules
(batch)Check if batch contains any previously yielded molecules.
is_unyielded_batch
(batch)Check if batch has not been yielded.
is_yielded_batch
(batch)Check if batch has already been yielded.
update
(batch)Update tracked data with a new batch.
- get_num()[source]
Get the number of times
Selector.select()
has yielded.- Returns
The total number of times
Selector.select()
has yielded.- Return type
- update(batch)[source]
Update tracked data with a new batch.
- Parameters
batch (
Batch
) – A batch yielded bySelector.select()
.- Returns
The data tracker.
- Return type