com.google.ortools.constraintsolver.Pack Maven / Gradle / Ivy
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* 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;
// Used to wrap IndexEvaluator1
// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongUnaryOperator.html
import java.util.function.LongUnaryOperator;
// Used to wrap IndexEvaluator2
// see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongBinaryOperator.html
import java.util.function.LongBinaryOperator;
public class Pack extends Constraint {
private transient long swigCPtr;
protected Pack(long cPtr, boolean cMemoryOwn) {
super(mainJNI.Pack_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(Pack obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
mainJNI.delete_Pack(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public Pack(Solver s, IntVar[] vars, int number_of_bins) {
this(mainJNI.new_Pack(Solver.getCPtr(s), s, vars, number_of_bins), true);
}
public void addWeightedSumLessOrEqualConstantDimension(long[] weights, long[] bounds) {
mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_0(swigCPtr, this, weights, bounds);
}
public void addWeightedSumLessOrEqualConstantDimension(LongUnaryOperator weights, long[] bounds) {
mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_1(swigCPtr, this, weights, bounds);
}
public void addWeightedSumLessOrEqualConstantDimension(LongBinaryOperator weights, long[] bounds) {
mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_2(swigCPtr, this, weights, bounds);
}
public void addWeightedSumEqualVarDimension(long[] weights, IntVar[] loads) {
mainJNI.Pack_addWeightedSumEqualVarDimension__SWIG_0(swigCPtr, this, weights, loads);
}
public void addWeightedSumEqualVarDimension(LongBinaryOperator weights, IntVar[] loads) {
mainJNI.Pack_addWeightedSumEqualVarDimension__SWIG_1(swigCPtr, this, weights, loads);
}
public void addSumVariableWeightsLessOrEqualConstantDimension(IntVar[] usage, long[] capacity) {
mainJNI.Pack_addSumVariableWeightsLessOrEqualConstantDimension(swigCPtr, this, usage, capacity);
}
public void addWeightedSumOfAssignedDimension(long[] weights, IntVar cost_var) {
mainJNI.Pack_addWeightedSumOfAssignedDimension(swigCPtr, this, weights, IntVar.getCPtr(cost_var), cost_var);
}
public void addCountUsedBinDimension(IntVar count_var) {
mainJNI.Pack_addCountUsedBinDimension(swigCPtr, this, IntVar.getCPtr(count_var), count_var);
}
public void addCountAssignedItemsDimension(IntVar count_var) {
mainJNI.Pack_addCountAssignedItemsDimension(swigCPtr, this, IntVar.getCPtr(count_var), count_var);
}
public void post() {
mainJNI.Pack_post(swigCPtr, this);
}
public void clearAll() {
mainJNI.Pack_clearAll(swigCPtr, this);
}
public void propagateDelayed() {
mainJNI.Pack_propagateDelayed(swigCPtr, this);
}
public void initialPropagate() {
mainJNI.Pack_initialPropagate(swigCPtr, this);
}
public void propagate() {
mainJNI.Pack_propagate(swigCPtr, this);
}
public void oneDomain(int var_index) {
mainJNI.Pack_oneDomain(swigCPtr, this, var_index);
}
public String toString() {
return mainJNI.Pack_toString(swigCPtr, this);
}
public boolean isUndecided(int var_index, int bin_index) {
return mainJNI.Pack_isUndecided(swigCPtr, this, var_index, bin_index);
}
public void setImpossible(int var_index, int bin_index) {
mainJNI.Pack_setImpossible(swigCPtr, this, var_index, bin_index);
}
public void assign(int var_index, int bin_index) {
mainJNI.Pack_assign(swigCPtr, this, var_index, bin_index);
}
public boolean isAssignedStatusKnown(int var_index) {
return mainJNI.Pack_isAssignedStatusKnown(swigCPtr, this, var_index);
}
public boolean isPossible(int var_index, int bin_index) {
return mainJNI.Pack_isPossible(swigCPtr, this, var_index, bin_index);
}
public IntVar assignVar(int var_index, int bin_index) {
long cPtr = mainJNI.Pack_assignVar(swigCPtr, this, var_index, bin_index);
return (cPtr == 0) ? null : new IntVar(cPtr, false);
}
public void setAssigned(int var_index) {
mainJNI.Pack_setAssigned(swigCPtr, this, var_index);
}
public void setUnassigned(int var_index) {
mainJNI.Pack_setUnassigned(swigCPtr, this, var_index);
}
public void removeAllPossibleFromBin(int bin_index) {
mainJNI.Pack_removeAllPossibleFromBin(swigCPtr, this, bin_index);
}
public void assignAllPossibleToBin(int bin_index) {
mainJNI.Pack_assignAllPossibleToBin(swigCPtr, this, bin_index);
}
public void assignFirstPossibleToBin(int bin_index) {
mainJNI.Pack_assignFirstPossibleToBin(swigCPtr, this, bin_index);
}
public void assignAllRemainingItems() {
mainJNI.Pack_assignAllRemainingItems(swigCPtr, this);
}
public void unassignAllRemainingItems() {
mainJNI.Pack_unassignAllRemainingItems(swigCPtr, this);
}
public void accept(ModelVisitor visitor) {
mainJNI.Pack_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy