DotNet Reference

.Net 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.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
11namespace Google.OrTools.Graph {
12
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(int reserve_num_nodes, int reserve_num_arcs) : this(operations_research_graphPINVOKE.new_MinCostFlow__SWIG_0(reserve_num_nodes, reserve_num_arcs), true) {
38 }
39
40 public MinCostFlow(int reserve_num_nodes) : this(operations_research_graphPINVOKE.new_MinCostFlow__SWIG_1(reserve_num_nodes), true) {
41 }
42
43 public MinCostFlow() : this(operations_research_graphPINVOKE.new_MinCostFlow__SWIG_2(), true) {
44 }
45
46 public int AddArcWithCapacityAndUnitCost(int tail, int head, long capacity, long unit_cost) {
47 int ret = operations_research_graphPINVOKE.MinCostFlow_AddArcWithCapacityAndUnitCost(swigCPtr, tail, head, capacity, unit_cost);
48 return ret;
49 }
50
51 public void SetNodeSupply(int node, long supply) {
53 }
54
57 return ret;
58 }
59
62 return ret;
63 }
64
65 public long OptimalCost() {
67 return ret;
68 }
69
70 public long MaximumFlow() {
72 return ret;
73 }
74
75 public long Flow(int arc) {
76 long ret = operations_research_graphPINVOKE.MinCostFlow_Flow(swigCPtr, arc);
77 return ret;
78 }
79
80 public int NumNodes() {
82 return ret;
83 }
84
85 public int NumArcs() {
87 return ret;
88 }
89
90 public int Tail(int arc) {
92 return ret;
93 }
94
95 public int Head(int arc) {
97 return ret;
98 }
99
100 public long Capacity(int arc) {
102 return ret;
103 }
104
105 public long Supply(int node) {
106 long ret = operations_research_graphPINVOKE.MinCostFlow_Supply(swigCPtr, node);
107 return ret;
108 }
109
110 public long UnitCost(int arc) {
112 return ret;
113 }
114
115}
116
117}
MinCostFlowBase.Status SolveMaxFlowWithMinCost()
Definition: MinCostFlow.cs:60
void SetNodeSupply(int node, long supply)
Definition: MinCostFlow.cs:51
int AddArcWithCapacityAndUnitCost(int tail, int head, long capacity, long unit_cost)
Definition: MinCostFlow.cs:46
MinCostFlow(int reserve_num_nodes, int reserve_num_arcs)
Definition: MinCostFlow.cs:37
override void Dispose(bool disposing)
Definition: MinCostFlow.cs:24
MinCostFlow(int reserve_num_nodes)
Definition: MinCostFlow.cs:40
MinCostFlowBase.Status Solve()
Definition: MinCostFlow.cs:55
static long MinCostFlow_Supply(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static int MinCostFlow_AddArcWithCapacityAndUnitCost(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3, long jarg4, long jarg5)
static long MinCostFlow_UnitCost(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static long MinCostFlow_Flow(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static long MinCostFlow_OptimalCost(global::System.Runtime.InteropServices.HandleRef jarg1)
static int MinCostFlow_Solve(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_MinCostFlow(global::System.Runtime.InteropServices.HandleRef jarg1)
static int MinCostFlow_Tail(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static int MinCostFlow_NumNodes(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr MinCostFlow_SWIGUpcast(global::System.IntPtr jarg1)
static int MinCostFlow_NumArcs(global::System.Runtime.InteropServices.HandleRef jarg1)
static long MinCostFlow_MaximumFlow(global::System.Runtime.InteropServices.HandleRef jarg1)
static void MinCostFlow_SetNodeSupply(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, long jarg3)
static int MinCostFlow_SolveMaxFlowWithMinCost(global::System.Runtime.InteropServices.HandleRef jarg1)
static int MinCostFlow_Head(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static long MinCostFlow_Capacity(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)