Home | Trees | Indices | Help |
|
---|
|
object --+ | FFWrapper.FitnessTransformation --+ | FFWrapper.TransformSearchSpace
f = TransformSearchSpace(f, ConstRandnShift())
constructs the composed function f <- f o shift.
Details: to some extend this is a nice shortcut for:
f = lambda x, *args: f_in(ConstRandnShift()(x), *args)
however the lambda
definition depends on the value of
f_in even after f has been assigned.
See: ShiftedFitness, RotatedFitness
|
|||
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
TransformSearchSpace(f, s)(x) == f(s(x)) >>> import cma >>> f0 = lambda x: sum(x) >>> shift_fct = cma.ConstRandnShift() >>> f = cma.FF2.TransformSearchSpace(f0, shift_fct) >>> x = [1, 2, 3] >>> assert f(x) == f0(shift_fct(x))
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Mar 3 01:17:17 2015 | http://epydoc.sourceforge.net |