Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
DecisionVisitor.java
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.2.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
9package com.google.ortools.constraintsolver;
10
15public class DecisionVisitor extends BaseObject {
16 private transient long swigCPtr;
17
18 protected DecisionVisitor(long cPtr, boolean cMemoryOwn) {
19 super(mainJNI.DecisionVisitor_SWIGUpcast(cPtr), cMemoryOwn);
20 swigCPtr = cPtr;
21 }
22
23 protected static long getCPtr(DecisionVisitor obj) {
24 return (obj == null) ? 0 : obj.swigCPtr;
25 }
26
27 protected static long swigRelease(DecisionVisitor obj) {
28 long ptr = 0;
29 if (obj != null) {
30 if (!obj.swigCMemOwn)
31 throw new RuntimeException("Cannot release ownership as memory is not owned");
32 ptr = obj.swigCPtr;
33 obj.swigCMemOwn = false;
34 obj.delete();
35 }
36 return ptr;
37 }
38
39 @SuppressWarnings({"deprecation", "removal"})
40 protected void finalize() {
41 delete();
42 }
43
44 public synchronized void delete() {
45 if (swigCPtr != 0) {
46 if (swigCMemOwn) {
47 swigCMemOwn = false;
48 mainJNI.delete_DecisionVisitor(swigCPtr);
49 }
50 swigCPtr = 0;
51 }
52 super.delete();
53 }
54
55 protected void swigDirectorDisconnect() {
56 swigCMemOwn = false;
57 delete();
58 }
59
60 public void swigReleaseOwnership() {
61 swigCMemOwn = false;
62 mainJNI.DecisionVisitor_change_ownership(this, swigCPtr, false);
63 }
64
65 public void swigTakeOwnership() {
66 swigCMemOwn = true;
67 mainJNI.DecisionVisitor_change_ownership(this, swigCPtr, true);
68 }
69
70 public DecisionVisitor() {
71 this(mainJNI.new_DecisionVisitor(), true);
72 mainJNI.DecisionVisitor_director_connect(this, swigCPtr, true, true);
73 }
74
75 public void visitSetVariableValue(IntVar var, long value) {
76 if (getClass() == DecisionVisitor.class) mainJNI.DecisionVisitor_visitSetVariableValue(swigCPtr, this, IntVar.getCPtr(var), var, value); else mainJNI.DecisionVisitor_visitSetVariableValueSwigExplicitDecisionVisitor(swigCPtr, this, IntVar.getCPtr(var), var, value);
77 }
78
79 public void visitSplitVariableDomain(IntVar var, long value, boolean start_with_lower_half) {
80 if (getClass() == DecisionVisitor.class) mainJNI.DecisionVisitor_visitSplitVariableDomain(swigCPtr, this, IntVar.getCPtr(var), var, value, start_with_lower_half); else mainJNI.DecisionVisitor_visitSplitVariableDomainSwigExplicitDecisionVisitor(swigCPtr, this, IntVar.getCPtr(var), var, value, start_with_lower_half);
81 }
82
83 public void visitScheduleOrPostpone(IntervalVar var, long est) {
84 if (getClass() == DecisionVisitor.class) mainJNI.DecisionVisitor_visitScheduleOrPostpone(swigCPtr, this, IntervalVar.getCPtr(var), var, est); else mainJNI.DecisionVisitor_visitScheduleOrPostponeSwigExplicitDecisionVisitor(swigCPtr, this, IntervalVar.getCPtr(var), var, est);
85 }
86
87 public void visitScheduleOrExpedite(IntervalVar var, long est) {
88 if (getClass() == DecisionVisitor.class) mainJNI.DecisionVisitor_visitScheduleOrExpedite(swigCPtr, this, IntervalVar.getCPtr(var), var, est); else mainJNI.DecisionVisitor_visitScheduleOrExpediteSwigExplicitDecisionVisitor(swigCPtr, this, IntervalVar.getCPtr(var), var, est);
89 }
90
91 public void visitRankFirstInterval(SequenceVar sequence, int index) {
92 if (getClass() == DecisionVisitor.class) mainJNI.DecisionVisitor_visitRankFirstInterval(swigCPtr, this, SequenceVar.getCPtr(sequence), sequence, index); else mainJNI.DecisionVisitor_visitRankFirstIntervalSwigExplicitDecisionVisitor(swigCPtr, this, SequenceVar.getCPtr(sequence), sequence, index);
93 }
94
95 public void visitRankLastInterval(SequenceVar sequence, int index) {
96 if (getClass() == DecisionVisitor.class) mainJNI.DecisionVisitor_visitRankLastInterval(swigCPtr, this, SequenceVar.getCPtr(sequence), sequence, index); else mainJNI.DecisionVisitor_visitRankLastIntervalSwigExplicitDecisionVisitor(swigCPtr, this, SequenceVar.getCPtr(sequence), sequence, index);
97 }
98
99 public void visitUnknownDecision() {
100 if (getClass() == DecisionVisitor.class) mainJNI.DecisionVisitor_visitUnknownDecision(swigCPtr, this); else mainJNI.DecisionVisitor_visitUnknownDecisionSwigExplicitDecisionVisitor(swigCPtr, this);
101 }
102
103}
void visitRankFirstInterval(SequenceVar sequence, int index)
void visitRankLastInterval(SequenceVar sequence, int index)
void visitScheduleOrExpedite(IntervalVar var, long est)
void visitScheduleOrPostpone(IntervalVar var, long est)
void visitSplitVariableDomain(IntVar var, long value, boolean start_with_lower_half)