DotNet Reference

.Net Reference

RoutingIndexManager.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 using System.Collections.Generic;
17 
18 public partial class RoutingIndexManager : global::System.IDisposable {
19  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20  protected bool swigCMemOwn;
21 
22  internal RoutingIndexManager(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(RoutingIndexManager obj) {
28  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
29  }
30 
31  ~RoutingIndexManager() {
32  Dispose(false);
33  }
34 
35  public void Dispose() {
36  Dispose(true);
37  global::System.GC.SuppressFinalize(this);
38  }
39 
40  protected virtual void Dispose(bool disposing) {
41  lock(this) {
42  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
43  if (swigCMemOwn) {
44  swigCMemOwn = false;
46  }
47  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
48  }
49  }
50  }
51 
52  public RoutingIndexManager(int num_nodes, int num_vehicles, int depot) : this(operations_research_constraint_solverPINVOKE.new_RoutingIndexManager__SWIG_0(num_nodes, num_vehicles, depot), true) {
53  }
54 
55  public RoutingIndexManager(int num_nodes, int num_vehicles, int[] starts, int[] ends) : this(operations_research_constraint_solverPINVOKE.new_RoutingIndexManager__SWIG_1(num_nodes, num_vehicles, starts.Length, starts , ends.Length, ends ), true) {
56  }
57 
58  public int GetNumberOfNodes() {
60  return ret;
61  }
62 
63  public int GetNumberOfVehicles() {
65  return ret;
66  }
67 
68  public int GetNumberOfIndices() {
70  return ret;
71  }
72 
73  public long NodeToIndex(int node) {
75  return ret;
76  }
77 
78  public long[] NodesToIndices( int[] nodes) {
80  Int64Vector tmpVector = null;
81  if (cPtr != global::System.IntPtr.Zero) {
82  tmpVector = new Int64Vector(cPtr, true);
83  long[] outArray = new long[tmpVector.Count];
84  tmpVector.CopyTo(outArray);
85  return outArray;
86  }
87  return null;
88 }
89 
90  public int IndexToNode(long index) {
92 }
93 
94 }
95 
96 }
static global::System.IntPtr RoutingIndexManager_NodesToIndices(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, int[] jarg2)
int GetNumberOfNodes()
long NodeToIndex(int node)
int IndexToNode(long index)
static int RoutingIndexManager_GetNumberOfVehicles(global::System.Runtime.InteropServices.HandleRef jarg1)
static int RoutingIndexManager_IndexToNode(global::System.Runtime.InteropServices.HandleRef jarg1, long jarg2)
long[] NodesToIndices(int[] nodes)
using System
Definition: Program.cs:14
virtual void Dispose(bool disposing)
RoutingIndexManager(int num_nodes, int num_vehicles, int depot)
static long RoutingIndexManager_NodeToIndex(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
int GetNumberOfVehicles()
void CopyTo(long[] array)
bool swigCMemOwn
static void delete_RoutingIndexManager(global::System.Runtime.InteropServices.HandleRef jarg1)
int GetNumberOfIndices()
RoutingIndexManager(int num_nodes, int num_vehicles, int[] starts, int[] ends)
static int RoutingIndexManager_GetNumberOfNodes(global::System.Runtime.InteropServices.HandleRef jarg1)
void Dispose()
int Count
static int RoutingIndexManager_GetNumberOfIndices(global::System.Runtime.InteropServices.HandleRef jarg1)