DotNet Reference

.Net Reference

Domain.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 
17 public class Domain : global::System.IDisposable {
18  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
19  protected bool swigCMemOwn;
20 
21  internal Domain(global::System.IntPtr cPtr, bool cMemoryOwn) {
22  swigCMemOwn = cMemoryOwn;
23  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
24  }
25 
26  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Domain obj) {
27  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
28  }
29 
30  ~Domain() {
31  Dispose(false);
32  }
33 
34  public void Dispose() {
35  Dispose(true);
36  global::System.GC.SuppressFinalize(this);
37  }
38 
39  protected virtual void Dispose(bool disposing) {
40  lock(this) {
41  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
42  if (swigCMemOwn) {
43  swigCMemOwn = false;
45  }
46  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
47  }
48  }
49  }
50 
51  public Domain() : this(operations_research_utilPINVOKE.new_Domain__SWIG_0(), true) {
52  }
53 
54  public Domain(long value) : this(operations_research_utilPINVOKE.new_Domain__SWIG_1(value), true) {
55  }
56 
57  public Domain(long left, long right) : this(operations_research_utilPINVOKE.new_Domain__SWIG_2(left, right), true) {
58  }
59 
60  public static Domain AllValues() {
62  return ret;
63  }
64 
65  public static Domain FromValues( long[] values) {
66  Domain ret = new Domain(operations_research_utilPINVOKE.Domain_FromValues( values.Length, values ), true);
67  return ret;
68  }
69 
70  public static Domain FromIntervals( long[][] intervals) {
72  intervals.GetLength(0),
73  NestedArrayHelper.GetArraySecondSize(intervals),
74  NestedArrayHelper.GetFlatArray(intervals)
75 ), true);
76  return ret;
77  }
78 
79  public static Domain FromFlatIntervals( long[] flat_intervals) {
80  Domain ret = new Domain(operations_research_utilPINVOKE.Domain_FromFlatIntervals( flat_intervals.Length, flat_intervals ), true);
81  return ret;
82  }
83 
84  public long[] FlattenedIntervals() {
86  Int64Vector tmpVector = null;
87  if (cPtr != global::System.IntPtr.Zero) {
88  tmpVector = new Int64Vector(cPtr, true);
89  long[] outArray = new long[tmpVector.Count];
90  tmpVector.CopyTo(outArray);
91  return outArray;
92  }
93  return null;
94 }
95 
96  public bool IsEmpty() {
98  return ret;
99  }
100 
101  public long Size() {
102  long ret = operations_research_utilPINVOKE.Domain_Size(swigCPtr);
103  return ret;
104  }
105 
106  public long Min() {
107  long ret = operations_research_utilPINVOKE.Domain_Min(swigCPtr);
108  return ret;
109  }
110 
111  public long Max() {
112  long ret = operations_research_utilPINVOKE.Domain_Max(swigCPtr);
113  return ret;
114  }
115 
116  public bool Contains(long value) {
117  bool ret = operations_research_utilPINVOKE.Domain_Contains(swigCPtr, value);
118  return ret;
119  }
120 
121  public Domain Complement() {
123  return ret;
124  }
125 
126  public Domain Negation() {
128  return ret;
129  }
130 
131  public Domain IntersectionWith(Domain domain) {
132  Domain ret = new Domain(operations_research_utilPINVOKE.Domain_IntersectionWith(swigCPtr, Domain.getCPtr(domain)), true);
134  return ret;
135  }
136 
137  public Domain UnionWith(Domain domain) {
138  Domain ret = new Domain(operations_research_utilPINVOKE.Domain_UnionWith(swigCPtr, Domain.getCPtr(domain)), true);
140  return ret;
141  }
142 
143  public Domain AdditionWith(Domain domain) {
144  Domain ret = new Domain(operations_research_utilPINVOKE.Domain_AdditionWith(swigCPtr, Domain.getCPtr(domain)), true);
146  return ret;
147  }
148 
149  public string ToString() {
150  string ret = operations_research_utilPINVOKE.Domain_ToString(swigCPtr);
151  return ret;
152  }
153 
154 }
155 
156 }
Domain Negation()
Definition: Domain.cs:126
static global::System.IntPtr Domain_FromValues(int length1, long[] jarg1)
Domain Complement()
Definition: Domain.cs:121
Definition: Domain.cs:17
Domain IntersectionWith(Domain domain)
Definition: Domain.cs:131
static bool Domain_Contains(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static Domain FromFlatIntervals(long[] flat_intervals)
Definition: Domain.cs:79
void Dispose()
Definition: Domain.cs:34
static Domain FromValues(long[] values)
Definition: Domain.cs:65
static long Domain_Min(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_Domain(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr Domain_Complement(global::System.Runtime.InteropServices.HandleRef jarg1)
bool Contains(long value)
Definition: Domain.cs:116
static Domain AllValues()
Definition: Domain.cs:60
Domain AdditionWith(Domain domain)
Definition: Domain.cs:143
static Domain FromIntervals(long[][] intervals)
Definition: Domain.cs:70
static global::System.IntPtr Domain_IntersectionWith(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static long Domain_Max(global::System.Runtime.InteropServices.HandleRef jarg1)
using System
Definition: Program.cs:14
static string Domain_ToString(global::System.Runtime.InteropServices.HandleRef jarg1)
Domain()
Definition: Domain.cs:51
static bool Pending
static global::System.IntPtr Domain_Negation(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr Domain_AllValues()
bool IsEmpty()
Definition: Domain.cs:96
long[] FlattenedIntervals()
Definition: Domain.cs:84
static global::System.Exception Retrieve()
static global::System.IntPtr Domain_FromIntervals(int len1_1, int[] len1_2, long[] jarg1)
long Size()
Definition: Domain.cs:101
int Count
static global::System.IntPtr Domain_FromFlatIntervals(int length1, long[] jarg1)
static long Domain_Size(global::System.Runtime.InteropServices.HandleRef jarg1)
long Min()
Definition: Domain.cs:106
Domain UnionWith(Domain domain)
Definition: Domain.cs:137
static bool Domain_IsEmpty(global::System.Runtime.InteropServices.HandleRef jarg1)
void CopyTo(long[] array)
Domain(long left, long right)
Definition: Domain.cs:57
Domain(long value)
Definition: Domain.cs:54
virtual void Dispose(bool disposing)
Definition: Domain.cs:39
Definition: Domain.cs:11
static global::System.IntPtr Domain_AdditionWith(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr Domain_FlattenedIntervals(global::System.Runtime.InteropServices.HandleRef jarg1)
long Max()
Definition: Domain.cs:111
bool swigCMemOwn
Definition: Domain.cs:19
static global::System.IntPtr Domain_UnionWith(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
string ToString()
Definition: Domain.cs:149