KNearestValue

class KNearestValue : public KValueSelector

This class implements a value selector that selects the nearest value from target in the domain of the variable.

Example :

KBranchingSchemeArray myBranchingSchemeArray;
myBranchingSchemeArray += KAssignVar(KSmallestDomain(), KNearestValue());

See

KValueSelector

Since

2016.1

Public Functions

KNearestValue()

Default Constructor.

KNearestValue(const KNearestValue &nearestToCopy)

Copy constructor.

virtual ~KNearestValue()

Destructor.

virtual int selectNextValue(KIntVar *intVar)

Virtual method to overload with your own value selection heuristic.

Parameters

intVar – the variable to selects a value for