Google OR-Tools
v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
ChangeValue.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
9
package
com.google.ortools.constraintsolver;
10
17
public
class
ChangeValue
extends
IntVarLocalSearchOperator
{
18
private
transient
long
swigCPtr;
19
20
protected
ChangeValue
(
long
cPtr,
boolean
cMemoryOwn) {
21
super(mainJNI.ChangeValue_SWIGUpcast(cPtr), cMemoryOwn);
22
swigCPtr = cPtr;
23
}
24
25
protected
static
long
getCPtr
(
ChangeValue
obj) {
26
return
(obj ==
null
) ? 0 : obj.swigCPtr;
27
}
28
29
protected
static
long
swigRelease
(
ChangeValue
obj) {
30
long
ptr = 0;
31
if
(obj !=
null
) {
32
if
(!obj.
swigCMemOwn
)
33
throw
new
RuntimeException(
"Cannot release ownership as memory is not owned"
);
34
ptr = obj.swigCPtr;
35
obj.swigCMemOwn =
false
;
36
obj.
delete
();
37
}
38
return
ptr;
39
}
40
41
@SuppressWarnings({
"deprecation"
,
"removal"
})
42
protected
void
finalize
() {
43
delete
();
44
}
45
46
public
synchronized
void
delete
() {
47
if
(swigCPtr != 0) {
48
if
(
swigCMemOwn
) {
49
swigCMemOwn
=
false
;
50
mainJNI.delete_ChangeValue(swigCPtr);
51
}
52
swigCPtr = 0;
53
}
54
super.delete();
55
}
56
57
protected
void
swigDirectorDisconnect
() {
58
swigCMemOwn
=
false
;
59
delete
();
60
}
61
62
public
void
swigReleaseOwnership
() {
63
swigCMemOwn
=
false
;
64
mainJNI.ChangeValue_change_ownership(
this
, swigCPtr,
false
);
65
}
66
67
public
void
swigTakeOwnership
() {
68
swigCMemOwn
=
true
;
69
mainJNI.ChangeValue_change_ownership(
this
, swigCPtr,
true
);
70
}
71
72
public
ChangeValue
(
IntVar
[] vars) {
73
this
(mainJNI.new_ChangeValue(vars),
true
);
74
mainJNI.ChangeValue_director_connect(
this
, swigCPtr,
true
,
true
);
75
}
76
77
public
long
modifyValue
(
long
index,
long
value
) {
78
return
mainJNI.ChangeValue_modifyValue(swigCPtr,
this
, index,
value
);
79
}
80
84
protected
boolean
oneNeighbor
() {
85
return
(getClass() ==
ChangeValue
.class) ? mainJNI.ChangeValue_oneNeighbor(swigCPtr,
this
) : mainJNI.ChangeValue_oneNeighborSwigExplicitChangeValue(swigCPtr,
this
);
86
}
87
88
}
com.google.ortools.constraintsolver.BaseObject.swigCMemOwn
transient boolean swigCMemOwn
Definition
BaseObject.java:18
com.google.ortools.constraintsolver.ChangeValue
Definition
ChangeValue.java:17
com.google.ortools.constraintsolver.ChangeValue.ChangeValue
ChangeValue(long cPtr, boolean cMemoryOwn)
Definition
ChangeValue.java:20
com.google.ortools.constraintsolver.ChangeValue.swigTakeOwnership
void swigTakeOwnership()
Definition
ChangeValue.java:67
com.google.ortools.constraintsolver.ChangeValue.swigDirectorDisconnect
void swigDirectorDisconnect()
Definition
ChangeValue.java:57
com.google.ortools.constraintsolver.ChangeValue.finalize
void finalize()
Definition
ChangeValue.java:42
com.google.ortools.constraintsolver.ChangeValue.getCPtr
static long getCPtr(ChangeValue obj)
Definition
ChangeValue.java:25
com.google.ortools.constraintsolver.ChangeValue.modifyValue
long modifyValue(long index, long value)
Definition
ChangeValue.java:77
com.google.ortools.constraintsolver.ChangeValue.oneNeighbor
boolean oneNeighbor()
Definition
ChangeValue.java:84
com.google.ortools.constraintsolver.ChangeValue.ChangeValue
ChangeValue(IntVar[] vars)
Definition
ChangeValue.java:72
com.google.ortools.constraintsolver.ChangeValue.swigRelease
static long swigRelease(ChangeValue obj)
Definition
ChangeValue.java:29
com.google.ortools.constraintsolver.ChangeValue.delete
synchronized void delete()
Definition
ChangeValue.java:46
com.google.ortools.constraintsolver.ChangeValue.swigReleaseOwnership
void swigReleaseOwnership()
Definition
ChangeValue.java:62
com.google.ortools.constraintsolver.IntVarLocalSearchOperator
Definition
IntVarLocalSearchOperator.java:18
com.google.ortools.constraintsolver.IntVarLocalSearchOperator.value
long value(long index)
Definition
IntVarLocalSearchOperator.java:107
com.google.ortools.constraintsolver.IntVar
Definition
IntVar.java:16
build
java
ortools-java
src
main
java
com
google
ortools
constraintsolver
ChangeValue.java
Generated by
1.12.0