DotNet Reference

.Net Reference

IntExpr.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (http://www.swig.org).
5// Version 4.0.2
6//
7// Do not make changes to this file unless you know what you are doing--modify
8// the SWIG interface file instead.
9//------------------------------------------------------------------------------
10
12
13using System;
14using System.Runtime.InteropServices;
15using System.Collections;
16using System.Collections.Generic;
17
18public partial class IntExpr : PropagationBaseObject {
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20
21 internal IntExpr(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.IntExpr_SWIGUpcast(cPtr), cMemoryOwn) {
22 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23 }
24
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(IntExpr obj) {
26 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
27 }
28
29 protected override void Dispose(bool disposing) {
30 lock(this) {
31 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
32 if (swigCMemOwn) {
33 swigCMemOwn = false;
35 }
36 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
37 }
38 base.Dispose(disposing);
39 }
40 }
41
42 // Keep reference to delegate to avoid GC to collect them early
43 private List<VoidToVoid> closureCallbacks;
44 private VoidToVoid StoreVoidToVoid(VoidToVoid closure) {
45 if (closureCallbacks == null)
46 closureCallbacks = new List<VoidToVoid>();
47 closureCallbacks.Add(closure);
48 return closure;
49 }
50
51 public virtual long Min() {
53 return ret;
54 }
55
56 public virtual void SetMin(long m) {
59 }
60
61 public virtual long Max() {
63 return ret;
64 }
65
66 public virtual void SetMax(long m) {
69 }
70
71 public virtual void Range(out int l, out int u) {
73 }
74
75 public virtual void SetRange(long l, long u) {
78 }
79
80 public virtual void SetValue(long v) {
83 }
84
85 public virtual bool Bound() {
87 return ret;
88 }
89
90 public virtual bool IsVar() {
92 return ret;
93 }
94
95 public virtual IntVar Var() {
96 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_Var(swigCPtr);
97 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
98 return ret;
99 }
100
101 public IntVar VarWithName(string name) {
102 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_VarWithName(swigCPtr, name);
103 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
105 return ret;
106 }
107
108 public virtual void WhenRange(Demon d) {
110 }
111
112 public void WhenRange( VoidToVoid closure) {
114 }
115
116 public virtual void Accept(ModelVisitor visitor) {
118 }
119
121 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_MapTo(swigCPtr, IntVarVector.getCPtr(vars));
122 Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
124 return ret;
125 }
126
127 public IntExpr IndexOf( long[] vars) {
128 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IndexOf__SWIG_0(swigCPtr, vars.Length, vars );
129 IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
130 return ret;
131 }
132
134 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IndexOf__SWIG_1(swigCPtr, IntVarVector.getCPtr(vars));
135 IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
137 return ret;
138 }
139
140 public IntVar IsEqual(long value) {
141 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsEqual__SWIG_0(swigCPtr, value);
142 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
143 return ret;
144 }
145
146 public IntVar IsDifferent(long value) {
147 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsDifferent__SWIG_0(swigCPtr, value);
148 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
149 return ret;
150 }
151
152 public IntVar IsGreater(long value) {
153 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsGreater__SWIG_0(swigCPtr, value);
154 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
155 return ret;
156 }
157
158 public IntVar IsGreaterOrEqual(long value) {
159 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsGreaterOrEqual__SWIG_0(swigCPtr, value);
160 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
161 return ret;
162 }
163
164 public IntVar IsLess(long value) {
165 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsLess__SWIG_0(swigCPtr, value);
166 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
167 return ret;
168 }
169
170 public IntVar IsLessOrEqual(long value) {
171 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsLessOrEqual__SWIG_0(swigCPtr, value);
172 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
173 return ret;
174 }
175
176 public IntVar IsMember( long[] values) {
177 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsMember__SWIG_0(swigCPtr, values.Length, values );
178 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
179 return ret;
180 }
181
182 public IntVar IsMember( int[] values) {
183 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsMember__SWIG_1(swigCPtr, values.Length, values );
184 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
185 return ret;
186 }
187
188 public Constraint Member( long[] values) {
189 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_Member__SWIG_0(swigCPtr, values.Length, values );
190 Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
191 return ret;
192 }
193
194 public Constraint Member( int[] values) {
195 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_Member__SWIG_1(swigCPtr, values.Length, values );
196 Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
197 return ret;
198 }
199
200 public IntVar IsEqual(IntExpr other) {
201 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsEqual__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
202 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
203 return ret;
204 }
205
206 public IntVar IsDifferent(IntExpr other) {
207 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsDifferent__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
208 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
209 return ret;
210 }
211
212 public IntVar IsGreater(IntExpr other) {
213 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsGreater__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
214 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
215 return ret;
216 }
217
219 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsGreaterOrEqual__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
220 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
221 return ret;
222 }
223
224 public IntVar IsLess(IntExpr other) {
225 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsLess__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
226 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
227 return ret;
228 }
229
231 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsLessOrEqual__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
232 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
233 return ret;
234 }
235
236 public OptimizeVar Minimize(long step) {
237 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_Minimize(swigCPtr, step);
238 OptimizeVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new OptimizeVar(cPtr, false);
239 return ret;
240 }
241
242 public OptimizeVar Maximize(long step) {
243 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_Maximize(swigCPtr, step);
244 OptimizeVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new OptimizeVar(cPtr, false);
245 return ret;
246 }
247
248}
249
250}
Constraint MapTo(IntVarVector vars)
Definition: IntExpr.cs:120
OptimizeVar Minimize(long step)
Definition: IntExpr.cs:236
IntVar IsGreater(IntExpr other)
Definition: IntExpr.cs:212
IntVar IsLessOrEqual(IntExpr other)
Definition: IntExpr.cs:230
Constraint Member(int[] values)
Definition: IntExpr.cs:194
virtual void Accept(ModelVisitor visitor)
Definition: IntExpr.cs:116
IntVar IsEqual(IntExpr other)
Definition: IntExpr.cs:200
Constraint Member(long[] values)
Definition: IntExpr.cs:188
IntVar IsLess(IntExpr other)
Definition: IntExpr.cs:224
override void Dispose(bool disposing)
Definition: IntExpr.cs:29
IntVar IsGreaterOrEqual(long value)
Definition: IntExpr.cs:158
void WhenRange(VoidToVoid closure)
Definition: IntExpr.cs:112
OptimizeVar Maximize(long step)
Definition: IntExpr.cs:242
virtual void SetRange(long l, long u)
Definition: IntExpr.cs:75
virtual void Range(out int l, out int u)
Definition: IntExpr.cs:71
IntExpr IndexOf(IntVarVector vars)
Definition: IntExpr.cs:133
virtual void WhenRange(Demon d)
Definition: IntExpr.cs:108
IntVar IsDifferent(IntExpr other)
Definition: IntExpr.cs:206
virtual void SetValue(long v)
Definition: IntExpr.cs:80
IntVar IsGreaterOrEqual(IntExpr other)
Definition: IntExpr.cs:218
IntVar IsMember(long[] values)
Definition: IntExpr.cs:176
static bool IntExpr_Bound(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntExpr_VarWithName(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
static bool IntExpr_IsVar(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntExpr_Member__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2)
static global::System.IntPtr IntExpr_IsLess__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_Minimize(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_IsDifferent__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr IntExpr_IndexOf__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static long IntExpr_Max(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntExpr_Maximize(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_IsGreaterOrEqual__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static long IntExpr_Min(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntExpr_IsEqual__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr IntExpr_IndexOf__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static void IntExpr_SetValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_IsDifferent__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_Var(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntExpr_IsLessOrEqual__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_IsGreater__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void IntExpr_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static void IntExpr_Range(global::System.Runtime.InteropServices.HandleRef jarg1, out int jarg2, out int jarg3)
static void IntExpr_WhenRange__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void IntExpr_WhenRange__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, VoidToVoid jarg2)
static global::System.IntPtr IntExpr_IsEqual__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_IsMember__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static global::System.IntPtr IntExpr_MapTo(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr IntExpr_IsLess__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void IntExpr_SetMin(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_Member__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static void IntExpr_Accept(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr IntExpr_IsLessOrEqual__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void delete_IntExpr(global::System.Runtime.InteropServices.HandleRef jarg1)
static void IntExpr_SetMax(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_IsMember__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2)
static global::System.IntPtr IntExpr_IsGreater__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr IntExpr_IsGreaterOrEqual__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)