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

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

The newest version!
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.10
 *
 * 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 IntVarLocalSearchHandler {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

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

  protected void finalize() {
    delete();
  }

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

  public void AddToAssignment(IntVar var, long value, long index, Assignment assignment) {
    operations_research_constraint_solverJNI.IntVarLocalSearchHandler_AddToAssignment(swigCPtr, this, IntVar.getCPtr(var), var, value, index, Assignment.getCPtr(assignment), assignment);
  }

  public boolean ValueFromAssignent(Assignment assignment, IntVar var, long index, SWIGTYPE_p_long_long value) {
    return operations_research_constraint_solverJNI.IntVarLocalSearchHandler_ValueFromAssignent(swigCPtr, this, Assignment.getCPtr(assignment), assignment, IntVar.getCPtr(var), var, index, SWIGTYPE_p_long_long.getCPtr(value));
  }

  public void OnRevertChanges(long index) {
    operations_research_constraint_solverJNI.IntVarLocalSearchHandler_OnRevertChanges(swigCPtr, this, index);
  }

  public void OnAddVars() {
    operations_research_constraint_solverJNI.IntVarLocalSearchHandler_OnAddVars(swigCPtr, this);
  }

  public IntVarLocalSearchHandler() {
    this(operations_research_constraint_solverJNI.new_IntVarLocalSearchHandler(), true);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy