optilab.functions.unimodal package

Submodules

optilab.functions.unimodal.bent_cigar_function module

Bent Cigar objective function.

class BentCigarFunction(dim: int)[source]

Bases: ObjectiveFunction

Bent Cigar objective function.

__init__(dim: int)[source]

Class constructor.

Parameters:

dim – Dimensionality of the function.

__call__(point: Point) Point[source]

Evaluate a single point with the objective function.

Parameters:

point – Point to evaluate.

Raises:

ValueError – If dimensionality of x doesn’t match self.dim.

Returns:

Evaluated point.

optilab.functions.unimodal.cumulative_squared_sums module

Cumulative squared sums function.

class CumulativeSquaredSums(dim: int)[source]

Bases: ObjectiveFunction

Cumulative squared sums function.

__init__(dim: int)[source]

Class constructor.

Parameters:

dim – Dimensionality of the function.

__call__(point: Point) Point[source]

Evaluate a single point with the objective function.

Parameters:

point – Point to evaluate.

Raises:

ValueError – If dimensionality of x doesn’t match self.dim.

Returns:

Evaluated point.

optilab.functions.unimodal.increasing_weight_cigar module

Increasing Weight Cigar objective function.

class IncreasingWeightCigar(dim: int)[source]

Bases: ObjectiveFunction

Increasing Weight Cigar objective function.

__init__(dim: int)[source]

Class constructor.

Parameters:

dim – Dimensionality of the function.

__call__(point: Point) Point[source]

Evaluate a single point with the objective function.

Parameters:

point – Point to evaluate.

Raises:

ValueError – If dimensionality of x doesn’t match self.dim.

Returns:

Evaluated point.

optilab.functions.unimodal.linear_function module

Linear function. y is the sum of elements of x vector.

class LinearFunction(dim: int)[source]

Bases: ObjectiveFunction

Linear function. y is the sum of elements of x vector.

__init__(dim: int)[source]

Class constructor.

Parameters:

dim – Dimensionality of the function.

__call__(point: Point) Point[source]

Evaluate a single point with the objective function.

Parameters:

point – Point to evaluate.

Raises:

ValueError – If dimensionality of x doesn’t match self.dim.

Returns:

Evaluated point.

optilab.functions.unimodal.sphere_function module

Sphere function. y is the sum of squares of elements of x vector.

class SphereFunction(dim: int)[source]

Bases: ObjectiveFunction

Sphere function. y is the sum of squares of elements of x vector.

__init__(dim: int)[source]

Class constructor.

Parameters:

dim – Dimensionality of the function.

__call__(point: Point) Point[source]

Evaluate a single point with the objective function.

Parameters:

point – Point to evaluate.

Raises:

ValueError – If dimensionality of x doesn’t match self.dim.

Returns:

Evaluated point.

Module contents

Unimodal functions. They have only one local minimum.