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

com.google.ortools.constraintsolver.IntVarLocalSearchOperatorTemplate 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 IntVarLocalSearchOperatorTemplate extends LocalSearchOperator {
  private transient long swigCPtr;

  protected IntVarLocalSearchOperatorTemplate(long cPtr, boolean cMemoryOwn) {
    super(operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected static long getCPtr(IntVarLocalSearchOperatorTemplate 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_IntVarLocalSearchOperatorTemplate(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public void start(Assignment assignment) {
    operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_start(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
  }

  public boolean isIncremental() {
    return operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_isIncremental(swigCPtr, this);
  }

  public int size() {
    return operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_size(swigCPtr, this);
  }

  public long value(long index) {
    return operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_value(swigCPtr, this, index);
  }

  public IntVar var(long index) {
    long cPtr = operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_var(swigCPtr, this, index);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public boolean SkipUnchanged(int index) {
    return operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_SkipUnchanged(swigCPtr, this, index);
  }

  public long oldValue(long index) {
    return operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_oldValue(swigCPtr, this, index);
  }

  public void setValue(long index, long value) {
    operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_setValue(swigCPtr, this, index, value);
  }

  public boolean activated(long index) {
    return operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_activated(swigCPtr, this, index);
  }

  public void activate(long index) {
    operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_activate(swigCPtr, this, index);
  }

  public void deactivate(long index) {
    operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_deactivate(swigCPtr, this, index);
  }

  public boolean ApplyChanges(Assignment delta, Assignment deltadelta) {
    return operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_ApplyChanges(swigCPtr, this, Assignment.getCPtr(delta), delta, Assignment.getCPtr(deltadelta), deltadelta);
  }

  public void RevertChanges(boolean incremental) {
    operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_RevertChanges(swigCPtr, this, incremental);
  }

  public void addVars(IntVar[] vars) {
    operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_addVars(swigCPtr, this, vars);
  }

  public void onStart() {
    operations_research_constraint_solverJNI.IntVarLocalSearchOperatorTemplate_onStart(swigCPtr, this);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy