Class ChangeValue
java.lang.Object
public class ChangeValue extends IntVarLocalSearchOperator
Defines operators which change the value of variables;
each neighbor corresponds to *one* modified variable.
Sub-classes have to define ModifyValue which determines what the new
variable value is going to be (given the current value and the variable).
each neighbor corresponds to *one* modified variable.
Sub-classes have to define ModifyValue which determines what the new
variable value is going to be (given the current value and the variable).
-
Field Summary
Fields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn -
Constructor Summary
Constructors Modifier Constructor Description protectedChangeValue(long cPtr, boolean cMemoryOwn)ChangeValue(IntVar[] vars) -
Method Summary
Modifier and Type Method Description voiddelete()protected voidfinalize()protected static longgetCPtr(ChangeValue obj)longmodifyValue(long index, long value)protected booleanoneNeighbor()This method should not be overridden.protected voidswigDirectorDisconnect()voidswigReleaseOwnership()voidswigTakeOwnership()Methods inherited from class com.google.ortools.constraintsolver.IntVarLocalSearchOperator
getCPtrMethods inherited from class com.google.ortools.constraintsolver.IntVarLocalSearchOperatorTemplate
activate, activated, addVars, deactivate, getCPtr, HoldsDelta, isIncremental, oldValue, onStart, setValue, size, value, varMethods inherited from class com.google.ortools.constraintsolver.LocalSearchOperator
getCPtr, HasFragments, nextNeighbor, reset, startMethods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtr, toStringMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
ChangeValue
protected ChangeValue(long cPtr, boolean cMemoryOwn) -
ChangeValue
-
-
Method Details
-
getCPtr
-
finalize
protected void finalize()- Overrides:
finalizein classIntVarLocalSearchOperator
-
delete
public void delete()- Overrides:
deletein classIntVarLocalSearchOperator
-
swigDirectorDisconnect
protected void swigDirectorDisconnect()- Overrides:
swigDirectorDisconnectin classIntVarLocalSearchOperator
-
swigReleaseOwnership
public void swigReleaseOwnership()- Overrides:
swigReleaseOwnershipin classIntVarLocalSearchOperator
-
swigTakeOwnership
public void swigTakeOwnership()- Overrides:
swigTakeOwnershipin classIntVarLocalSearchOperator
-
modifyValue
public long modifyValue(long index, long value) -
oneNeighbor
protected boolean oneNeighbor()This method should not be overridden. Override ModifyValue() instead.- Overrides:
oneNeighborin classIntVarLocalSearchOperator
-