Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
MinCostFlow.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
11namespace Google.OrTools.Graph {
12
13public class MinCostFlow : MinCostFlowBase {
14 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
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 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(MinCostFlow obj) {
25 if (obj != null) {
26 if (!obj.swigCMemOwn)
27 throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
28 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
29 obj.swigCMemOwn = false;
30 obj.Dispose();
31 return ptr;
32 } else {
33 return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
34 }
35 }
36
37 protected override void Dispose(bool disposing) {
38 lock(this) {
39 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
40 if (swigCMemOwn) {
41 swigCMemOwn = false;
43 }
44 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
45 }
46 base.Dispose(disposing);
47 }
48 }
49
50 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) {
51 }
53 public MinCostFlow(int reserve_num_nodes) : this(operations_research_graphPINVOKE.new_MinCostFlow__SWIG_1(reserve_num_nodes), true) {
54 }
56 public MinCostFlow() : this(operations_research_graphPINVOKE.new_MinCostFlow__SWIG_2(), true) {
57 }
59 public int AddArcWithCapacityAndUnitCost(int tail, int head, long capacity, long unit_cost) {
60 int ret = operations_research_graphPINVOKE.MinCostFlow_AddArcWithCapacityAndUnitCost(swigCPtr, tail, head, capacity, unit_cost);
61 return ret;
62 }
63
64 public void SetNodeSupply(int node, long supply) {
66 }
67
70 return ret;
71 }
72
75 return ret;
76 }
77
78 public long OptimalCost() {
80 return ret;
81 }
82
83 public long MaximumFlow() {
85 return ret;
86 }
87
88 public long Flow(int arc) {
89 long ret = operations_research_graphPINVOKE.MinCostFlow_Flow(swigCPtr, arc);
90 return ret;
91 }
92
93 public int NumNodes() {
95 return ret;
96 }
97
98 public int NumArcs() {
100 return ret;
101 }
102
103 public int Tail(int arc) {
104 int ret = operations_research_graphPINVOKE.MinCostFlow_Tail(swigCPtr, arc);
105 return ret;
106 }
107
108 public int Head(int arc) {
109 int ret = operations_research_graphPINVOKE.MinCostFlow_Head(swigCPtr, arc);
110 return ret;
111 }
112
113 public long Capacity(int arc) {
115 return ret;
116 }
117
118 public long Supply(int node) {
119 long ret = operations_research_graphPINVOKE.MinCostFlow_Supply(swigCPtr, node);
120 return ret;
121 }
122
123 public long UnitCost(int arc) {
125 return ret;
126 }
127
128}
129
130}
MinCostFlowBase.Status Solve()
void SetNodeSupply(int node, long supply)
int AddArcWithCapacityAndUnitCost(int tail, int head, long capacity, long unit_cost)
MinCostFlowBase.Status SolveMaxFlowWithMinCost()
static long MinCostFlow_Capacity(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static int MinCostFlow_SolveMaxFlowWithMinCost(global::System.Runtime.InteropServices.HandleRef jarg1)
static int MinCostFlow_AddArcWithCapacityAndUnitCost(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3, long jarg4, long jarg5)
static int MinCostFlow_Head(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static long MinCostFlow_MaximumFlow(global::System.Runtime.InteropServices.HandleRef jarg1)
static long MinCostFlow_Supply(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 int MinCostFlow_Tail(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
static void MinCostFlow_SetNodeSupply(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, long jarg3)
static int MinCostFlow_NumArcs(global::System.Runtime.InteropServices.HandleRef jarg1)
static int MinCostFlow_NumNodes(global::System.Runtime.InteropServices.HandleRef jarg1)
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 void delete_MinCostFlow(global::System.Runtime.InteropServices.HandleRef jarg1)