Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
SequenceVarElement.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 SequenceVarElement : AssignmentElement {
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21 internal SequenceVarElement(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.SequenceVarElement_SWIGUpcast(cPtr), cMemoryOwn) {
22 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23 }
24
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SequenceVarElement 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(SequenceVarElement 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 SequenceVarElement() : this(operations_research_constraint_solverPINVOKE.new_SequenceVarElement__SWIG_0(), true) {
56 }
58 public SequenceVarElement(SequenceVar var) : this(operations_research_constraint_solverPINVOKE.new_SequenceVarElement__SWIG_1(SequenceVar.getCPtr(var)), true) {
59 }
61 public void Reset(SequenceVar var) {
63 }
64
65 public SequenceVarElement Clone() {
67 SequenceVarElement ret = (cPtr == global::System.IntPtr.Zero) ? null : new SequenceVarElement(cPtr, false);
68 return ret;
69 }
70
71 public void Copy(SequenceVarElement element) {
77 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.SequenceVarElement_Var(swigCPtr);
78 SequenceVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new SequenceVar(cPtr, false);
79 return ret;
80 }
81
82 public void Store() {
84 }
85
86 public void Restore() {
88 }
89
90 public int[] ForwardSequence() {
92 IntVector tmpVector = null;
93 if (cPtr != global::System.IntPtr.Zero) {
94 tmpVector = new IntVector(cPtr, true);
95 int[] outArray = new int[tmpVector.Count];
96 tmpVector.CopyTo(outArray);
97 return outArray;
98 }
99 return null;
100}
101
102 public int[] BackwardSequence() {
103 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.SequenceVarElement_BackwardSequence(swigCPtr);
104 IntVector tmpVector = null;
105 if (cPtr != global::System.IntPtr.Zero) {
106 tmpVector = new IntVector(cPtr, true);
107 int[] outArray = new int[tmpVector.Count];
108 tmpVector.CopyTo(outArray);
109 return outArray;
110 }
111 return null;
112}
113
114 public int[] Unperformed() {
115 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.SequenceVarElement_Unperformed(swigCPtr);
116 IntVector tmpVector = null;
117 if (cPtr != global::System.IntPtr.Zero) {
118 tmpVector = new IntVector(cPtr, true);
119 int[] outArray = new int[tmpVector.Count];
120 tmpVector.CopyTo(outArray);
121 return outArray;
122 }
123 return null;
124}
125
126 public void SetSequence( int[] forward_sequence, int[] backward_sequence, int[] unperformed) {
127 operations_research_constraint_solverPINVOKE.SequenceVarElement_SetSequence(swigCPtr, forward_sequence.Length, forward_sequence , backward_sequence.Length, backward_sequence , unperformed.Length, unperformed );
129
130 public void SetForwardSequence( int[] forward_sequence) {
131 operations_research_constraint_solverPINVOKE.SequenceVarElement_SetForwardSequence(swigCPtr, forward_sequence.Length, forward_sequence );
133
134 public void SetBackwardSequence( int[] backward_sequence) {
135 operations_research_constraint_solverPINVOKE.SequenceVarElement_SetBackwardSequence(swigCPtr, backward_sequence.Length, backward_sequence );
137
138 public void SetUnperformed( int[] unperformed) {
141
142 public bool Bound() {
144 return ret;
145 }
146
147 public string ToString() {
149 return ret;
150 }
151
152}
153
154}
void SetSequence(int[] forward_sequence, int[] backward_sequence, int[] unperformed)
static bool SequenceVarElement_Bound(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr SequenceVarElement_Var(global::System.Runtime.InteropServices.HandleRef jarg1)
static string SequenceVarElement_ToString(global::System.Runtime.InteropServices.HandleRef jarg1)
static void SequenceVarElement_SetUnperformed(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2)
static void SequenceVarElement_SetBackwardSequence(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2)
static void SequenceVarElement_SetForwardSequence(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2)
static void delete_SequenceVarElement(global::System.Runtime.InteropServices.HandleRef jarg1)
static void SequenceVarElement_Copy(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void SequenceVarElement_Store(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr SequenceVarElement_ForwardSequence(global::System.Runtime.InteropServices.HandleRef jarg1)
static void SequenceVarElement_Reset(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void SequenceVarElement_Restore(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr SequenceVarElement_Clone(global::System.Runtime.InteropServices.HandleRef jarg1)