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

com.google.ortools.constraintsolver.SequenceVarLocalSearchHandler 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 SequenceVarLocalSearchHandler {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

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

  protected void finalize() {
    delete();
  }

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

  public SequenceVarLocalSearchHandler() {
    this(mainJNI.new_SequenceVarLocalSearchHandler__SWIG_0(), true);
  }

  public SequenceVarLocalSearchHandler(SequenceVarLocalSearchHandler other) {
    this(mainJNI.new_SequenceVarLocalSearchHandler__SWIG_1(SequenceVarLocalSearchHandler.getCPtr(other), other), true);
  }

  public SequenceVarLocalSearchHandler(SequenceVarLocalSearchOperator op) {
    this(mainJNI.new_SequenceVarLocalSearchHandler__SWIG_2(SequenceVarLocalSearchOperator.getCPtr(op), op), true);
  }

  public void addToAssignment(SequenceVar var, int[] value, boolean active, SWIGTYPE_p_std__vectorT_int_t assignment_indices, long index, Assignment assignment) {
    mainJNI.SequenceVarLocalSearchHandler_addToAssignment(swigCPtr, this, SequenceVar.getCPtr(var), var, value, active, SWIGTYPE_p_std__vectorT_int_t.getCPtr(assignment_indices), index, Assignment.getCPtr(assignment), assignment);
  }

  public boolean ValueFromAssignment(Assignment assignment, SequenceVar var, long index, SWIGTYPE_p_std__vectorT_int_t value) {
    return mainJNI.SequenceVarLocalSearchHandler_ValueFromAssignment(swigCPtr, this, Assignment.getCPtr(assignment), assignment, SequenceVar.getCPtr(var), var, index, SWIGTYPE_p_std__vectorT_int_t.getCPtr(value));
  }

  public void onRevertChanges(long index, int[] value) {
    mainJNI.SequenceVarLocalSearchHandler_onRevertChanges(swigCPtr, this, index, value);
  }

  public void onAddVars() {
    mainJNI.SequenceVarLocalSearchHandler_onAddVars(swigCPtr, this);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy