MergeBuilder

class hybrid_learning.fuzzy_logic.logic_base.merge_operation.MergeBuilder(merge_class, symb=None, additional_args=None)[source]

Bases: object

Return a Merge operation of specified class with additional settings upon call. Common additional init arguments can be specified and a new SYMB, overwriting the Merge.SYMB (or attaching a SYMB attribute to another builder). Attribute access is passed over to the merge_class specified. For easy instantiation see also Merge.with_().

Public Data Attributes:

additional_args

The additional arguments to and over to the Merge class on each call.

Public Methods:

symb_(symb)

Set SYMB and return self.

with_(**additional_args)

Update the additional arguments.

variadic_(*args, **kwargs)

Return a variadic instance of the wrapped merge_class.

Special Methods:

__init__(merge_class[, symb, additional_args])

__call__(*args, **kwargs)

Build an instance of the specified Merge class with the additional args.

__getattr__(k)

Pass attribute requests over to Merge class.

__repr__()

Return repr(self).


Parameters
__call__(*args, **kwargs)[source]

Build an instance of the specified Merge class with the additional args. The given kwargs will overwrite arguments from additional_args.

Return type

Merge

__getattr__(k)[source]

Pass attribute requests over to Merge class.

__init__(merge_class, symb=None, additional_args=None)[source]
Parameters
__repr__()[source]

Return repr(self).

symb_(symb)[source]

Set SYMB and return self. Can be used in chain assignments.

Parameters

symb (str) –

Return type

MergeBuilder

variadic_(*args, **kwargs)[source]

Return a variadic instance of the wrapped merge_class. Calls the variadic_ function of merge_class.

Return type

Merge

with_(**additional_args)[source]

Update the additional arguments.

Parameters

additional_args (Dict[str, Any]) –

SYMB: str

The symbol representing the wrapped class.

property additional_args: Dict[str, Any]

The additional arguments to and over to the Merge class on each call.

merge_class: Union[Type[Merge], Callable[[...], Merge]]

The class or builder to use upon call.