Java Reference

Java Reference

LocalSearchMonitor.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.2
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
9package com.google.ortools.constraintsolver;
10
11public class LocalSearchMonitor extends SearchMonitor {
12 private transient long swigCPtr;
13
14 protected LocalSearchMonitor(long cPtr, boolean cMemoryOwn) {
15 super(mainJNI.LocalSearchMonitor_SWIGUpcast(cPtr), cMemoryOwn);
16 swigCPtr = cPtr;
17 }
18
19 protected static long getCPtr(LocalSearchMonitor obj) {
20 return (obj == null) ? 0 : obj.swigCPtr;
21 }
22
23 @SuppressWarnings("deprecation")
24 protected void finalize() {
25 delete();
26 }
27
28 public synchronized void delete() {
29 if (swigCPtr != 0) {
30 if (swigCMemOwn) {
31 swigCMemOwn = false;
32 mainJNI.delete_LocalSearchMonitor(swigCPtr);
33 }
34 swigCPtr = 0;
35 }
36 super.delete();
37 }
38
39 public String toString() {
40 return mainJNI.LocalSearchMonitor_toString(swigCPtr, this);
41 }
42
46 public void beginOperatorStart() {
47 mainJNI.LocalSearchMonitor_beginOperatorStart(swigCPtr, this);
48 }
49
50 public void endOperatorStart() {
51 mainJNI.LocalSearchMonitor_endOperatorStart(swigCPtr, this);
52 }
53
55 mainJNI.LocalSearchMonitor_beginMakeNextNeighbor(swigCPtr, this, LocalSearchOperator.getCPtr(op), op);
56 }
57
58 public void endMakeNextNeighbor(LocalSearchOperator op, boolean neighbor_found, Assignment delta, Assignment deltadelta) {
59 mainJNI.LocalSearchMonitor_endMakeNextNeighbor(swigCPtr, this, LocalSearchOperator.getCPtr(op), op, neighbor_found, Assignment.getCPtr(delta), delta, Assignment.getCPtr(deltadelta), deltadelta);
60 }
61
63 mainJNI.LocalSearchMonitor_beginFilterNeighbor(swigCPtr, this, LocalSearchOperator.getCPtr(op), op);
64 }
65
66 public void endFilterNeighbor(LocalSearchOperator op, boolean neighbor_found) {
67 mainJNI.LocalSearchMonitor_endFilterNeighbor(swigCPtr, this, LocalSearchOperator.getCPtr(op), op, neighbor_found);
68 }
69
71 mainJNI.LocalSearchMonitor_beginAcceptNeighbor(swigCPtr, this, LocalSearchOperator.getCPtr(op), op);
72 }
73
74 public void endAcceptNeighbor(LocalSearchOperator op, boolean neighbor_found) {
75 mainJNI.LocalSearchMonitor_endAcceptNeighbor(swigCPtr, this, LocalSearchOperator.getCPtr(op), op, neighbor_found);
76 }
77
78 public void beginFiltering(LocalSearchFilter filter) {
79 mainJNI.LocalSearchMonitor_beginFiltering(swigCPtr, this, LocalSearchFilter.getCPtr(filter), filter);
80 }
81
82 public void endFiltering(LocalSearchFilter filter, boolean reject) {
83 mainJNI.LocalSearchMonitor_endFiltering(swigCPtr, this, LocalSearchFilter.getCPtr(filter), filter, reject);
84 }
85
89 public void install() {
90 mainJNI.LocalSearchMonitor_install(swigCPtr, this);
91 }
92
93}
An Assignment is a variable -> domains mapping, used to report solutions to the user.
Definition: Assignment.java:15
Classes to which this template function can be applied to as of 04/2014.
void endFilterNeighbor(LocalSearchOperator op, boolean neighbor_found)
void endFiltering(LocalSearchFilter filter, boolean reject)
void endMakeNextNeighbor(LocalSearchOperator op, boolean neighbor_found, Assignment delta, Assignment deltadelta)
void endAcceptNeighbor(LocalSearchOperator op, boolean neighbor_found)
void beginOperatorStart()
Local search operator events.
This class represent a reversible FIFO structure.
A search monitor is a simple set of callbacks to monitor all search events.