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 
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  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() {
97  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
98  return ret;
99  }
100 
101  public IntVar VarWithName(string 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) {
113  operations_research_constraint_solverPINVOKE.IntExpr_WhenRange__SWIG_1(swigCPtr, StoreVoidToVoid(closure) );
114  }
115 
116  public virtual void Accept(ModelVisitor visitor) {
118  }
119 
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 
133  public IntExpr IndexOf(IntVarVector 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) {
142  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
143  return ret;
144  }
145 
146  public IntVar IsDifferent(long 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) {
154  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
155  return ret;
156  }
157 
158  public IntVar IsGreaterOrEqual(long 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) {
166  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
167  return ret;
168  }
169 
170  public IntVar IsLessOrEqual(long 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) {
202  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
203  return ret;
204  }
205 
206  public IntVar IsDifferent(IntExpr 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) {
214  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
215  return ret;
216  }
217 
220  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
221  return ret;
222  }
223 
224  public IntVar IsLess(IntExpr other) {
226  IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
227  return ret;
228  }
229 
230  public IntVar IsLessOrEqual(IntExpr 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) {
238  OptimizeVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new OptimizeVar(cPtr, false);
239  return ret;
240  }
241 
242  public OptimizeVar Maximize(long step) {
244  OptimizeVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new OptimizeVar(cPtr, false);
245  return ret;
246  }
247 
248 }
249 
250 }
OptimizeVar Maximize(long step)
Definition: IntExpr.cs:242
static global::System.IntPtr IntExpr_IsGreaterOrEqual__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_Member__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2)
static global::System.IntPtr IntExpr_IsGreaterOrEqual__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
Definition: IntVar.cs:18
virtual void SetRange(long l, long u)
Definition: IntExpr.cs:75
void WhenRange(VoidToVoid closure)
Definition: IntExpr.cs:112
static void delete_IntExpr(global::System.Runtime.InteropServices.HandleRef jarg1)
IntExpr IndexOf(long[] vars)
Definition: IntExpr.cs:127
virtual void Accept(ModelVisitor visitor)
Definition: IntExpr.cs:116
virtual void Range(out int l, out int u)
Definition: IntExpr.cs:71
static global::System.IntPtr IntExpr_Member__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
virtual void SetMin(long m)
Definition: IntExpr.cs:56
IntVar IsGreater(long value)
Definition: IntExpr.cs:152
Definition: Demon.cs:18
IntVar IsLessOrEqual(IntExpr other)
Definition: IntExpr.cs:230
Constraint MapTo(IntVarVector vars)
Definition: IntExpr.cs:120
IntVar IsDifferent(IntExpr other)
Definition: IntExpr.cs:206
static global::System.IntPtr IntExpr_IsLess__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
delegate void VoidToVoid()
IntVar IsEqual(long value)
Definition: IntExpr.cs:140
static bool Pending
static global::System.IntPtr IntExpr_Var(global::System.Runtime.InteropServices.HandleRef jarg1)
static long IntExpr_Min(global::System.Runtime.InteropServices.HandleRef jarg1)
IntVar IsGreaterOrEqual(IntExpr other)
Definition: IntExpr.cs:218
static void IntExpr_SetValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_Maximize(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
IntVar IsEqual(IntExpr other)
Definition: IntExpr.cs:200
static global::System.IntPtr IntExpr_VarWithName(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2)
override void Dispose(bool disposing)
Definition: IntExpr.cs:29
static global::System.IntPtr IntExpr_IsGreater__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
Definition: ModelVisitor.cs:18
static global::System.IntPtr IntExpr_IsGreater__SWIG_1(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)
using System
Definition: Program.cs:14
IntVar IsGreaterOrEqual(long value)
Definition: IntExpr.cs:158
IntVar IsMember(long[] values)
Definition: IntExpr.cs:176
IntExpr IndexOf(IntVarVector vars)
Definition: IntExpr.cs:133
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_IsLessOrEqual__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr IntExpr_IsMember__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static void IntExpr_SetMax(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool IntExpr_IsVar(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_IsDifferent__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntExpr_IndexOf__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
virtual void WhenRange(Demon d)
Definition: IntExpr.cs:108
virtual void SetMax(long m)
Definition: IntExpr.cs:66
OptimizeVar Minimize(long step)
Definition: IntExpr.cs:236
bool swigCMemOwn
Definition: BaseObject.cs:20
static global::System.IntPtr IntExpr_IsMember__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2)
static global::System.IntPtr IntExpr_MapTo(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void IntExpr_Accept(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
IntVar IsLess(IntExpr other)
Definition: IntExpr.cs:224
IntVar IsLessOrEqual(long value)
Definition: IntExpr.cs:170
virtual long Min()
Definition: IntExpr.cs:51
static global::System.IntPtr IntExpr_IsLess__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
virtual void SetValue(long v)
Definition: IntExpr.cs:80
IntVar IsMember(int[] values)
Definition: IntExpr.cs:182
IntVar VarWithName(string name)
Definition: IntExpr.cs:101
static global::System.IntPtr IntExpr_IndexOf__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static void IntExpr_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
IntVar IsLess(long value)
Definition: IntExpr.cs:164
static bool IntExpr_Bound(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual bool IsVar()
Definition: IntExpr.cs:90
static void IntExpr_WhenRange__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void IntExpr_Range(global::System.Runtime.InteropServices.HandleRef jarg1, out int jarg2, out int jarg3)
IntVar IsDifferent(long value)
Definition: IntExpr.cs:146
IntVar IsGreater(IntExpr other)
Definition: IntExpr.cs:212
virtual long Max()
Definition: IntExpr.cs:61
Constraint Member(int[] values)
Definition: IntExpr.cs:194
static long IntExpr_Max(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.Exception Retrieve()
static void IntExpr_SetMin(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
virtual IntVar Var()
Definition: IntExpr.cs:95
virtual bool Bound()
Definition: IntExpr.cs:85
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_Minimize(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
Definition: OptimizeVar.cs:18
static global::System.IntPtr IntExpr_IsLessOrEqual__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
Constraint Member(long[] values)
Definition: IntExpr.cs:188