9package com.google.ortools.constraintsolver;
13import java.util.function.LongToIntFunction;
31 private transient long swigCPtr;
34 super(mainJNI.PathOperator_SWIGUpcast(cPtr), cMemoryOwn);
39 return (obj ==
null) ? 0 : obj.swigCPtr;
46 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
48 obj.swigCMemOwn =
false;
54 @SuppressWarnings({
"deprecation",
"removal"})
63 mainJNI.delete_PathOperator(swigCPtr);
77 mainJNI.PathOperator_change_ownership(
this, swigCPtr,
false);
82 mainJNI.PathOperator_change_ownership(
this, swigCPtr,
true);
88 public PathOperator(
IntVar[] next_vars,
IntVar[] path_vars, SWIGTYPE_p_operations_research__PathOperator__IterationParameters iteration_parameters) {
89 this(mainJNI.new_PathOperator__SWIG_0(next_vars, path_vars, SWIGTYPE_p_operations_research__PathOperator__IterationParameters.
getCPtr(iteration_parameters)),
true);
90 mainJNI.PathOperator_director_connect(
this, swigCPtr,
true,
true);
93 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, SWIGTYPE_p_std__functionT_std__vectorT_int_t_const_Rfint_intF_t get_neighbors) {
94 this(mainJNI.new_PathOperator__SWIG_1(next_vars, path_vars, number_of_base_nodes, skip_locally_optimal_paths, accept_path_end_base, start_empty_path_class, SWIGTYPE_p_std__functionT_std__vectorT_int_t_const_Rfint_intF_t.getCPtr(get_neighbors)),
true);
95 mainJNI.PathOperator_director_connect(
this, swigCPtr,
true,
true);
99 return mainJNI.PathOperator_neighbor(swigCPtr,
this);
103 if (getClass() ==
PathOperator.class) mainJNI.PathOperator_reset(swigCPtr,
this);
else mainJNI.PathOperator_resetSwigExplicitPathOperator(swigCPtr,
this);
110 return mainJNI.PathOperator_Prev(swigCPtr,
this, node);
117 return (getClass() ==
PathOperator.class) ? mainJNI.PathOperator_oneNeighbor(swigCPtr,
this) : mainJNI.PathOperator_oneNeighborSwigExplicitPathOperator(swigCPtr,
this);
126 if (getClass() ==
PathOperator.class) mainJNI.PathOperator_OnNodeInitialization(swigCPtr,
this);
else mainJNI.PathOperator_OnNodeInitializationSwigExplicitPathOperator(swigCPtr,
this);
138 return (getClass() ==
PathOperator.class) ? mainJNI.PathOperator_restartAtPathStartOnSynchronize(swigCPtr,
this) : mainJNI.PathOperator_restartAtPathStartOnSynchronizeSwigExplicitPathOperator(swigCPtr,
this);
148 return (getClass() ==
PathOperator.class) ? mainJNI.PathOperator_onSamePathAsPreviousBase(swigCPtr,
this, base_index) : mainJNI.PathOperator_onSamePathAsPreviousBaseSwigExplicitPathOperator(swigCPtr,
this, base_index);
159 return (getClass() ==
PathOperator.class) ? mainJNI.PathOperator_getBaseNodeRestartPosition(swigCPtr,
this, base_index) : mainJNI.PathOperator_getBaseNodeRestartPositionSwigExplicitPathOperator(swigCPtr,
this, base_index);
167 if (getClass() ==
PathOperator.class) mainJNI.PathOperator_setNextBaseToIncrement(swigCPtr,
this, base_index);
else mainJNI.PathOperator_setNextBaseToIncrementSwigExplicitPathOperator(swigCPtr,
this, base_index);
175 return (getClass() ==
PathOperator.class) ? mainJNI.PathOperator_ConsiderAlternatives(swigCPtr,
this, base_index) : mainJNI.PathOperator_ConsiderAlternativesSwigExplicitPathOperator(swigCPtr,
this, base_index);
183 return (getClass() ==
PathOperator.class) ? mainJNI.PathOperator_initPosition(swigCPtr,
this) : mainJNI.PathOperator_initPositionSwigExplicitPathOperator(swigCPtr,
this);