Java Reference

Java Reference

SequenceVarElement.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
27 private transient long swigCPtr;
28
29 protected SequenceVarElement(long cPtr, boolean cMemoryOwn) {
30 super(mainJNI.SequenceVarElement_SWIGUpcast(cPtr), cMemoryOwn);
31 swigCPtr = cPtr;
32 }
33
34 protected static long getCPtr(SequenceVarElement obj) {
35 return (obj == null) ? 0 : obj.swigCPtr;
36 }
37
38 @SuppressWarnings("deprecation")
39 protected void finalize() {
40 delete();
41 }
42
43 public synchronized void delete() {
44 if (swigCPtr != 0) {
45 if (swigCMemOwn) {
46 swigCMemOwn = false;
47 mainJNI.delete_SequenceVarElement(swigCPtr);
48 }
49 swigCPtr = 0;
50 }
51 super.delete();
52 }
53
55 this(mainJNI.new_SequenceVarElement__SWIG_0(), true);
56 }
57
59 this(mainJNI.new_SequenceVarElement__SWIG_1(SequenceVar.getCPtr(var), var), true);
60 }
61
62 public void reset(SequenceVar var) {
63 mainJNI.SequenceVarElement_reset(swigCPtr, this, SequenceVar.getCPtr(var), var);
64 }
65
67 long cPtr = mainJNI.SequenceVarElement_clone(swigCPtr, this);
68 return (cPtr == 0) ? null : new SequenceVarElement(cPtr, false);
69 }
70
71 public void copy(SequenceVarElement element) {
72 mainJNI.SequenceVarElement_copy(swigCPtr, this, SequenceVarElement.getCPtr(element), element);
73 }
74
75 public SequenceVar var() {
76 long cPtr = mainJNI.SequenceVarElement_var(swigCPtr, this);
77 return (cPtr == 0) ? null : new SequenceVar(cPtr, false);
78 }
79
80 public void store() {
81 mainJNI.SequenceVarElement_store(swigCPtr, this);
82 }
83
84 public void restore() {
85 mainJNI.SequenceVarElement_restore(swigCPtr, this);
86 }
87
88 public int[] forwardSequence() {
89 return mainJNI.SequenceVarElement_forwardSequence(swigCPtr, this);
90}
91
92 public int[] backwardSequence() {
93 return mainJNI.SequenceVarElement_backwardSequence(swigCPtr, this);
94}
95
96 public int[] unperformed() {
97 return mainJNI.SequenceVarElement_unperformed(swigCPtr, this);
98}
99
100 public void setSequence(int[] forward_sequence, int[] backward_sequence, int[] unperformed) {
101 mainJNI.SequenceVarElement_setSequence(swigCPtr, this, forward_sequence, backward_sequence, unperformed);
102 }
103
104 public void setForwardSequence(int[] forward_sequence) {
105 mainJNI.SequenceVarElement_setForwardSequence(swigCPtr, this, forward_sequence);
106 }
107
108 public void setBackwardSequence(int[] backward_sequence) {
109 mainJNI.SequenceVarElement_setBackwardSequence(swigCPtr, this, backward_sequence);
110 }
111
112 public void setUnperformed(int[] unperformed) {
113 mainJNI.SequenceVarElement_setUnperformed(swigCPtr, this, unperformed);
114 }
115
116 public boolean bound() {
117 return mainJNI.SequenceVarElement_bound(swigCPtr, this);
118 }
119
120 public String toString() {
121 return mainJNI.SequenceVarElement_toString(swigCPtr, this);
122 }
123
124}
The SequenceVarElement stores a partial representation of ranked interval variables in the underlyin...
void setSequence(int[] forward_sequence, int[] backward_sequence, int[] unperformed)
A sequence variable is a variable whose domain is a set of possible orderings of the interval variab...