Class IntVarLocalSearchOperatorTemplate
java.lang.Object
com.google.ortools.constraintsolver.BaseObject
com.google.ortools.constraintsolver.LocalSearchOperator
com.google.ortools.constraintsolver.IntVarLocalSearchOperatorTemplate
- Direct Known Subclasses:
IntVarLocalSearchOperator
Base operator class for operators manipulating variables.
-
Field Summary
Fields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIntVarLocalSearchOperatorTemplate(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(long index) booleanactivated(long index) voidvoiddeactivate(long index) voiddelete()protected voidfinalize()protected static longbooleanbooleanlongoldValue(long index) voidonStart()Called by Start() after synchronizing the operator with the current
assignment.voidsetValue(long index, long value) intsize()longvalue(long index) Returns the value in the current assignment of the variable of given
index.var(long index) Returns the variable of given index.Methods inherited from class com.google.ortools.constraintsolver.LocalSearchOperator
getCPtr, HasFragments, nextNeighbor, reset, start, swigDirectorDisconnect, swigReleaseOwnership, swigTakeOwnershipMethods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtr, toString
-
Constructor Details
-
IntVarLocalSearchOperatorTemplate
protected IntVarLocalSearchOperatorTemplate(long cPtr, boolean cMemoryOwn)
-
-
Method Details
-
getCPtr
-
finalize
protected void finalize()- Overrides:
finalizein classLocalSearchOperator
-
delete
public void delete()- Overrides:
deletein classLocalSearchOperator
-
HoldsDelta
public boolean HoldsDelta()- Overrides:
HoldsDeltain classLocalSearchOperator
-
isIncremental
public boolean isIncremental() -
size
public int size() -
value
public long value(long index) Returns the value in the current assignment of the variable of given
index. -
var
Returns the variable of given index. -
oldValue
public long oldValue(long index) -
setValue
public void setValue(long index, long value) -
activated
public boolean activated(long index) -
activate
public void activate(long index) -
deactivate
public void deactivate(long index) -
addVars
-
onStart
public void onStart()Called by Start() after synchronizing the operator with the current
assignment. Should be overridden instead of Start() to avoid calling
VarLocalSearchOperator::Start explicitly.
-