Addons#
The addons have been originally implemented in the zellij package. An addons, is an object that is linked to another one. It allows to extend some functionnalities of the target without modifying its implementation. The user can graft addons to Variable by using the kwargs in the init function.
Known kwargs is:
neighbor: Defines what is a neighbor for a given Variable. It uses the neighbor Search space Addon.
- class Addon(object=None)[source]
Bases:
ABCAbstract class describing what an addon is. An
Addonis an additionnal feature that can be added to atargetobject. See Variable Addon for addon targeting Variable or Search space Addon targeting sp.- Parameters:
target (Object, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type:
Object, default=None
- property target
Variable Addon#
- class VarAddon(variable=None)[source]
Bases:
AddonAddons where the target must be of type Variable.
- Parameters:
target (Variable, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type:
Variable, default=None
- property target
Subclasses#
- class VarNeighborhood(neighborhood, variable=None)[source]
Bases:
VarAddonAddons where the target must be of type Variable. Describes what a neighborhood is for a Variable.
- Parameters:
target (Variable, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type:
Variable, default=None
- property neighborhood
Search space Addon#
- class SearchspaceAddon(search_space=None)[source]
Bases:
AddonAddons where the target must be of type sp.
- Parameters:
target (sp, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type:
sp, default=None
- property target
Subclasses#
- class Neighborhood(neighborhood, search_space=None)[source]
Bases:
SearchspaceAddonAddons where the target must be of type sp. Describes what a neighborhood is for a sp.
- Parameters:
target (sp, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type:
sp, default=None
- property neighborhood
- class Operator(search_space=None)[source]
Bases:
SearchspaceAddonAbstract class describing what an operator is for a sp. Addons where the target must be of type sp.
- Parameters:
target (sp, default=None) – Object targeted by the addons
- target
Object targeted by the addons
- Type:
sp, default=None