A Collection of optimization functions as testing targets for optimization procedures (e.g for evolution strategy).
Each of the functions is wrapped by a descendant of class OptimizationModel.
Each function maps a vector to a scalar error value and has a one ore more
optimum points (multimodal problem) of lowest error (minimization problem)
respectively highest quality (maximization problem).
Imported modules
|
|
from Numeric import array, asarray, arrayrange, zeros, ones, sum
from math import sqrt
|
Functions
|
|
MandelbrotIteration
sqr
|
|
MandelbrotIteration
|
MandelbrotIteration ( p, n )
Mandelbrot iteration.
Do at most n iterations of the complex mapping X(i+1) = XiČ + c with
parameter c and X0 = 0 until it diverges (max. n times), divergence
criterium is | Xi | > 2.0.
Periodicity checking is also done.
Arguments:
- p(ro): List of length one containing complex constant c.
This also represents X1.
Return value:
- number of iterations done in case of divergence
- minus period in case of periodicity
- n else.
Also on return list p will contain the iteration sequence (X0 excluded).
|
|
sqr
|
sqr ( x )
|
Classes
|
|
|
|