timor.configuration_search.AssemblyIterator

Classes

AssemblyIterator

Abstract base class for a set of iterators that yield module assemblies.

Module Contents

class timor.configuration_search.AssemblyIterator.AssemblyIterator(db)
Inheritance diagram of timor.configuration_search.AssemblyIterator.AssemblyIterator

Abstract base class for a set of iterators that yield module assemblies.

This is a base class for assembly iterators. An assembly iterator offers an iterator behavior that returns valid module assemblies (=robots) based on a set of rules (generator-specific + global rules) and the database.

Parameters:

db (timor.Module.ModulesDB) – Module assemblies returned by __next__ will be based on this DB instance.

__class_getitem__
__iter__()

Iterators are self-iterable: https://peps.python.org/pep-0234/

__len__()

Subclasses that can determine the length without iterating through every element of self should do so

abstractmethod __next__()

Implementing next defines how assemblies are built by the iterator

Return type:

timor.Module.ModuleAssembly

__slots__ = ()
classmethod __subclasshook__(C)
_db: timor.Module.ModulesDB
property db: timor.Module.ModulesDB

Wrapper property to avoid resetting the db

Return type:

timor.Module.ModulesDB

abstractmethod reset()

Should reset the iterator to the initial state

Return type:

None

property state: any
Abstractmethod:

Return type:

any

The state should suffice to deterministically determine the next element returned by self.__next__