com.google.ortools.linearsolver.MPObjective 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 MPObjective {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected MPObjective(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(MPObjective 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_MPObjective(swigCPtr);
}
swigCPtr = 0;
}
}
public void clear() {
operations_research_linear_solverJNI.MPObjective_clear(swigCPtr, this);
}
public void setCoefficient(MPVariable var, double coeff) {
operations_research_linear_solverJNI.MPObjective_setCoefficient(swigCPtr, this, MPVariable.getCPtr(var), var, coeff);
}
public double getCoefficient(MPVariable var) {
return operations_research_linear_solverJNI.MPObjective_getCoefficient(swigCPtr, this, MPVariable.getCPtr(var), var);
}
public void setOffset(double value) {
operations_research_linear_solverJNI.MPObjective_setOffset(swigCPtr, this, value);
}
public double offset() {
return operations_research_linear_solverJNI.MPObjective_offset(swigCPtr, this);
}
public void addOffset(double value) {
operations_research_linear_solverJNI.MPObjective_addOffset(swigCPtr, this, value);
}
public void setOptimizationDirection(boolean maximize) {
operations_research_linear_solverJNI.MPObjective_setOptimizationDirection(swigCPtr, this, maximize);
}
public void setMinimization() {
operations_research_linear_solverJNI.MPObjective_setMinimization(swigCPtr, this);
}
public void setMaximization() {
operations_research_linear_solverJNI.MPObjective_setMaximization(swigCPtr, this);
}
public boolean maximization() {
return operations_research_linear_solverJNI.MPObjective_maximization(swigCPtr, this);
}
public boolean minimization() {
return operations_research_linear_solverJNI.MPObjective_minimization(swigCPtr, this);
}
public double value() {
return operations_research_linear_solverJNI.MPObjective_value(swigCPtr, this);
}
public double bestBound() {
return operations_research_linear_solverJNI.MPObjective_bestBound(swigCPtr, this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy