MooreNeighborhoodFinder

class MooreNeighborhoodFinder(val problemDefinition: ProblemDefinition, radius: Int = 1) : NeighborhoodFinderIfc(source)

A Moore neighborhood includes all points where the Chebyshev distance (also called L∞ distance) from the center is less than or equal to the radius. The Chebyshev distance is the maximum absolute difference across all dimensions. This function uses a direct iteration around a bounding box. By default, this implementation does not include the center point of the neighborhood and uses a radius of 1.

Parameters

problemDefinition

the problem definition over which the neighborhood should be found.

radius

the radius for the neighborhood. The default is 1.

Constructors

Link copied to clipboard
constructor(problemDefinition: ProblemDefinition, radius: Int = 1)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun neighborhood(inputMap: InputMap, solver: Solver?): MutableSet<InputMap>

Defines a search neighborhood for the provided input with respect to the problem. The function should guarantee that the returned set is not empty.