DotNet Reference

.Net Reference

IntVar.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 IntVar : IntExpr {
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20
21 internal IntVar(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.IntVar_SWIGUpcast(cPtr), cMemoryOwn) {
22 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23 }
24
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(IntVar 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 override bool IsVar() {
53 return ret;
54 }
55
56 public override IntVar Var() {
57 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntVar_Var(swigCPtr);
58 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
59 return ret;
60 }
61
62 public virtual long Value() {
64 return ret;
65 }
66
67 public virtual void RemoveValue(long v) {
70 }
71
72 public virtual void RemoveInterval(long l, long u) {
74 }
75
76 public virtual void RemoveValues( long[] values) {
79 }
80
81 public virtual void SetValues( long[] values) {
82 operations_research_constraint_solverPINVOKE.IntVar_SetValues(swigCPtr, values.Length, values );
83 }
84
85 public virtual void WhenBound(Demon d) {
87 }
88
89 public void WhenBound( VoidToVoid closure) {
91 }
92
93 public virtual void WhenDomain(Demon d) {
95 }
96
97 public void WhenDomain( VoidToVoid closure) {
99 }
100
101 public virtual ulong Size() {
103 return ret;
104 }
105
106 public virtual bool Contains(long v) {
108 return ret;
109 }
110
111 public virtual long OldMin() {
113 return ret;
114 }
115
116 public virtual long OldMax() {
118 return ret;
119 }
120
121 public virtual int VarType() {
123 return ret;
124 }
125
126 public override void Accept(ModelVisitor visitor) {
128 }
129
130 public virtual new IntVar IsEqual(long constant) {
131 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntVar_IsEqual(swigCPtr, constant);
132 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
133 return ret;
134 }
135
136 public virtual new IntVar IsDifferent(long constant) {
137 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntVar_IsDifferent(swigCPtr, constant);
138 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
139 return ret;
140 }
141
142 public virtual new IntVar IsGreaterOrEqual(long constant) {
143 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntVar_IsGreaterOrEqual(swigCPtr, constant);
144 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
145 return ret;
146 }
147
148 public virtual new IntVar IsLessOrEqual(long constant) {
149 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntVar_IsLessOrEqual(swigCPtr, constant);
150 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
151 return ret;
152 }
153
154 public int Index() {
156 return ret;
157 }
158
160 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntVar_GetDomain(swigCPtr);
161 IntVarIterator ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVarIterator(cPtr, false);
162 return ret;
163 }
164
166 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.IntVar_GetHoles(swigCPtr);
167 IntVarIterator ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVarIterator(cPtr, false);
168 return ret;
169 }
170
171}
172
173}
virtual void RemoveValue(long v)
Definition: IntVar.cs:67
virtual new IntVar IsDifferent(long constant)
Definition: IntVar.cs:136
void WhenBound(VoidToVoid closure)
Definition: IntVar.cs:89
virtual void RemoveInterval(long l, long u)
Definition: IntVar.cs:72
virtual void RemoveValues(long[] values)
Definition: IntVar.cs:76
virtual void WhenBound(Demon d)
Definition: IntVar.cs:85
virtual void SetValues(long[] values)
Definition: IntVar.cs:81
virtual new IntVar IsGreaterOrEqual(long constant)
Definition: IntVar.cs:142
override void Dispose(bool disposing)
Definition: IntVar.cs:29
void WhenDomain(VoidToVoid closure)
Definition: IntVar.cs:97
virtual new IntVar IsLessOrEqual(long constant)
Definition: IntVar.cs:148
virtual new IntVar IsEqual(long constant)
Definition: IntVar.cs:130
override void Accept(ModelVisitor visitor)
Definition: IntVar.cs:126
virtual bool Contains(long v)
Definition: IntVar.cs:106
virtual void WhenDomain(Demon d)
Definition: IntVar.cs:93
static bool IntVar_Contains(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static long IntVar_OldMin(global::System.Runtime.InteropServices.HandleRef jarg1)
static ulong IntVar_Size(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntVar_IsEqual(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void IntVar_RemoveInterval(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static void IntVar_SetValues(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static int IntVar_Index(global::System.Runtime.InteropServices.HandleRef jarg1)
static void IntVar_Accept(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void IntVar_WhenDomain__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void IntVar_RemoveValues(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2)
static global::System.IntPtr IntVar_IsDifferent(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntVar_SWIGUpcast(global::System.IntPtr jarg1)
static global::System.IntPtr IntVar_GetDomain(global::System.Runtime.InteropServices.HandleRef jarg1)
static void IntVar_WhenDomain__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, VoidToVoid jarg2)
static void IntVar_WhenBound__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, VoidToVoid jarg2)
static void delete_IntVar(global::System.Runtime.InteropServices.HandleRef jarg1)
static int IntVar_VarType(global::System.Runtime.InteropServices.HandleRef jarg1)
static long IntVar_OldMax(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntVar_IsGreaterOrEqual(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void IntVar_WhenBound__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr IntVar_GetHoles(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr IntVar_IsLessOrEqual(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr IntVar_Var(global::System.Runtime.InteropServices.HandleRef jarg1)
static long IntVar_Value(global::System.Runtime.InteropServices.HandleRef jarg1)
static void IntVar_RemoveValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool IntVar_IsVar(global::System.Runtime.InteropServices.HandleRef jarg1)