Addons

Addons#

The addons have been originally implemented in the zellij package. An addon 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.

A known addon is:

  • neighbor: Defines what is a neighbor for a given Variable.

class Addon(object=None)[source]

Bases: ABC

Abstract class describing what an addon is. An Addon is an additionnal feature that can be added to a target object.

Parameters:

target (Object, default=None) – Object targeted by the addons

target

Object targeted by the addons

Type:

Object, default=None

property target
class VarAddon(variable=None)[source]

Bases: Addon

Addons 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
class VarNeighborhood(neighborhood, variable=None)[source]

Bases: VarAddon

Addon 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