com.google.ortools.linearsolver.MPConstraint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-or-tools Show documentation
Show all versions of google-or-tools Show documentation
A project to publish Google OR-Tools as a dependable dependency in Maven.
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.linearsolver;
import java.lang.reflect.*;
public class MPConstraint {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected MPConstraint(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(MPConstraint obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
operations_research_linear_solverJNI.delete_MPConstraint(swigCPtr);
}
swigCPtr = 0;
}
}
public String name() {
return operations_research_linear_solverJNI.MPConstraint_name(swigCPtr, this);
}
public void setCoefficient(MPVariable var, double coeff) {
operations_research_linear_solverJNI.MPConstraint_setCoefficient(swigCPtr, this, MPVariable.getCPtr(var), var, coeff);
}
public double getCoefficient(MPVariable var) {
return operations_research_linear_solverJNI.MPConstraint_getCoefficient(swigCPtr, this, MPVariable.getCPtr(var), var);
}
public double lb() {
return operations_research_linear_solverJNI.MPConstraint_lb(swigCPtr, this);
}
public double ub() {
return operations_research_linear_solverJNI.MPConstraint_ub(swigCPtr, this);
}
public void setLb(double lb) {
operations_research_linear_solverJNI.MPConstraint_setLb(swigCPtr, this, lb);
}
public void setUb(double ub) {
operations_research_linear_solverJNI.MPConstraint_setUb(swigCPtr, this, ub);
}
public void setBounds(double lb, double ub) {
operations_research_linear_solverJNI.MPConstraint_setBounds(swigCPtr, this, lb, ub);
}
public boolean isLazy() {
return operations_research_linear_solverJNI.MPConstraint_isLazy(swigCPtr, this);
}
public void setIsLazy(boolean laziness) {
operations_research_linear_solverJNI.MPConstraint_setIsLazy(swigCPtr, this, laziness);
}
public int index() {
return operations_research_linear_solverJNI.MPConstraint_index(swigCPtr, this);
}
public double dualValue() {
return operations_research_linear_solverJNI.MPConstraint_dualValue(swigCPtr, this);
}
public MPSolver.BasisStatus basisStatus() {
return MPSolver.BasisStatus.swigToEnum(operations_research_linear_solverJNI.MPConstraint_basisStatus(swigCPtr, this));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy