Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
LocalSearchOperatorState.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 LocalSearchOperatorState : global::System.IDisposable {
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 protected bool swigCMemOwn;
21
22 internal LocalSearchOperatorState(global::System.IntPtr cPtr, bool cMemoryOwn) {
23 swigCMemOwn = cMemoryOwn;
24 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
25 }
26
27 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LocalSearchOperatorState obj) {
28 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
29 }
30
31 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(LocalSearchOperatorState obj) {
32 if (obj != null) {
33 if (!obj.swigCMemOwn)
34 throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
35 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
36 obj.swigCMemOwn = false;
37 obj.Dispose();
38 return ptr;
39 } else {
40 return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
41 }
42 }
43
44 ~LocalSearchOperatorState() {
45 Dispose(false);
46 }
47
48 public void Dispose() {
49 Dispose(true);
50 global::System.GC.SuppressFinalize(this);
51 }
52
53 protected virtual void Dispose(bool disposing) {
54 lock(this) {
55 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
56 if (swigCMemOwn) {
57 swigCMemOwn = false;
59 }
60 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
61 }
62 }
63 }
64
65 public LocalSearchOperatorState() : this(operations_research_constraint_solverPINVOKE.new_LocalSearchOperatorState(), true) {
66 }
68 public void SetCurrentDomainInjectiveAndKeepInverseValues(int max_value) {
70 }
71
72 public long CandidateValue(long index) {
74 return ret;
75 }
76
77 public long CommittedValue(long index) {
79 return ret;
80 }
81
82 public long CheckPointValue(long index) {
84 return ret;
85 }
86
87 public void SetCandidateValue(long index, long value) {
89 }
90
91 public bool CandidateIsActive(long index) {
93 return ret;
94 }
95
96 public void SetCandidateActive(long index, bool active) {
98 }
99
100 public void Commit() {
103
104 public void CheckPoint() {
107
108 public void Revert(bool only_incremental) {
111
112 public long[] CandidateIndicesChanged() {
114 Int64Vector tmpVector = null;
115 if (cPtr != global::System.IntPtr.Zero) {
116 tmpVector = new Int64Vector(cPtr, true);
117 long[] outArray = new long[tmpVector.Count];
118 tmpVector.CopyTo(outArray);
119 return outArray;
120 }
121 return null;
122}
123
124 public long[] IncrementalIndicesChanged() {
125 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.LocalSearchOperatorState_IncrementalIndicesChanged(swigCPtr);
126 Int64Vector tmpVector = null;
127 if (cPtr != global::System.IntPtr.Zero) {
128 tmpVector = new Int64Vector(cPtr, true);
129 long[] outArray = new long[tmpVector.Count];
130 tmpVector.CopyTo(outArray);
131 return outArray;
132 }
133 return null;
134}
135
136 public void Resize(int size) {
137 operations_research_constraint_solverPINVOKE.LocalSearchOperatorState_Resize(swigCPtr, size);
139
140 public long CandidateInverseValue(long value) {
142 return ret;
143 }
144
145 public long CommittedInverseValue(long value) {
147 return ret;
148 }
149
150}
151
152}
static long LocalSearchOperatorState_CommittedValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static long LocalSearchOperatorState_CandidateInverseValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void LocalSearchOperatorState_SetCurrentDomainInjectiveAndKeepInverseValues(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static bool LocalSearchOperatorState_CandidateIsActive(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void delete_LocalSearchOperatorState(global::System.Runtime.InteropServices.HandleRef jarg1)
static long LocalSearchOperatorState_CheckPointValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static long LocalSearchOperatorState_CandidateValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void LocalSearchOperatorState_Commit(global::System.Runtime.InteropServices.HandleRef jarg1)
static long LocalSearchOperatorState_CommittedInverseValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void LocalSearchOperatorState_Revert(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2)
static void LocalSearchOperatorState_CheckPoint(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr LocalSearchOperatorState_CandidateIndicesChanged(global::System.Runtime.InteropServices.HandleRef jarg1)
static void LocalSearchOperatorState_SetCandidateActive(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, bool jarg3)
static void LocalSearchOperatorState_SetCandidateValue(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2, long jarg3)