metaheuristic_designer.utils#

Utility functions, type aliases, and a JSON encoder used across the library.

Functions

check_rng(seed)

Turn seed into an np.random.Generator instance.

per_individual(func)

Decorator that applies a function to each row of a 2-D array.

per_individual_list(func)

Decorator that applies a function to each element of a list.

Classes

NumpyEncoder(*[, skipkeys, ensure_ascii, ...])

JSON encoder that can serialize NumPy scalars, arrays, and Enums.

Exceptions

TerminationException

Custom exception to handle SIGTERM