IntTupleSet.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.12
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 
11 public 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  protected void finalize() {
25  delete();
26  }
27 
28  public synchronized void delete() {
29  if (swigCPtr != 0) {
30  if (swigCMemOwn) {
31  swigCMemOwn = false;
32  mainJNI.delete_IntTupleSet(swigCPtr);
33  }
34  swigCPtr = 0;
35  }
36  }
37 
38  public IntTupleSet(int arity) {
39  this(mainJNI.new_IntTupleSet__SWIG_0(arity), true);
40  }
41 
42  public IntTupleSet(IntTupleSet set) {
43  this(mainJNI.new_IntTupleSet__SWIG_1(IntTupleSet.getCPtr(set), set), true);
44  }
45 
46  public void clear() {
47  mainJNI.IntTupleSet_clear(swigCPtr, this);
48  }
49 
50  public int insert(int[] tuple) {
51  return mainJNI.IntTupleSet_insert__SWIG_0(swigCPtr, this, tuple);
52  }
53 
54  public int insert(long[] tuple) {
55  return mainJNI.IntTupleSet_insert__SWIG_1(swigCPtr, this, tuple);
56  }
57 
58  public int insert2(long v0, long v1) {
59  return mainJNI.IntTupleSet_insert2(swigCPtr, this, v0, v1);
60  }
61 
62  public int insert3(long v0, long v1, long v2) {
63  return mainJNI.IntTupleSet_insert3(swigCPtr, this, v0, v1, v2);
64  }
65 
66  public int insert4(long v0, long v1, long v2, long v3) {
67  return mainJNI.IntTupleSet_insert4(swigCPtr, this, v0, v1, v2, v3);
68  }
69 
70  public void insertAll(long[][] tuples) {
71  mainJNI.IntTupleSet_insertAll__SWIG_0(swigCPtr, this, tuples);
72  }
73 
74  public void insertAll(int[][] tuples) {
75  mainJNI.IntTupleSet_insertAll__SWIG_1(swigCPtr, this, tuples);
76  }
77 
78  public boolean contains(int[] tuple) {
79  return mainJNI.IntTupleSet_contains__SWIG_0(swigCPtr, this, tuple);
80  }
81 
82  public boolean contains(long[] tuple) {
83  return mainJNI.IntTupleSet_contains__SWIG_1(swigCPtr, this, tuple);
84  }
85 
86  public int numTuples() {
87  return mainJNI.IntTupleSet_numTuples(swigCPtr, this);
88  }
89 
90  public long value(int tuple_index, int pos_in_tuple) {
91  return mainJNI.IntTupleSet_value(swigCPtr, this, tuple_index, pos_in_tuple);
92  }
93 
94  public int arity() {
95  return mainJNI.IntTupleSet_arity(swigCPtr, this);
96  }
97 
98  public int numDifferentValuesInColumn(int col) {
99  return mainJNI.IntTupleSet_numDifferentValuesInColumn(swigCPtr, this, col);
100  }
101 
102  public IntTupleSet sortedByColumn(int col) {
103  return new IntTupleSet(mainJNI.IntTupleSet_sortedByColumn(swigCPtr, this, col), true);
104  }
105 
107  return new IntTupleSet(mainJNI.IntTupleSet_sortedLexicographically(swigCPtr, this), true);
108  }
109 
110 }
IntTupleSet(long cPtr, boolean cMemoryOwn)
long value(int tuple_index, int pos_in_tuple)
int insert4(long v0, long v1, long v2, long v3)
int insert3(long v0, long v1, long v2)