VonNeumannNeighborhoodFinder

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

A von Neumann neighborhood includes all points where the Manhattan distance (sum of absolute differences in all dimensions) from the center is less than or equal to the radius. 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 one.

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.