Java Reference

Java Reference

Demon.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
22public class Demon extends BaseObject {
23 private transient long swigCPtr;
24
25 protected Demon(long cPtr, boolean cMemoryOwn) {
26 super(mainJNI.Demon_SWIGUpcast(cPtr), cMemoryOwn);
27 swigCPtr = cPtr;
28 }
29
30 protected static long getCPtr(Demon obj) {
31 return (obj == null) ? 0 : obj.swigCPtr;
32 }
33
34 @SuppressWarnings("deprecation")
35 protected void finalize() {
36 delete();
37 }
38
39 public synchronized void delete() {
40 if (swigCPtr != 0) {
41 if (swigCMemOwn) {
42 swigCMemOwn = false;
43 mainJNI.delete_Demon(swigCPtr);
44 }
45 swigCPtr = 0;
46 }
47 super.delete();
48 }
49
53 public void run(Solver s) {
54 mainJNI.Demon_run(swigCPtr, this, Solver.getCPtr(s), s);
55 }
56
62 public int priority() {
63 return mainJNI.Demon_priority(swigCPtr, this);
64 }
65
66 public String toString() {
67 return mainJNI.Demon_toString(swigCPtr, this);
68 }
69
74 public void inhibit(Solver s) {
75 mainJNI.Demon_inhibit(swigCPtr, this, Solver.getCPtr(s), s);
76 }
77
81 public void desinhibit(Solver s) {
82 mainJNI.Demon_desinhibit(swigCPtr, this, Solver.getCPtr(s), s);
83 }
84
85}
A BaseObject is the root of all reversibly allocated objects.
Definition: BaseObject.java:16
A Demon is the base element of a propagation queue.
Definition: Demon.java:22
void inhibit(Solver s)
This method inhibits the demon in the search tree below the current position.
Definition: Demon.java:74
Demon(long cPtr, boolean cMemoryOwn)
Definition: Demon.java:25
void run(Solver s)
This is the main callback of the demon.
Definition: Demon.java:53
void desinhibit(Solver s)
This method un-inhibits the demon that was previously inhibited.
Definition: Demon.java:81
int priority()
This method returns the priority of the demon.
Definition: Demon.java:62
Solver Class A solver represents the main computation engine.
Definition: Solver.java:76