Google OR-Tools v9.12
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.3.0
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 SetArcCapacity(int arc, long capacity) {
66 }
67
68 public void SetNodeSupply(int node, long supply) {
70 }
71
74 return ret;
75 }
76
79 return ret;
80 }
81
82 public long OptimalCost() {
84 return ret;
85 }
86
87 public long MaximumFlow() {
89 return ret;
90 }
91
92 public long Flow(int arc) {
93 long ret = operations_research_graphPINVOKE.MinCostFlow_Flow(swigCPtr, arc);
94 return ret;
95 }
96
97 public int NumNodes() {
99 return ret;
100 }
101
102 public int NumArcs() {
104 return ret;
105 }
106
107 public int Tail(int arc) {
108 int ret = operations_research_graphPINVOKE.MinCostFlow_Tail(swigCPtr, arc);
109 return ret;
110 }
111
112 public int Head(int arc) {
113 int ret = operations_research_graphPINVOKE.MinCostFlow_Head(swigCPtr, arc);
114 return ret;
115 }
116
117 public long Capacity(int arc) {
119 return ret;
120 }
121
122 public long Supply(int node) {
123 long ret = operations_research_graphPINVOKE.MinCostFlow_Supply(swigCPtr, node);
124 return ret;
125 }
126
127 public long UnitCost(int arc) {
129 return ret;
130 }
131
132}
133
134}
MinCostFlowBase.Status Solve()
void SetNodeSupply(int node, long supply)
int AddArcWithCapacityAndUnitCost(int tail, int head, long capacity, long unit_cost)
MinCostFlowBase.Status SolveMaxFlowWithMinCost()
void SetArcCapacity(int arc, long capacity)
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 MinCostFlow_SetArcCapacity(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, long jarg3)
static void delete_MinCostFlow(global::System.Runtime.InteropServices.HandleRef jarg1)