Class SequenceVarLocalSearchOperatorTemplate
java.lang.Object
com.google.ortools.constraintsolver.BaseObject
com.google.ortools.constraintsolver.LocalSearchOperator
com.google.ortools.constraintsolver.SequenceVarLocalSearchOperatorTemplate
- Direct Known Subclasses:
SequenceVarLocalSearchOperator
public class SequenceVarLocalSearchOperatorTemplate extends LocalSearchOperator
Base operator class for operators manipulating variables.
-
Field Summary
Fields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn -
Constructor Summary
Constructors Modifier Constructor Description protectedSequenceVarLocalSearchOperatorTemplate(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and Type Method Description voidactivate(long index)booleanactivated(long index)voidaddVars(SequenceVar[] vars)voiddeactivate(long index)voiddelete()protected voidfinalize()protected static longgetCPtr(SequenceVarLocalSearchOperatorTemplate obj)booleanHoldsDelta()booleanisIncremental()int[]oldValue(long index)voidonStart()Called by Start() after synchronizing the operator with the current
assignment.voidsetValue(long index, int[] value)intsize()int[]value(long index)Returns the value in the current assignment of the variable of given
index.SequenceVarvar(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, toStringMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
SequenceVarLocalSearchOperatorTemplate
protected SequenceVarLocalSearchOperatorTemplate(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 int[] 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 int[] oldValue(long index) -
setValue
public void setValue(long index, int[] 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.
-