com.google.ortools.constraintsolver.SequenceVar Maven / Gradle / Ivy
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.google.ortools.constraintsolver;
public class SequenceVar extends PropagationBaseObject {
private transient long swigCPtr;
protected SequenceVar(long cPtr, boolean cMemoryOwn) {
super(mainJNI.SequenceVar_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(SequenceVar obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
mainJNI.delete_SequenceVar(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public SequenceVar(Solver s, IntervalVar[] intervals, IntVar[] nexts, String name) {
this(mainJNI.new_SequenceVar(Solver.getCPtr(s), s, intervals, nexts, name), true);
}
public String toString() {
return mainJNI.SequenceVar_toString(swigCPtr, this);
}
public void rankFirst(int index) {
mainJNI.SequenceVar_rankFirst(swigCPtr, this, index);
}
public void rankNotFirst(int index) {
mainJNI.SequenceVar_rankNotFirst(swigCPtr, this, index);
}
public void rankLast(int index) {
mainJNI.SequenceVar_rankLast(swigCPtr, this, index);
}
public void rankNotLast(int index) {
mainJNI.SequenceVar_rankNotLast(swigCPtr, this, index);
}
public void rankSequence(int[] rank_first, int[] rank_last, int[] unperformed) {
mainJNI.SequenceVar_rankSequence(swigCPtr, this, rank_first, rank_last, unperformed);
}
public IntervalVar interval(int index) {
long cPtr = mainJNI.SequenceVar_interval(swigCPtr, this, index);
return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
}
public IntVar next(int index) {
long cPtr = mainJNI.SequenceVar_next(swigCPtr, this, index);
return (cPtr == 0) ? null : new IntVar(cPtr, false);
}
public long size() {
return mainJNI.SequenceVar_size(swigCPtr, this);
}
public void accept(ModelVisitor visitor) {
mainJNI.SequenceVar_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy