Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
SequenceVar.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 SequenceVar : PropagationBaseObject {
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21 internal SequenceVar(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_constraint_solverPINVOKE.SequenceVar_SWIGUpcast(cPtr), cMemoryOwn) {
22 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23 }
24
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SequenceVar 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(SequenceVar 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 SequenceVar(Solver s, IntervalVarVector intervals, IntVarVector nexts, string name) : this(operations_research_constraint_solverPINVOKE.new_SequenceVar(Solver.getCPtr(s), IntervalVarVector.getCPtr(intervals), IntVarVector.getCPtr(nexts), name), true) {
56 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
57 }
58
59 public override string ToString() {
61 return ret;
62 }
63
64 public void RankFirst(int index) {
66 }
67
68 public void RankNotFirst(int index) {
70 }
71
72 public void RankLast(int index) {
74 }
75
76 public void RankNotLast(int index) {
78 }
79
80 public void RankSequence( int[] rank_first, int[] rank_last, int[] unperformed) {
81 operations_research_constraint_solverPINVOKE.SequenceVar_RankSequence(swigCPtr, rank_first.Length, rank_first , rank_last.Length, rank_last , unperformed.Length, unperformed );
82 }
83
84 public IntervalVar Interval(int index) {
85 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.SequenceVar_Interval(swigCPtr, index);
86 IntervalVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntervalVar(cPtr, false);
87 return ret;
88 }
89
90 public IntVar Next(int index) {
91 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.SequenceVar_Next(swigCPtr, index);
92 IntVar ret = (cPtr == global::System.IntPtr.Zero) ? null : new IntVar(cPtr, false);
93 return ret;
94 }
95
96 public long Size() {
98 return ret;
99 }
100
101 public virtual void Accept(ModelVisitor visitor) {
104
105}
106
107}
virtual void Accept(ModelVisitor visitor)
void RankSequence(int[] rank_first, int[] rank_last, int[] unperformed)
static void delete_SequenceVar(global::System.Runtime.InteropServices.HandleRef jarg1)
static long SequenceVar_Size(global::System.Runtime.InteropServices.HandleRef jarg1)
static void SequenceVar_Accept(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void SequenceVar_RankLast(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void SequenceVar_RankNotLast(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void SequenceVar_RankSequence(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2, int length3, int[] jarg3, int length4, int[] jarg4)
static void SequenceVar_RankFirst(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static string SequenceVar_ToString(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr SequenceVar_Next(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void SequenceVar_RankNotFirst(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static global::System.IntPtr SequenceVar_Interval(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)