loki.batch.sfilter
Classes
|
Filtered iterator over a |
- class SFilter(sgraph, item_filter=None, reverse=False, exclude_ignored=False, include_external=False)
Bases:
object
Filtered iterator over a
SGraph
This class allows to change the iteration behaviour over the dependency graph stored in
SGraph
.Example use:
items = scheduler.items reversed_items = as_tuple(SFilter(scheduler.sgraph, reverse=True)) procedure_bindings = as_tuple(SFilter(scheduler.sgraph, item_filter=ProcedureBindingItem))
- Parameters:
sgraph (
SGraph
) – The graph over which to iterateitem_filter (list of
Item
subclasses, optional) – Only include items that match the provided list of typesreverse (bool, optional) – Iterate over the dependency graph in reverse direction
exclude_ignored (bool, optional) – Exclude
Item
objects that have theis_ignored
propertyinclude_external (bool, optional) – Do not skip
ExternalItem
in the iterator