class documentation

deprecated, use functools.partial or cma.fitness_transformations.partial instead, which has the same functionality and interface.

from a callable return a callable with arguments attached.

An ellipsoid function with condition number 1e4 is created by felli1e4 = cma.s.ft.GlueArguments(cma.ff.elli, cond=1e4).

>>> import cma
>>> f = cma.fitness_transformations.GlueArguments(cma.ff.elli,
...                                               cond=1e1)
>>> assert f([1, 2]) == 1**2 + 1e1 * 2**2
Method __call__ call function with at least one additional argument and attached args and kwargs.
Method __init__ define function, args, and kwargs.
Instance Variable args Undocumented
Instance Variable fitness_function Undocumented
Instance Variable kwargs Undocumented

Inherited from Function:

Method initialize initialization of Function
Instance Variable evaluations Undocumented
Instance Variable ftarget Undocumented
Instance Variable target_hit_at Undocumented
Property function_names_to_evaluate_first_found attributes which are searched for to be called if no function was given to __init__.
Class Variable _function_names_to_evaluate_first_found Undocumented
Instance Variable __callable Undocumented
Instance Variable __initialized Undocumented
def __call__(self, x, *args, **kwargs):

call function with at least one additional argument and attached args and kwargs.

def __init__(self, fitness_function, *args, **kwargs):

define function, args, and kwargs.

args are appended to arguments passed in the call, kwargs are updated with keyword arguments passed in the call.

args =

Undocumented

fitness_function =

Undocumented

kwargs =

Undocumented