Java Reference

Java Reference

PathOperator.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.1
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package com.google.ortools.constraintsolver;
10 
11 // Used to wrap start_empty_path_class see:
12 // https://docs.oracle.com/javase/8/docs/api/java/util/function/LongToIntFunction.html
13 import java.util.function.LongToIntFunction;
14 
16  private transient long swigCPtr;
17 
18  protected PathOperator(long cPtr, boolean cMemoryOwn) {
19  super(mainJNI.PathOperator_SWIGUpcast(cPtr), cMemoryOwn);
20  swigCPtr = cPtr;
21  }
22 
23  protected static long getCPtr(PathOperator obj) {
24  return (obj == null) ? 0 : obj.swigCPtr;
25  }
26 
27  @SuppressWarnings("deprecation")
28  protected void finalize() {
29  delete();
30  }
31 
32  public synchronized void delete() {
33  if (swigCPtr != 0) {
34  if (swigCMemOwn) {
35  swigCMemOwn = false;
36  mainJNI.delete_PathOperator(swigCPtr);
37  }
38  swigCPtr = 0;
39  }
40  super.delete();
41  }
42 
43  protected void swigDirectorDisconnect() {
44  swigCMemOwn = false;
45  delete();
46  }
47 
48  public void swigReleaseOwnership() {
49  swigCMemOwn = false;
50  mainJNI.PathOperator_change_ownership(this, swigCPtr, false);
51  }
52 
53  public void swigTakeOwnership() {
54  swigCMemOwn = true;
55  mainJNI.PathOperator_change_ownership(this, swigCPtr, true);
56  }
57 
58  public PathOperator(IntVar[] next_vars, IntVar[] path_vars, int number_of_base_nodes, boolean skip_locally_optimal_paths, LongToIntFunction start_empty_path_class) {
59  this(mainJNI.new_PathOperator(next_vars, path_vars, number_of_base_nodes, skip_locally_optimal_paths, start_empty_path_class), true);
60  mainJNI.PathOperator_director_connect(this, swigCPtr, true, true);
61  }
62 
63  public boolean neighbor() {
64  return mainJNI.PathOperator_neighbor(swigCPtr, this);
65  }
66 
67  public void reset() {
68  if (getClass() == PathOperator.class) mainJNI.PathOperator_reset(swigCPtr, this); else mainJNI.PathOperator_resetSwigExplicitPathOperator(swigCPtr, this);
69  }
70 
71  protected boolean oneNeighbor() {
72  return (getClass() == PathOperator.class) ? mainJNI.PathOperator_oneNeighbor(swigCPtr, this) : mainJNI.PathOperator_oneNeighborSwigExplicitPathOperator(swigCPtr, this);
73  }
74 
75  protected boolean restartAtPathStartOnSynchronize() {
76  return (getClass() == PathOperator.class) ? mainJNI.PathOperator_restartAtPathStartOnSynchronize(swigCPtr, this) : mainJNI.PathOperator_restartAtPathStartOnSynchronizeSwigExplicitPathOperator(swigCPtr, this);
77  }
78 
79  protected boolean onSamePathAsPreviousBase(long base_index) {
80  return (getClass() == PathOperator.class) ? mainJNI.PathOperator_onSamePathAsPreviousBase(swigCPtr, this, base_index) : mainJNI.PathOperator_onSamePathAsPreviousBaseSwigExplicitPathOperator(swigCPtr, this, base_index);
81  }
82 
83  protected long getBaseNodeRestartPosition(int base_index) {
84  return (getClass() == PathOperator.class) ? mainJNI.PathOperator_getBaseNodeRestartPosition(swigCPtr, this, base_index) : mainJNI.PathOperator_getBaseNodeRestartPositionSwigExplicitPathOperator(swigCPtr, this, base_index);
85  }
86 
87  protected void setNextBaseToIncrement(long base_index) {
88  if (getClass() == PathOperator.class) mainJNI.PathOperator_setNextBaseToIncrement(swigCPtr, this, base_index); else mainJNI.PathOperator_setNextBaseToIncrementSwigExplicitPathOperator(swigCPtr, this, base_index);
89  }
90 
91  protected boolean initPosition() {
92  return (getClass() == PathOperator.class) ? mainJNI.PathOperator_initPosition(swigCPtr, this) : mainJNI.PathOperator_initPositionSwigExplicitPathOperator(swigCPtr, this);
93  }
94 
95 }
boolean onSamePathAsPreviousBase(long base_index)
void setNextBaseToIncrement(long base_index)
boolean initPosition()
void swigDirectorDisconnect()
void swigTakeOwnership()
boolean restartAtPathStartOnSynchronize()
boolean oneNeighbor()
PathOperator(long cPtr, boolean cMemoryOwn)
PathOperator(IntVar[] next_vars, IntVar[] path_vars, int number_of_base_nodes, boolean skip_locally_optimal_paths, LongToIntFunction start_empty_path_class)
long getBaseNodeRestartPosition(int base_index)
void reset()
void swigReleaseOwnership()
boolean neighbor()