Java Reference

Java Reference

BaseLns.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 
14 public class BaseLns extends IntVarLocalSearchOperator {
15  private transient long swigCPtr;
16 
17  protected BaseLns(long cPtr, boolean cMemoryOwn) {
18  super(mainJNI.BaseLns_SWIGUpcast(cPtr), cMemoryOwn);
19  swigCPtr = cPtr;
20  }
21 
22  protected static long getCPtr(BaseLns obj) {
23  return (obj == null) ? 0 : obj.swigCPtr;
24  }
25 
26  @SuppressWarnings("deprecation")
27  protected void finalize() {
28  delete();
29  }
30 
31  public synchronized void delete() {
32  if (swigCPtr != 0) {
33  if (swigCMemOwn) {
34  swigCMemOwn = false;
35  mainJNI.delete_BaseLns(swigCPtr);
36  }
37  swigCPtr = 0;
38  }
39  super.delete();
40  }
41 
42  protected void swigDirectorDisconnect() {
43  swigCMemOwn = false;
44  delete();
45  }
46 
47  public void swigReleaseOwnership() {
48  swigCMemOwn = false;
49  mainJNI.BaseLns_change_ownership(this, swigCPtr, false);
50  }
51 
52  public void swigTakeOwnership() {
53  swigCMemOwn = true;
54  mainJNI.BaseLns_change_ownership(this, swigCPtr, true);
55  }
56 
57  public BaseLns(IntVar[] vars) {
58  this(mainJNI.new_BaseLns(vars), true);
59  mainJNI.BaseLns_director_connect(this, swigCPtr, true, true);
60  }
61 
62  public void initFragments() {
63  if (getClass() == BaseLns.class) mainJNI.BaseLns_initFragments(swigCPtr, this); else mainJNI.BaseLns_initFragmentsSwigExplicitBaseLns(swigCPtr, this);
64  }
65 
66  public boolean nextFragment() {
67  return mainJNI.BaseLns_nextFragment(swigCPtr, this);
68  }
69 
70  public void appendToFragment(int index) {
71  mainJNI.BaseLns_appendToFragment(swigCPtr, this, index);
72  }
73 
74  public int fragmentSize() {
75  return mainJNI.BaseLns_fragmentSize(swigCPtr, this);
76  }
77 
78  public boolean HasFragments() {
79  return (getClass() == BaseLns.class) ? mainJNI.BaseLns_HasFragments(swigCPtr, this) : mainJNI.BaseLns_HasFragmentsSwigExplicitBaseLns(swigCPtr, this);
80  }
81 
82 }
This is the base class for building an Lns operator.
Definition: BaseLns.java:14
void swigTakeOwnership()
Definition: BaseLns.java:52
void initFragments()
Definition: BaseLns.java:62
BaseLns(long cPtr, boolean cMemoryOwn)
Definition: BaseLns.java:17
BaseLns(IntVar[] vars)
Definition: BaseLns.java:57
The class IntVar is a subset of IntExpr.
boolean nextFragment()
Definition: BaseLns.java:66
int fragmentSize()
Definition: BaseLns.java:74
void swigDirectorDisconnect()
Definition: BaseLns.java:42
void swigReleaseOwnership()
Definition: BaseLns.java:47
boolean HasFragments()
Definition: BaseLns.java:78
void appendToFragment(int index)
Definition: BaseLns.java:70