GLPK for C#/CLI  1.10.0
All Classes Namespaces Functions Properties Pages
glp_graph.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.8
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 org.gnu.glpk {
12 
13 public class glp_graph : global::System.IDisposable {
14  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15  protected bool swigCMemOwn;
16 
17  internal glp_graph(global::System.IntPtr cPtr, bool cMemoryOwn) {
18  swigCMemOwn = cMemoryOwn;
19  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20  }
21 
22  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(glp_graph obj) {
23  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24  }
25 
26  ~glp_graph() {
27  Dispose();
28  }
29 
30  public virtual void Dispose() {
31  lock(this) {
32  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
33  if (swigCMemOwn) {
34  swigCMemOwn = false;
35  GLPKPINVOKE.delete_glp_graph(swigCPtr);
36  }
37  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
38  }
39  global::System.GC.SuppressFinalize(this);
40  }
41  }
42 
43  public SWIGTYPE_p_void pool {
44  set {
45  GLPKPINVOKE.glp_graph_pool_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
47  }
48  get {
49  global::System.IntPtr cPtr = GLPKPINVOKE.glp_graph_pool_get(swigCPtr);
50  SWIGTYPE_p_void ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
52  return ret;
53  }
54  }
55 
56  public string name {
57  set {
58  GLPKPINVOKE.glp_graph_name_set(swigCPtr, value);
60  }
61  get {
62  string ret = GLPKPINVOKE.glp_graph_name_get(swigCPtr);
64  return ret;
65  }
66  }
67 
68  public int nv_max {
69  set {
70  GLPKPINVOKE.glp_graph_nv_max_set(swigCPtr, value);
72  }
73  get {
74  int ret = GLPKPINVOKE.glp_graph_nv_max_get(swigCPtr);
76  return ret;
77  }
78  }
79 
80  public int nv {
81  set {
82  GLPKPINVOKE.glp_graph_nv_set(swigCPtr, value);
84  }
85  get {
86  int ret = GLPKPINVOKE.glp_graph_nv_get(swigCPtr);
88  return ret;
89  }
90  }
91 
92  public int na {
93  set {
94  GLPKPINVOKE.glp_graph_na_set(swigCPtr, value);
96  }
97  get {
98  int ret = GLPKPINVOKE.glp_graph_na_get(swigCPtr);
100  return ret;
101  }
102  }
103 
104  public SWIGTYPE_p_p_glp_vertex v {
105  set {
106  GLPKPINVOKE.glp_graph_v_set(swigCPtr, SWIGTYPE_p_p_glp_vertex.getCPtr(value));
108  }
109  get {
110  global::System.IntPtr cPtr = GLPKPINVOKE.glp_graph_v_get(swigCPtr);
111  SWIGTYPE_p_p_glp_vertex ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_p_glp_vertex(cPtr, false);
113  return ret;
114  }
115  }
116 
117  public SWIGTYPE_p_void index {
118  set {
119  GLPKPINVOKE.glp_graph_index_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
121  }
122  get {
123  global::System.IntPtr cPtr = GLPKPINVOKE.glp_graph_index_get(swigCPtr);
124  SWIGTYPE_p_void ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
126  return ret;
127  }
128  }
129 
130  public int v_size {
131  set {
132  GLPKPINVOKE.glp_graph_v_size_set(swigCPtr, value);
134  }
135  get {
136  int ret = GLPKPINVOKE.glp_graph_v_size_get(swigCPtr);
138  return ret;
139  }
140  }
141 
142  public int a_size {
143  set {
144  GLPKPINVOKE.glp_graph_a_size_set(swigCPtr, value);
146  }
147  get {
148  int ret = GLPKPINVOKE.glp_graph_a_size_get(swigCPtr);
150  return ret;
151  }
152  }
153 
154  public glp_graph() : this(GLPKPINVOKE.new_glp_graph(), true) {
156  }
157 
158 }
159 
160 }