DotNet Reference

DotNet Reference

MinCostFlow.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.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 
11 namespace Google.OrTools.Graph {
12 
13 public class MinCostFlow : MinCostFlowBase {
14  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15 
16  internal MinCostFlow(global::System.IntPtr cPtr, bool cMemoryOwn) : base(operations_research_graphPINVOKE.MinCostFlow_SWIGUpcast(cPtr), cMemoryOwn) {
17  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
18  }
19 
20  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MinCostFlow obj) {
21  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
22  }
23 
24  protected override void Dispose(bool disposing) {
25  lock(this) {
26  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
27  if (swigCMemOwn) {
28  swigCMemOwn = false;
30  }
31  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
32  }
33  base.Dispose(disposing);
34  }
35  }
36 
37  public MinCostFlow() : this(operations_research_graphPINVOKE.new_MinCostFlow(), true) {
38  }
39 
40  public int AddArcWithCapacityAndUnitCost(int tail, int head, long capacity, long unit_cost) {
41  int ret = operations_research_graphPINVOKE.MinCostFlow_AddArcWithCapacityAndUnitCost(swigCPtr, tail, head, capacity, unit_cost);
42  return ret;
43  }
44 
45  public void SetNodeSupply(int node, long supply) {
47  }
48 
51  return ret;
52  }
53 
56  return ret;
57  }
58 
59  public long OptimalCost() {
61  return ret;
62  }
63 
64  public long MaximumFlow() {
66  return ret;
67  }
68 
69  public long Flow(int arc) {
70  long ret = operations_research_graphPINVOKE.MinCostFlow_Flow(swigCPtr, arc);
71  return ret;
72  }
73 
74  public int NumNodes() {
76  return ret;
77  }
78 
79  public int NumArcs() {
81  return ret;
82  }
83 
84  public int Tail(int arc) {
85  int ret = operations_research_graphPINVOKE.MinCostFlow_Tail(swigCPtr, arc);
86  return ret;
87  }
88 
89  public int Head(int arc) {
90  int ret = operations_research_graphPINVOKE.MinCostFlow_Head(swigCPtr, arc);
91  return ret;
92  }
93 
94  public long Capacity(int arc) {
96  return ret;
97  }
98 
99  public long Supply(int node) {
100  long ret = operations_research_graphPINVOKE.MinCostFlow_Supply(swigCPtr, node);
101  return ret;
102  }
103 
104  public long UnitCost(int arc) {
105  long ret = operations_research_graphPINVOKE.MinCostFlow_UnitCost(swigCPtr, arc);
106  return ret;
107  }
108 
109 }
110 
111 }
int Head(int arc)
Definition: MinCostFlow.cs:89
static int MinCostFlow_Solve(global::System.Runtime.InteropServices.HandleRef jarg1)
static int MinCostFlow_Tail(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
MinCostFlowBase.Status SolveMaxFlowWithMinCost()
Definition: MinCostFlow.cs:54
static int MinCostFlow_NumArcs(global::System.Runtime.InteropServices.HandleRef jarg1)
int NumNodes()
Definition: MinCostFlow.cs:74
MinCostFlow()
Definition: MinCostFlow.cs:37
static int MinCostFlow_SolveMaxFlowWithMinCost(global::System.Runtime.InteropServices.HandleRef jarg1)
Status
static int MinCostFlow_AddArcWithCapacityAndUnitCost(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3, long jarg4, long jarg5)
int NumArcs()
Definition: MinCostFlow.cs:79
static long MinCostFlow_Supply(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
long Supply(int node)
Definition: MinCostFlow.cs:99
override void Dispose(bool disposing)
Definition: MinCostFlow.cs:24
static void delete_MinCostFlow(global::System.Runtime.InteropServices.HandleRef jarg1)
long Flow(int arc)
Definition: MinCostFlow.cs:69
static long MinCostFlow_MaximumFlow(global::System.Runtime.InteropServices.HandleRef jarg1)
static int MinCostFlow_NumNodes(global::System.Runtime.InteropServices.HandleRef jarg1)
static void MinCostFlow_SetNodeSupply(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, long jarg3)
MinCostFlowBase.Status Solve()
Definition: MinCostFlow.cs:49
long Capacity(int arc)
Definition: MinCostFlow.cs:94
long OptimalCost()
Definition: MinCostFlow.cs:59
static int MinCostFlow_Head(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static long MinCostFlow_UnitCost(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
long UnitCost(int arc)
Definition: MinCostFlow.cs:104
static long MinCostFlow_Flow(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
Definition: MinCostFlow.cs:13
int Tail(int arc)
Definition: MinCostFlow.cs:84
static long MinCostFlow_Capacity(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
void SetNodeSupply(int node, long supply)
Definition: MinCostFlow.cs:45
long MaximumFlow()
Definition: MinCostFlow.cs:64
int AddArcWithCapacityAndUnitCost(int tail, int head, long capacity, long unit_cost)
Definition: MinCostFlow.cs:40
static global::System.IntPtr MinCostFlow_SWIGUpcast(global::System.IntPtr jarg1)
static long MinCostFlow_OptimalCost(global::System.Runtime.InteropServices.HandleRef jarg1)
bool swigCMemOwn