9package com.google.ortools.constraintsolver;
18 private transient long swigCPtr;
27 return (obj ==
null) ? 0 : obj.swigCPtr;
34 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
36 obj.swigCMemOwn =
false;
42 @SuppressWarnings({
"deprecation",
"removal"})
51 mainJNI.delete_ModelCache(swigCPtr);
58 mainJNI.ModelCache_clear(swigCPtr,
this);
65 long cPtr = mainJNI.ModelCache_findVoidConstraint(swigCPtr,
this, type);
66 return (cPtr == 0) ? null :
new Constraint(cPtr,
false);
70 mainJNI.ModelCache_insertVoidConstraint(swigCPtr,
this,
Constraint.
getCPtr(ct), ct, type);
77 long cPtr = mainJNI.ModelCache_findVarConstantConstraint(swigCPtr,
this,
IntVar.
getCPtr(var), var, value, type);
78 return (cPtr == 0) ? null :
new Constraint(cPtr,
false);
89 long cPtr = mainJNI.ModelCache_findVarConstantConstantConstraint(swigCPtr,
this,
IntVar.
getCPtr(var), var, value1, value2, type);
90 return (cPtr == 0) ? null :
new Constraint(cPtr,
false);
94 mainJNI.ModelCache_insertVarConstantConstantConstraint(swigCPtr,
this,
Constraint.
getCPtr(ct), ct,
IntVar.
getCPtr(var), var, value1, value2, type);
101 long cPtr = mainJNI.ModelCache_findExprExprConstraint(swigCPtr,
this,
IntExpr.
getCPtr(expr1), expr1,
IntExpr.
getCPtr(expr2), expr2, type);
102 return (cPtr == 0) ? null :
new Constraint(cPtr,
false);
113 long cPtr = mainJNI.ModelCache_findExprExpression(swigCPtr,
this,
IntExpr.
getCPtr(expr), expr, type);
114 return (cPtr == 0) ? null :
new IntExpr(cPtr,
false);
125 long cPtr = mainJNI.ModelCache_findExprConstantExpression(swigCPtr,
this,
IntExpr.
getCPtr(expr), expr, value, type);
126 return (cPtr == 0) ? null :
new IntExpr(cPtr,
false);
130 mainJNI.ModelCache_insertExprConstantExpression(swigCPtr,
this,
IntExpr.
getCPtr(expression), expression,
IntExpr.
getCPtr(var), var, value, type);
138 return (cPtr == 0) ? null :
new IntExpr(cPtr,
false);
149 long cPtr = mainJNI.ModelCache_findExprExprConstantExpression(swigCPtr,
this,
IntExpr.
getCPtr(var1), var1,
IntExpr.
getCPtr(var2), var2, constant, type);
150 return (cPtr == 0) ? null :
new IntExpr(cPtr,
false);
161 long cPtr = mainJNI.ModelCache_findVarConstantConstantExpression(swigCPtr,
this,
IntVar.
getCPtr(var), var, value1, value2, type);
162 return (cPtr == 0) ? null :
new IntExpr(cPtr,
false);
166 mainJNI.ModelCache_insertVarConstantConstantExpression(swigCPtr,
this,
IntExpr.
getCPtr(expression), expression,
IntVar.
getCPtr(var), var, value1, value2, type);
173 long cPtr = mainJNI.ModelCache_findVarConstantArrayExpression(swigCPtr,
this,
IntVar.
getCPtr(var), var, values, type);
174 return (cPtr == 0) ? null :
new IntExpr(cPtr,
false);
178 mainJNI.ModelCache_insertVarConstantArrayExpression(swigCPtr,
this,
IntExpr.
getCPtr(expression), expression,
IntVar.
getCPtr(var), var, values, type);
185 long cPtr = mainJNI.ModelCache_findVarArrayExpression(swigCPtr,
this, vars, type);
186 return (cPtr == 0) ? null :
new IntExpr(cPtr,
false);
190 mainJNI.ModelCache_insertVarArrayExpression(swigCPtr,
this,
IntExpr.
getCPtr(expression), expression, vars, type);
197 long cPtr = mainJNI.ModelCache_findVarArrayConstantArrayExpression(swigCPtr,
this, vars, values, type);
198 return (cPtr == 0) ? null :
new IntExpr(cPtr,
false);
202 mainJNI.ModelCache_insertVarArrayConstantArrayExpression(swigCPtr,
this,
IntExpr.
getCPtr(expression), expression, var, values, type);
209 long cPtr = mainJNI.ModelCache_findVarArrayConstantExpression(swigCPtr,
this, vars, value, type);
210 return (cPtr == 0) ? null :
new IntExpr(cPtr,
false);
214 mainJNI.ModelCache_insertVarArrayConstantExpression(swigCPtr,
this,
IntExpr.
getCPtr(expression), expression, var, value, type);
218 long cPtr = mainJNI.ModelCache_solver(swigCPtr,
this);
219 return (cPtr == 0) ? null :
new Solver(cPtr,
false);
242 public final static int EXPR_EXPR_LESS = mainJNI.ModelCache_EXPR_EXPR_LESS_get();
248 public final static int EXPR_OPPOSITE = mainJNI.ModelCache_EXPR_OPPOSITE_get();
249 public final static int EXPR_ABS = mainJNI.ModelCache_EXPR_ABS_get();
250 public final static int EXPR_SQUARE = mainJNI.ModelCache_EXPR_SQUARE_get();
255 public final static int EXPR_EXPR_PROD = mainJNI.ModelCache_EXPR_EXPR_PROD_get();
256 public final static int EXPR_EXPR_DIV = mainJNI.ModelCache_EXPR_EXPR_DIV_get();
257 public final static int EXPR_EXPR_MAX = mainJNI.ModelCache_EXPR_EXPR_MAX_get();
258 public final static int EXPR_EXPR_MIN = mainJNI.ModelCache_EXPR_EXPR_MIN_get();
259 public final static int EXPR_EXPR_SUM = mainJNI.ModelCache_EXPR_EXPR_SUM_get();
296 public final static int VAR_ARRAY_MAX = mainJNI.ModelCache_VAR_ARRAY_MAX_get();
297 public final static int VAR_ARRAY_MIN = mainJNI.ModelCache_VAR_ARRAY_MIN_get();
298 public final static int VAR_ARRAY_SUM = mainJNI.ModelCache_VAR_ARRAY_SUM_get();