foxes_opt.core.zero_derivatives

Classes

ZeroFloatDerivatives

Provide zero float derivatives for piecewise-constant functions.

Module Contents

class foxes_opt.core.zero_derivatives.ZeroFloatDerivatives[source]

Provide zero float derivatives for piecewise-constant functions.

ana_deriv(vars_int: numpy.ndarray, vars_float: numpy.ndarray, var: int, components: collections.abc.Sequence[int] | numpy.ndarray | None = None) → numpy.ndarray[source]

Calculate the analytical derivative for one float variable.

Parameters:
vars_int

The integer variable values

vars_float

The float variable values

var

The float variable index

components

The selected components, or None for all

Returns:
deriv

The derivative values, shape: (n_sel_components,)

abstract n_components() → int[source]

Return the number of function components.