MPConstraint.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.0
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package com.google.ortools.linearsolver;
10 
11 import java.lang.reflect.*;
12 
13 public class MPConstraint {
14  private transient long swigCPtr;
15  protected transient boolean swigCMemOwn;
16 
17  protected MPConstraint(long cPtr, boolean cMemoryOwn) {
18  swigCMemOwn = cMemoryOwn;
19  swigCPtr = cPtr;
20  }
21 
22  protected static long getCPtr(MPConstraint obj) {
23  return (obj == null) ? 0 : obj.swigCPtr;
24  }
25 
26  @SuppressWarnings("deprecation")
27  protected void finalize() {
28  delete();
29  }
30 
31  public synchronized void delete() {
32  if (swigCPtr != 0) {
33  if (swigCMemOwn) {
34  swigCMemOwn = false;
36  }
37  swigCPtr = 0;
38  }
39  }
40 
41  public String name() {
43  }
44 
45  public void setCoefficient(MPVariable var, double coeff) {
46  main_research_linear_solverJNI.MPConstraint_setCoefficient(swigCPtr, this, MPVariable.getCPtr(var), var, coeff);
47  }
48 
49  public double getCoefficient(MPVariable var) {
50  return main_research_linear_solverJNI.MPConstraint_getCoefficient(swigCPtr, this, MPVariable.getCPtr(var), var);
51  }
52 
53  public double lb() {
54  return main_research_linear_solverJNI.MPConstraint_lb(swigCPtr, this);
55  }
56 
57  public double ub() {
58  return main_research_linear_solverJNI.MPConstraint_ub(swigCPtr, this);
59  }
60 
61  public void setLb(double lb) {
63  }
64 
65  public void setUb(double ub) {
67  }
68 
69  public void setBounds(double lb, double ub) {
71  }
72 
73  public boolean isLazy() {
75  }
76 
77  public void setIsLazy(boolean laziness) {
79  }
80 
81  public int index() {
83  }
84 
85  public double dualValue() {
87  }
88 
91  }
92 
93 }
static final native void MPConstraint_setCoefficient(long jarg1, MPConstraint jarg1_, long jarg2, MPVariable jarg2_, double jarg3)
static final native String MPConstraint_name(long jarg1, MPConstraint jarg1_)
MPConstraint(long cPtr, boolean cMemoryOwn)
static final native void MPConstraint_setIsLazy(long jarg1, MPConstraint jarg1_, boolean jarg2)
static BasisStatus swigToEnum(int swigValue)
Definition: MPSolver.java:338
static final native double MPConstraint_getCoefficient(long jarg1, MPConstraint jarg1_, long jarg2, MPVariable jarg2_)
static final native void MPConstraint_setUb(long jarg1, MPConstraint jarg1_, double jarg2)
static final native void MPConstraint_setBounds(long jarg1, MPConstraint jarg1_, double jarg2, double jarg3)
static final native int MPConstraint_index(long jarg1, MPConstraint jarg1_)
static final native void MPConstraint_setLb(long jarg1, MPConstraint jarg1_, double jarg2)
static final native boolean MPConstraint_isLazy(long jarg1, MPConstraint jarg1_)
static final native int MPConstraint_basisStatus(long jarg1, MPConstraint jarg1_)
static final native void delete_MPConstraint(long jarg1)
void setCoefficient(MPVariable var, double coeff)
static final native double MPConstraint_ub(long jarg1, MPConstraint jarg1_)
static final native double MPConstraint_lb(long jarg1, MPConstraint jarg1_)
static final native double MPConstraint_dualValue(long jarg1, MPConstraint jarg1_)