C++ Reference: class LocalSearchOperator

Note: This documentation is automatically generated.

The base class for all local search operators.

A local search operator is an object that defines the neighborhood of a solution. In other words, a neighborhood is the set of solutions which can be reached from a given solution using an operator.

The behavior of the LocalSearchOperator class is similar to iterators. The operator is synchronized with an assignment (gives the current values of the variables); this is done in the Start() method.

Then one can iterate over the neighbors using the MakeNextNeighbor method. This method returns an assignment which represents the incremental changes to the current solution. It also returns a second assignment representing the changes to the last solution defined by the neighborhood operator; this assignment is empty if the neighborhood operator cannot track this information.

TODO(user): rename Start to Synchronize ? TODO(user): decouple the iterating from the defining of a neighbor.
Method
HasFragments

Return type: virtual bool

HoldsDelta

Return type: virtual bool

LocalSearchOperator

~LocalSearchOperator

MakeNextNeighbor

Return type: virtual bool

Arguments: Assignment* delta, Assignment* deltadelta

Reset

Return type: virtual void

Self

Return type: virtual const LocalSearchOperator*

Start

Return type: virtual void

Arguments: const Assignment* assignment