class documentation
a function that returns f1(x[:n1]) + f2(x[n1:]).
>>> import functools >>> import numpy as np >>> import cma >>> def elli48(x): ... return 1e-4 * functools.partial(cma.ff.elli, cond=1e8)(x) >>> fcigtab = cma.fitness_transformations.StackFunction( ... elli48, cma.ff.sphere, 2) >>> x = [1, 2, 3, 4] >>> assert np.isclose(fcigtab(x), cma.ff.cigtab(np.asarray(x)))
| Method | __init__ |
allows to define the fitness_function to be called, doesn't need to be ever called |
| Instance Variable | f1 |
Undocumented |
| Instance Variable | f2 |
Undocumented |
| Instance Variable | n1 |
Undocumented |
| Method | _eval |
Undocumented |
Inherited from Function:
| Method | __call__ |
Undocumented |
| Method | initialize |
initialization of Function |
| Instance Variable | evaluations |
Undocumented |
| Instance Variable | ftarget |
Undocumented |
| Instance Variable | target |
Undocumented |
| Property | function |
attributes which are searched for to be called if no function was given to __init__. |
| Class Variable | _function |
Undocumented |
| Instance Variable | __callable |
Undocumented |
| Instance Variable | __initialized |
Undocumented |