Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
PathsMetadata.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;
16
17public partial class PathsMetadata : global::System.IDisposable {
18 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
19 protected bool swigCMemOwn;
20
21 internal PathsMetadata(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(PathsMetadata obj) {
27 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
28 }
29
30 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(PathsMetadata obj) {
31 if (obj != null) {
32 if (!obj.swigCMemOwn)
33 throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
34 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
35 obj.swigCMemOwn = false;
36 obj.Dispose();
37 return ptr;
38 } else {
39 return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
40 }
41 }
42
43 ~PathsMetadata() {
44 Dispose(false);
45 }
46
47 public void Dispose() {
48 Dispose(true);
49 global::System.GC.SuppressFinalize(this);
50 }
51
52 protected virtual void Dispose(bool disposing) {
53 lock(this) {
54 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
55 if (swigCMemOwn) {
56 swigCMemOwn = false;
58 }
59 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
60 }
61 }
62 }
63
64 public PathsMetadata(RoutingIndexManager manager) : this(operations_research_constraint_solverPINVOKE.new_PathsMetadata(RoutingIndexManager.getCPtr(manager)), true) {
65 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending) throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
66 }
67
68 public bool IsStart(long node) {
70 return ret;
71 }
72
73 public bool IsEnd(long node) {
75 return ret;
76 }
77
78 public int GetPath(long start_or_end_node) {
79 int ret = operations_research_constraint_solverPINVOKE.PathsMetadata_GetPath(swigCPtr, start_or_end_node);
80 return ret;
81 }
82
83 public int NumPaths() {
85 return ret;
86 }
87
88 public long[] Paths() {
89 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.PathsMetadata_Paths(swigCPtr);
90 Int64Vector tmpVector = null;
91 if (cPtr != global::System.IntPtr.Zero) {
92 tmpVector = new Int64Vector(cPtr, true);
93 long[] outArray = new long[tmpVector.Count];
94 tmpVector.CopyTo(outArray);
95 return outArray;
96 }
97 return null;
98}
99
100 public long[] Starts() {
101 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.PathsMetadata_Starts(swigCPtr);
102 Int64Vector tmpVector = null;
103 if (cPtr != global::System.IntPtr.Zero) {
104 tmpVector = new Int64Vector(cPtr, true);
105 long[] outArray = new long[tmpVector.Count];
106 tmpVector.CopyTo(outArray);
107 return outArray;
108 }
109 return null;
110}
111
112 public long[] Ends() {
113 global::System.IntPtr cPtr = operations_research_constraint_solverPINVOKE.PathsMetadata_Ends(swigCPtr);
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}
125
126}
static global::System.IntPtr PathsMetadata_Paths(global::System.Runtime.InteropServices.HandleRef jarg1)
static int PathsMetadata_GetPath(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static bool PathsMetadata_IsEnd(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static void delete_PathsMetadata(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PathsMetadata_IsStart(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
static int PathsMetadata_NumPaths(global::System.Runtime.InteropServices.HandleRef jarg1)