Java Reference

Java Reference

IntTupleSet.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
11public class IntTupleSet {
12 private transient long swigCPtr;
13 protected transient boolean swigCMemOwn;
14
15 protected IntTupleSet(long cPtr, boolean cMemoryOwn) {
16 swigCMemOwn = cMemoryOwn;
17 swigCPtr = cPtr;
18 }
19
20 protected static long getCPtr(IntTupleSet obj) {
21 return (obj == null) ? 0 : obj.swigCPtr;
22 }
23
24 @SuppressWarnings("deprecation")
25 protected void finalize() {
26 delete();
27 }
28
29 public synchronized void delete() {
30 if (swigCPtr != 0) {
31 if (swigCMemOwn) {
32 swigCMemOwn = false;
33 mainJNI.delete_IntTupleSet(swigCPtr);
34 }
35 swigCPtr = 0;
36 }
37 }
38
39 public IntTupleSet(int arity) {
40 this(mainJNI.new_IntTupleSet__SWIG_0(arity), true);
41 }
42
44 this(mainJNI.new_IntTupleSet__SWIG_1(IntTupleSet.getCPtr(set), set), true);
45 }
46
47 public void clear() {
48 mainJNI.IntTupleSet_clear(swigCPtr, this);
49 }
50
51 public int insert(int[] tuple) {
52 return mainJNI.IntTupleSet_insert__SWIG_0(swigCPtr, this, tuple);
53 }
54
55 public int insert(long[] tuple) {
56 return mainJNI.IntTupleSet_insert__SWIG_1(swigCPtr, this, tuple);
57 }
58
59 public int insert2(long v0, long v1) {
60 return mainJNI.IntTupleSet_insert2(swigCPtr, this, v0, v1);
61 }
62
63 public int insert3(long v0, long v1, long v2) {
64 return mainJNI.IntTupleSet_insert3(swigCPtr, this, v0, v1, v2);
65 }
66
67 public int insert4(long v0, long v1, long v2, long v3) {
68 return mainJNI.IntTupleSet_insert4(swigCPtr, this, v0, v1, v2, v3);
69 }
70
71 public void insertAll(long[][] tuples) {
72 mainJNI.IntTupleSet_insertAll__SWIG_0(swigCPtr, this, tuples);
73 }
74
75 public void insertAll(int[][] tuples) {
76 mainJNI.IntTupleSet_insertAll__SWIG_1(swigCPtr, this, tuples);
77 }
78
79 public boolean contains(int[] tuple) {
80 return mainJNI.IntTupleSet_contains__SWIG_0(swigCPtr, this, tuple);
81 }
82
83 public boolean contains(long[] tuple) {
84 return mainJNI.IntTupleSet_contains__SWIG_1(swigCPtr, this, tuple);
85 }
86
87 public int numTuples() {
88 return mainJNI.IntTupleSet_numTuples(swigCPtr, this);
89 }
90
91 public long value(int tuple_index, int pos_in_tuple) {
92 return mainJNI.IntTupleSet_value(swigCPtr, this, tuple_index, pos_in_tuple);
93 }
94
95 public int arity() {
96 return mainJNI.IntTupleSet_arity(swigCPtr, this);
97 }
98
99 public int numDifferentValuesInColumn(int col) {
100 return mainJNI.IntTupleSet_numDifferentValuesInColumn(swigCPtr, this, col);
101 }
102
103 public IntTupleSet sortedByColumn(int col) {
104 return new IntTupleSet(mainJNI.IntTupleSet_sortedByColumn(swigCPtr, this, col), true);
105 }
106
108 return new IntTupleSet(mainJNI.IntTupleSet_sortedLexicographically(swigCPtr, this), true);
109 }
110
111}
int insert4(long v0, long v1, long v2, long v3)
int insert3(long v0, long v1, long v2)
IntTupleSet(long cPtr, boolean cMemoryOwn)
long value(int tuple_index, int pos_in_tuple)