Google OR-Tools
v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
LinearSumAssignment.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.graph;
10
11
public
class
LinearSumAssignment
{
12
private
transient
long
swigCPtr;
13
protected
transient
boolean
swigCMemOwn
;
14
15
protected
LinearSumAssignment
(
long
cPtr,
boolean
cMemoryOwn) {
16
swigCMemOwn
= cMemoryOwn;
17
swigCPtr = cPtr;
18
}
19
20
protected
static
long
getCPtr
(
LinearSumAssignment
obj) {
21
return
(obj ==
null
) ? 0 : obj.swigCPtr;
22
}
23
24
protected
static
long
swigRelease
(
LinearSumAssignment
obj) {
25
long
ptr = 0;
26
if
(obj !=
null
) {
27
if
(!obj.
swigCMemOwn
)
28
throw
new
RuntimeException(
"Cannot release ownership as memory is not owned"
);
29
ptr = obj.swigCPtr;
30
obj.swigCMemOwn =
false
;
31
obj.
delete
();
32
}
33
return
ptr;
34
}
35
36
@SuppressWarnings({
"deprecation"
,
"removal"
})
37
protected
void
finalize
() {
38
delete
();
39
}
40
41
public
synchronized
void
delete
() {
42
if
(swigCPtr != 0) {
43
if
(
swigCMemOwn
) {
44
swigCMemOwn
=
false
;
45
mainJNI.delete_LinearSumAssignment(swigCPtr);
46
}
47
swigCPtr = 0;
48
}
49
}
50
51
public
LinearSumAssignment
() {
52
this
(mainJNI.new_LinearSumAssignment(),
true
);
53
}
54
55
public
int
addArcWithCost
(
int
left_node,
int
right_node,
long
cost) {
56
return
mainJNI.LinearSumAssignment_addArcWithCost(swigCPtr,
this
, left_node, right_node, cost);
57
}
58
59
public
int
getNumNodes
() {
60
return
mainJNI.LinearSumAssignment_getNumNodes(swigCPtr,
this
);
61
}
62
63
public
int
getNumArcs
() {
64
return
mainJNI.LinearSumAssignment_getNumArcs(swigCPtr,
this
);
65
}
66
67
public
int
getLeftNode
(
int
arc) {
68
return
mainJNI.LinearSumAssignment_getLeftNode(swigCPtr,
this
, arc);
69
}
70
71
public
int
getRightNode
(
int
arc) {
72
return
mainJNI.LinearSumAssignment_getRightNode(swigCPtr,
this
, arc);
73
}
74
75
public
long
getCost
(
int
arc) {
76
return
mainJNI.LinearSumAssignment_getCost(swigCPtr,
this
, arc);
77
}
78
79
public
LinearSumAssignment.Status
solve
() {
80
return
LinearSumAssignment
.
Status
.
swigToEnum
(mainJNI.LinearSumAssignment_solve(swigCPtr,
this
));
81
}
82
83
public
long
getOptimalCost
() {
84
return
mainJNI.LinearSumAssignment_getOptimalCost(swigCPtr,
this
);
85
}
86
87
public
int
getRightMate
(
int
left_node) {
88
return
mainJNI.LinearSumAssignment_getRightMate(swigCPtr,
this
, left_node);
89
}
90
91
public
long
getAssignmentCost
(
int
left_node) {
92
return
mainJNI.LinearSumAssignment_getAssignmentCost(swigCPtr,
this
, left_node);
93
}
94
95
public
enum
Status
{
96
OPTIMAL
,
97
INFEASIBLE
,
98
POSSIBLE_OVERFLOW
;
99
100
public
final
int
swigValue
() {
101
return
swigValue;
102
}
103
104
public
static
Status
swigToEnum
(
int
swigValue) {
105
Status
[] swigValues =
Status
.class.getEnumConstants();
106
if
(swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
107
return
swigValues[swigValue];
108
for
(
Status
swigEnum : swigValues)
109
if
(swigEnum.swigValue == swigValue)
110
return
swigEnum;
111
throw
new
IllegalArgumentException(
"No enum "
+
Status
.class +
" with value "
+ swigValue);
112
}
113
114
@SuppressWarnings(
"unused"
)
115
private
Status
() {
116
this.swigValue = SwigNext.next++;
117
}
118
119
@SuppressWarnings(
"unused"
)
120
private Status(
int
swigValue) {
121
this.swigValue = swigValue;
122
SwigNext.next = swigValue+1;
123
}
124
125
@SuppressWarnings(
"unused"
)
126
private Status(Status swigEnum) {
127
this.swigValue = swigEnum.swigValue;
128
SwigNext.next = this.swigValue+1;
129
}
130
131
private
final
int
swigValue;
132
133
private
static
class
SwigNext {
134
private
static
int
next = 0;
135
}
136
}
137
138
}
com.google.ortools.graph.LinearSumAssignment
Definition
LinearSumAssignment.java:11
com.google.ortools.graph.LinearSumAssignment.LinearSumAssignment
LinearSumAssignment()
Definition
LinearSumAssignment.java:51
com.google.ortools.graph.LinearSumAssignment.getCPtr
static long getCPtr(LinearSumAssignment obj)
Definition
LinearSumAssignment.java:20
com.google.ortools.graph.LinearSumAssignment.getAssignmentCost
long getAssignmentCost(int left_node)
Definition
LinearSumAssignment.java:91
com.google.ortools.graph.LinearSumAssignment.getCost
long getCost(int arc)
Definition
LinearSumAssignment.java:75
com.google.ortools.graph.LinearSumAssignment.addArcWithCost
int addArcWithCost(int left_node, int right_node, long cost)
Definition
LinearSumAssignment.java:55
com.google.ortools.graph.LinearSumAssignment.getRightNode
int getRightNode(int arc)
Definition
LinearSumAssignment.java:71
com.google.ortools.graph.LinearSumAssignment.LinearSumAssignment
LinearSumAssignment(long cPtr, boolean cMemoryOwn)
Definition
LinearSumAssignment.java:15
com.google.ortools.graph.LinearSumAssignment.getLeftNode
int getLeftNode(int arc)
Definition
LinearSumAssignment.java:67
com.google.ortools.graph.LinearSumAssignment.getNumArcs
int getNumArcs()
Definition
LinearSumAssignment.java:63
com.google.ortools.graph.LinearSumAssignment.finalize
void finalize()
Definition
LinearSumAssignment.java:37
com.google.ortools.graph.LinearSumAssignment.solve
LinearSumAssignment.Status solve()
Definition
LinearSumAssignment.java:79
com.google.ortools.graph.LinearSumAssignment.swigCMemOwn
transient boolean swigCMemOwn
Definition
LinearSumAssignment.java:13
com.google.ortools.graph.LinearSumAssignment.getOptimalCost
long getOptimalCost()
Definition
LinearSumAssignment.java:83
com.google.ortools.graph.LinearSumAssignment.delete
synchronized void delete()
Definition
LinearSumAssignment.java:41
com.google.ortools.graph.LinearSumAssignment.getRightMate
int getRightMate(int left_node)
Definition
LinearSumAssignment.java:87
com.google.ortools.graph.LinearSumAssignment.getNumNodes
int getNumNodes()
Definition
LinearSumAssignment.java:59
com.google.ortools.graph.LinearSumAssignment.swigRelease
static long swigRelease(LinearSumAssignment obj)
Definition
LinearSumAssignment.java:24
com.google.ortools.graph.LinearSumAssignment.Status
Definition
LinearSumAssignment.java:95
com.google.ortools.graph.LinearSumAssignment.Status.swigToEnum
static Status swigToEnum(int swigValue)
Definition
LinearSumAssignment.java:104
com.google.ortools.graph.LinearSumAssignment.Status.INFEASIBLE
INFEASIBLE
Definition
LinearSumAssignment.java:97
com.google.ortools.graph.LinearSumAssignment.Status.OPTIMAL
OPTIMAL
Definition
LinearSumAssignment.java:96
com.google.ortools.graph.LinearSumAssignment.Status.swigValue
final int swigValue()
Definition
LinearSumAssignment.java:100
com.google.ortools.graph.LinearSumAssignment.Status.POSSIBLE_OVERFLOW
POSSIBLE_OVERFLOW
Definition
LinearSumAssignment.java:98
build
java
ortools-java
src
main
java
com
google
ortools
graph
LinearSumAssignment.java
Generated by
1.12.0