Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
BooleanVar.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (https://www.swig.org).
5// Version 4.2.1
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 BooleanVar : IntVar {
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21 internal BooleanVar(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.BooleanVar_SWIGUpcast(cPtr), cMemoryOwn) {
22 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23 }
24
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BooleanVar obj) {
26 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
27 }
28
29 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(BooleanVar obj) {
30 if (obj != null) {
31 if (!obj.swigCMemOwn)
32 throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
33 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
34 obj.swigCMemOwn = false;
35 obj.Dispose();
36 return ptr;
37 } else {
38 return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
39 }
40 }
41
42 protected override void Dispose(bool disposing) {
43 lock(this) {
44 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
45 if (swigCMemOwn) {
46 swigCMemOwn = false;
48 }
49 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
50 }
51 base.Dispose(disposing);
52 }
53 }
54
55 public static int kUnboundBooleanVarValue {
56 get {
58 return ret;
59 }
60 }
61
62 public override long Min() {
63 long ret = operations_research_constraint_solverPINVOKE.BooleanVar_Min(swigCPtr);
64 return ret;
65 }
66
67 public override void SetMin(long m) {
74 return ret;
75 }
76
77 public override void SetMax(long m) {
89 return ret;
90 }
91
92 public override long Value() {
94 return ret;
95 }
96
97 public override void RemoveValue(long v) {
105
106 public override void WhenBound(Demon d) {
109
110 public override void WhenRange(Demon d) {
113
114 public override void WhenDomain(Demon d) {
117
118 public override ulong Size() {
120 return ret;
121 }
122
123 public override bool Contains(long v) {
125 return ret;
126 }
127
128 public override string ToString() {
130 return ret;
131 }
132
133 public override int VarType() {
135 return ret;
136 }
137
138 public override IntVar IsEqual(long constant) {
139 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.BooleanVar_IsEqual(swigCPtr, constant);
140 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
141 return ret;
142 }
143
144 public override IntVar IsDifferent(long constant) {
145 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.BooleanVar_IsDifferent(swigCPtr, constant);
146 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
147 return ret;
148 }
149
150 public override IntVar IsGreaterOrEqual(long constant) {
151 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.BooleanVar_IsGreaterOrEqual(swigCPtr, constant);
152 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
153 return ret;
154 }
155
156 public override IntVar IsLessOrEqual(long constant) {
157 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.BooleanVar_IsLessOrEqual(swigCPtr, constant);
158 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
159 return ret;
160 }
161
162 public virtual void RestoreValue() {
165
166 public override string BaseName() {
168 return ret;
169 }
170
171 public int RawValue() {
173 return ret;
174 }
175
176}
177
178}
override void RemoveInterval(long l, long u)
override IntVar IsDifferent(long constant)
override void SetRange(long mi, long ma)
Definition BooleanVar.cs:84
override IntVar IsGreaterOrEqual(long constant)
override IntVar IsEqual(long constant)
override IntVar IsLessOrEqual(long constant)
static void BooleanVar_RemoveValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool BooleanVar_Bound(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool BooleanVar_Contains(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void delete_BooleanVar(global::System.Runtime.InteropServices.HandleRef jarg1)
static int BooleanVar_RawValue(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr BooleanVar_IsLessOrEqual(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static string BooleanVar_BaseName(global::System.Runtime.InteropServices.HandleRef jarg1)
static void BooleanVar_WhenBound(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static string BooleanVar_ToString(global::System.Runtime.InteropServices.HandleRef jarg1)
static void BooleanVar_RemoveInterval(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static ulong BooleanVar_Size(global::System.Runtime.InteropServices.HandleRef jarg1)
static void BooleanVar_WhenDomain(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void BooleanVar_SetRange(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)
static long BooleanVar_Value(global::System.Runtime.InteropServices.HandleRef jarg1)
static void BooleanVar_SetMax(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void BooleanVar_SetMin(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr BooleanVar_IsDifferent(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static global::System.IntPtr BooleanVar_IsEqual(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void BooleanVar_RestoreValue(global::System.Runtime.InteropServices.HandleRef jarg1)
static long BooleanVar_Max(global::System.Runtime.InteropServices.HandleRef jarg1)
static int BooleanVar_VarType(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr BooleanVar_IsGreaterOrEqual(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void BooleanVar_WhenRange(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)