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 3.0.12
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 
13 using System;
14 using System.Runtime.InteropServices;
15 using System.Collections;
16 using System.Collections.Generic;
17 
18 public 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  ~IntExpr() {
30  Dispose();
31  }
32 
33  public override void Dispose() {
34  lock(this) {
35  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
36  if (swigCMemOwn) {
37  swigCMemOwn = false;
39  }
40  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
41  }
42  global::System.GC.SuppressFinalize(this);
43  base.Dispose();
44  }
45  }
46 
47  // Keep reference to delegate to avoid GC to collect them early
48  private List<VoidToVoid> closureCallbacks;
49  private VoidToVoid StoreVoidToVoid(VoidToVoid closure) {
50  if (closureCallbacks == null)
51  closureCallbacks = new List<VoidToVoid>();
52  closureCallbacks.Add(closure);
53  return closure;
54  }
55 
56  public virtual long Min() {
58  return ret;
59  }
60 
61  public virtual void SetMin(long m) {
64  }
65 
66  public virtual long Max() {
68  return ret;
69  }
70 
71  public virtual void SetMax(long m) {
74  }
75 
76  public virtual void Range(out long l, out long u) {
78  }
79 
80  public virtual void SetRange(long l, long u) {
83  }
84 
85  public virtual void SetValue(long v) {
88  }
89 
90  public virtual bool Bound() {
92  return ret;
93  }
94 
95  public virtual bool IsVar() {
97  return ret;
98  }
99 
100  public virtual IntVar Var() {
101  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_Var(swigCPtr);
102  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
103  return ret;
104  }
105 
106  public IntVar VarWithName(string name) {
107  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_VarWithName(swigCPtr, name);
108  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
110  return ret;
111  }
112 
113  public virtual void WhenRange(Demon d) {
115  }
116 
117  public void WhenRange( VoidToVoid closure) {
118  operations_research_constraint_solverPINVOKE.IntExpr_WhenRange__SWIG_1(swigCPtr, StoreVoidToVoid(closure) );
119  }
120 
121  public virtual void Accept(ModelVisitor visitor) {
123  }
124 
126  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_MapTo(swigCPtr, IntVarVector.getCPtr(vars));
127  Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
129  return ret;
130  }
131 
132  public IntExpr IndexOf( long[] vars) {
133  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IndexOf__SWIG_0(swigCPtr, vars.Length, vars );
134  IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
135  return ret;
136  }
137 
138  public IntExpr IndexOf(IntVarVector vars) {
139  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IndexOf__SWIG_1(swigCPtr, IntVarVector.getCPtr(vars));
140  IntExpr ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntExpr(cPtr, false);
142  return ret;
143  }
144 
145  public IntVar IsEqual(long value) {
146  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsEqual__SWIG_0(swigCPtr, value);
147  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
148  return ret;
149  }
150 
151  public IntVar IsDifferent(long value) {
152  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsDifferent__SWIG_0(swigCPtr, value);
153  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
154  return ret;
155  }
156 
157  public IntVar IsGreater(long value) {
158  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsGreater__SWIG_0(swigCPtr, value);
159  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
160  return ret;
161  }
162 
163  public IntVar IsGreaterOrEqual(long value) {
164  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsGreaterOrEqual__SWIG_0(swigCPtr, value);
165  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
166  return ret;
167  }
168 
169  public IntVar IsLess(long value) {
170  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsLess__SWIG_0(swigCPtr, value);
171  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
172  return ret;
173  }
174 
175  public IntVar IsLessOrEqual(long value) {
176  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsLessOrEqual__SWIG_0(swigCPtr, value);
177  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
178  return ret;
179  }
180 
181  public IntVar IsMember( long[] values) {
182  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsMember__SWIG_0(swigCPtr, values.Length, values );
183  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
184  return ret;
185  }
186 
187  public IntVar IsMember( int[] values) {
188  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsMember__SWIG_1(swigCPtr, values.Length, values );
189  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
190  return ret;
191  }
192 
193  public Constraint Member( long[] values) {
194  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_Member__SWIG_0(swigCPtr, values.Length, values );
195  Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
196  return ret;
197  }
198 
199  public Constraint Member( int[] values) {
200  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_Member__SWIG_1(swigCPtr, values.Length, values );
201  Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
202  return ret;
203  }
204 
205  public IntVar IsEqual(IntExpr other) {
206  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsEqual__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
207  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
208  return ret;
209  }
210 
211  public IntVar IsDifferent(IntExpr other) {
212  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsDifferent__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
213  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
214  return ret;
215  }
216 
217  public IntVar IsGreater(IntExpr other) {
218  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsGreater__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
219  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
220  return ret;
221  }
222 
224  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsGreaterOrEqual__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
225  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
226  return ret;
227  }
228 
229  public IntVar IsLess(IntExpr other) {
230  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsLess__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
231  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
232  return ret;
233  }
234 
235  public IntVar IsLessOrEqual(IntExpr other) {
236  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_IsLessOrEqual__SWIG_1(swigCPtr, IntExpr.getCPtr(other));
237  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
238  return ret;
239  }
240 
241  public OptimizeVar Minimize(int step) {
242  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_Minimize(swigCPtr, step);
243  OptimizeVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new OptimizeVar(cPtr, false);
244  return ret;
245  }
246 
247  public OptimizeVar Maximize(int step) {
248  global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntExpr_Maximize(swigCPtr, step);
249  OptimizeVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new OptimizeVar(cPtr, false);
250  return ret;
251  }
252 
253 }
254 
255 }
IntVar IsGreater(IntExpr other)
Definition: IntExpr.cs:217
virtual void Accept(ModelVisitor visitor)
Definition: IntExpr.cs:121
Constraint MapTo(IntVarVector vars)
Definition: IntExpr.cs:125
IntExpr IndexOf(IntVarVector vars)
Definition: IntExpr.cs:138
static global::System.IntPtr IntExpr_IsMember__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2)
static global::System.IntPtr IntExpr_IndexOf__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void IntExpr_Range(global::System.Runtime.InteropServices.HandleRef jarg1, out long jarg2, out long jarg3)
static global::System.IntPtr IntExpr_IsLess__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
Constraint Member(long[] values)
Definition: IntExpr.cs:193
static void IntExpr_SetMin(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
IntVar IsGreaterOrEqual(long value)
Definition: IntExpr.cs:163
IntVar IsLess(IntExpr other)
Definition: IntExpr.cs:229
static global::System.IntPtr IntExpr_Member__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2)
static global::System.IntPtr IntExpr_Maximize(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
Constraint Member(int[] values)
Definition: IntExpr.cs:199
static global::System.IntPtr IntExpr_SWIGUpcast(global::System.IntPtr jarg1)
static global::System.IntPtr IntExpr_IsDifferent__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
IntVar IsMember(long[] values)
Definition: IntExpr.cs:181
static global::System.IntPtr IntExpr_IsLess__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void IntExpr_Accept(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
virtual void Range(out long l, out long u)
Definition: IntExpr.cs:76
IntVar IsLessOrEqual(IntExpr other)
Definition: IntExpr.cs:235
virtual void WhenRange(Demon d)
Definition: IntExpr.cs:113
static global::System.IntPtr IntExpr_IndexOf__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static global::System.IntPtr IntExpr_Member__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static global::System.IntPtr IntExpr_VarWithName(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
static global::System.IntPtr IntExpr_IsGreater__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
IntVar IsDifferent(IntExpr other)
Definition: IntExpr.cs:211
static global::System.IntPtr IntExpr_Var(global::System.Runtime.InteropServices.HandleRef jarg1)
void WhenRange(VoidToVoid closure)
Definition: IntExpr.cs:117
static void IntExpr_SetMax(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void IntExpr_WhenRange__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, VoidToVoid jarg2)
static global::System.IntPtr IntExpr_IsLessOrEqual__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
virtual void SetValue(long v)
Definition: IntExpr.cs:85
IntVar IsGreaterOrEqual(IntExpr other)
Definition: IntExpr.cs:223
IntVar IsEqual(IntExpr other)
Definition: IntExpr.cs:205
static global::System.IntPtr IntExpr_IsMember__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static global::System.IntPtr IntExpr_Minimize(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
OptimizeVar Minimize(int step)
Definition: IntExpr.cs:241
static long IntExpr_Min(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntExpr_IsGreaterOrEqual__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr IntExpr_MapTo(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)
static global::System.IntPtr IntExpr_IsDifferent__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
OptimizeVar Maximize(int step)
Definition: IntExpr.cs:247
static void IntExpr_SetValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
virtual void SetRange(long l, long u)
Definition: IntExpr.cs:80
static bool IntExpr_Bound(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntExpr_IsEqual__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_IsLessOrEqual__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void IntExpr_WhenRange__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr IntExpr_IsEqual__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void IntExpr_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static bool IntExpr_IsVar(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntExpr_IsGreater__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void delete_IntExpr(global::System.Runtime.InteropServices.HandleRef jarg1)
static long IntExpr_Max(global::System.Runtime.InteropServices.HandleRef jarg1)