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

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

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

  protected static long getCPtr(NoGood 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_NoGood(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void AddIntegerVariableEqualValueTerm(IntVar var, long value) {
    operations_research_constraint_solverJNI.NoGood_AddIntegerVariableEqualValueTerm(swigCPtr, this, IntVar.getCPtr(var), var, value);
  }

  public void AddIntegerVariableNotEqualValueTerm(IntVar var, long value) {
    operations_research_constraint_solverJNI.NoGood_AddIntegerVariableNotEqualValueTerm(swigCPtr, this, IntVar.getCPtr(var), var, value);
  }

  public boolean Apply(Solver solver) {
    return operations_research_constraint_solverJNI.NoGood_Apply(swigCPtr, this, Solver.getCPtr(solver), solver);
  }

  public String toString() {
    return operations_research_constraint_solverJNI.NoGood_toString(swigCPtr, this);
  }

  public NoGood() {
    this(operations_research_constraint_solverJNI.new_NoGood(), true);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy