com.google.ortools.constraintsolver.PathOperator 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;
// Used to wrap start_empty_path_class see:
// https://docs.oracle.com/javase/8/docs/api/java/util/function/LongToIntFunction.html
import java.util.function.LongToIntFunction;
public class PathOperator extends IntVarLocalSearchOperator {
private transient long swigCPtr;
protected PathOperator(long cPtr, boolean cMemoryOwn) {
super(mainJNI.PathOperator_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(PathOperator obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
mainJNI.delete_PathOperator(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
protected void swigDirectorDisconnect() {
swigCMemOwn = false;
delete();
}
public void swigReleaseOwnership() {
swigCMemOwn = false;
mainJNI.PathOperator_change_ownership(this, swigCPtr, false);
}
public void swigTakeOwnership() {
swigCMemOwn = true;
mainJNI.PathOperator_change_ownership(this, swigCPtr, true);
}
public PathOperator(IntVar[] next_vars, IntVar[] path_vars, int number_of_base_nodes, boolean skip_locally_optimal_paths, boolean accept_path_end_base, LongToIntFunction start_empty_path_class) {
this(mainJNI.new_PathOperator(next_vars, path_vars, number_of_base_nodes, skip_locally_optimal_paths, accept_path_end_base, start_empty_path_class), true);
mainJNI.PathOperator_director_connect(this, swigCPtr, swigCMemOwn, true);
}
public boolean neighbor() {
return mainJNI.PathOperator_neighbor(swigCPtr, this);
}
public void reset() {
if (getClass() == PathOperator.class) mainJNI.PathOperator_reset(swigCPtr, this); else mainJNI.PathOperator_resetSwigExplicitPathOperator(swigCPtr, this);
}
public long Prev(long node) {
return mainJNI.PathOperator_Prev(swigCPtr, this, node);
}
protected boolean oneNeighbor() {
return (getClass() == PathOperator.class) ? mainJNI.PathOperator_oneNeighbor(swigCPtr, this) : mainJNI.PathOperator_oneNeighborSwigExplicitPathOperator(swigCPtr, this);
}
protected void OnNodeInitialization() {
if (getClass() == PathOperator.class) mainJNI.PathOperator_OnNodeInitialization(swigCPtr, this); else mainJNI.PathOperator_OnNodeInitializationSwigExplicitPathOperator(swigCPtr, this);
}
protected boolean restartAtPathStartOnSynchronize() {
return (getClass() == PathOperator.class) ? mainJNI.PathOperator_restartAtPathStartOnSynchronize(swigCPtr, this) : mainJNI.PathOperator_restartAtPathStartOnSynchronizeSwigExplicitPathOperator(swigCPtr, this);
}
protected boolean onSamePathAsPreviousBase(long base_index) {
return (getClass() == PathOperator.class) ? mainJNI.PathOperator_onSamePathAsPreviousBase(swigCPtr, this, base_index) : mainJNI.PathOperator_onSamePathAsPreviousBaseSwigExplicitPathOperator(swigCPtr, this, base_index);
}
protected long getBaseNodeRestartPosition(int base_index) {
return (getClass() == PathOperator.class) ? mainJNI.PathOperator_getBaseNodeRestartPosition(swigCPtr, this, base_index) : mainJNI.PathOperator_getBaseNodeRestartPositionSwigExplicitPathOperator(swigCPtr, this, base_index);
}
protected void setNextBaseToIncrement(long base_index) {
if (getClass() == PathOperator.class) mainJNI.PathOperator_setNextBaseToIncrement(swigCPtr, this, base_index); else mainJNI.PathOperator_setNextBaseToIncrementSwigExplicitPathOperator(swigCPtr, this, base_index);
}
protected boolean ConsiderAlternatives(long base_index) {
return (getClass() == PathOperator.class) ? mainJNI.PathOperator_ConsiderAlternatives(swigCPtr, this, base_index) : mainJNI.PathOperator_ConsiderAlternativesSwigExplicitPathOperator(swigCPtr, this, base_index);
}
protected boolean initPosition() {
return (getClass() == PathOperator.class) ? mainJNI.PathOperator_initPosition(swigCPtr, this) : mainJNI.PathOperator_initPositionSwigExplicitPathOperator(swigCPtr, this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy