BABSearch.java
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 package org.gecode;
00010
00023 public class BABSearch {
00024 private long swigCPtr;
00025 protected boolean swigCMemOwn;
00026
00027 protected BABSearch(long cPtr, boolean cMemoryOwn) {
00028 swigCMemOwn = cMemoryOwn;
00029 swigCPtr = cPtr;
00030 }
00031
00032 protected static long getCPtr(BABSearch obj) {
00033 return (obj == null) ? 0 : obj.swigCPtr;
00034 }
00035
00036 protected void finalize() {
00037 delete();
00038 }
00039
00040 public void delete() {
00041 if(swigCPtr != 0 && swigCMemOwn) {
00042 swigCMemOwn = false;
00043 GecodeJNI.delete_BABSearch(swigCPtr);
00044 }
00045 swigCPtr = 0;
00046 }
00047 public synchronized JavaSpace next() {
00050 JavaSpace s = next_internal();
00051 if (s != null)
00052 s.swigTakeOwnership();
00053 return s;
00054 }
00055
00056 public BABSearch(JavaSpace s, int c_d, int a_d, Stop st) {
00062 this(GecodeJNI.new_BABSearch__SWIG_0(JavaSpace.getCPtr(s), c_d, a_d, Stop.getCPtr(st)), true);
00063 }
00064
00065 public BABSearch(JavaSpace s, int c_d, int a_d) {
00071 this(GecodeJNI.new_BABSearch__SWIG_1(JavaSpace.getCPtr(s), c_d, a_d), true);
00072 }
00073
00074 public BABSearch(JavaSpace s, int c_d) {
00080 this(GecodeJNI.new_BABSearch__SWIG_2(JavaSpace.getCPtr(s), c_d), true);
00081 }
00082
00083 public BABSearch(JavaSpace s) {
00089 this(GecodeJNI.new_BABSearch__SWIG_3(JavaSpace.getCPtr(s)), true);
00090 }
00091
00092 public synchronized JavaSpace next_internal() {
00095 return GecodeJNI.BABSearch_next_internal(swigCPtr);
00096 }
00097
00098 public synchronized Statistics statistics() {
00101 return new Statistics(GecodeJNI.BABSearch_statistics(swigCPtr), true);
00102 }
00103
00104 }