All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.ortools.constraintsolver.IntTupleSet Maven / Gradle / Ivy

The newest version!
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.12
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.google.ortools.constraintsolver;

public class IntTupleSet {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected IntTupleSet(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(IntTupleSet obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        mainJNI.delete_IntTupleSet(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public IntTupleSet(int arity) {
    this(mainJNI.new_IntTupleSet__SWIG_0(arity), true);
  }

  public IntTupleSet(IntTupleSet set) {
    this(mainJNI.new_IntTupleSet__SWIG_1(IntTupleSet.getCPtr(set), set), true);
  }

  public void clear() {
    mainJNI.IntTupleSet_clear(swigCPtr, this);
  }

  public int insert(int[] tuple) {
    return mainJNI.IntTupleSet_insert__SWIG_0(swigCPtr, this, tuple);
  }

  public int insert(long[] tuple) {
    return mainJNI.IntTupleSet_insert__SWIG_1(swigCPtr, this, tuple);
  }

  public int insert2(long v0, long v1) {
    return mainJNI.IntTupleSet_insert2(swigCPtr, this, v0, v1);
  }

  public int insert3(long v0, long v1, long v2) {
    return mainJNI.IntTupleSet_insert3(swigCPtr, this, v0, v1, v2);
  }

  public int insert4(long v0, long v1, long v2, long v3) {
    return mainJNI.IntTupleSet_insert4(swigCPtr, this, v0, v1, v2, v3);
  }

  public void insertAll(long[][] tuples) {
    mainJNI.IntTupleSet_insertAll__SWIG_0(swigCPtr, this, tuples);
  }

  public void insertAll(int[][] tuples) {
    mainJNI.IntTupleSet_insertAll__SWIG_1(swigCPtr, this, tuples);
  }

  public boolean contains(int[] tuple) {
    return mainJNI.IntTupleSet_contains__SWIG_0(swigCPtr, this, tuple);
  }

  public boolean contains(long[] tuple) {
    return mainJNI.IntTupleSet_contains__SWIG_1(swigCPtr, this, tuple);
  }

  public int numTuples() {
    return mainJNI.IntTupleSet_numTuples(swigCPtr, this);
  }

  public long value(int tuple_index, int pos_in_tuple) {
    return mainJNI.IntTupleSet_value(swigCPtr, this, tuple_index, pos_in_tuple);
  }

  public int arity() {
    return mainJNI.IntTupleSet_arity(swigCPtr, this);
  }

  public int numDifferentValuesInColumn(int col) {
    return mainJNI.IntTupleSet_numDifferentValuesInColumn(swigCPtr, this, col);
  }

  public IntTupleSet sortedByColumn(int col) {
    return new IntTupleSet(mainJNI.IntTupleSet_sortedByColumn(swigCPtr, this, col), true);
  }

  public IntTupleSet sortedLexicographically() {
    return new IntTupleSet(mainJNI.IntTupleSet_sortedLexicographically(swigCPtr, this), true);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy