opytimizer.core.function

Single-objective functions.

class opytimizer.core.function.Function(pointer: callable)

A Function class used to hold single-objective functions.

__init__(pointer: callable) → None

Initialization method.

Parameters:pointer – Pointer to a function that will return the fitness value.
__call__(x: numpy.ndarray) → float

Callable to avoid using the pointer property.

Parameters:x – Array of positions.
Returns:Single-objective function fitness.
Return type:(float)
pointer

Points to the actual function.

Type:callable
name

Name of the function.

built

Indicates whether the function is built.