1
2
3
4
5
6
7
8
9 package org.gnu.glpk;
10
11
12
13
14
15
16
17
18
19 public class glp_graph {
20 private transient long swigCPtr;
21 protected transient boolean swigCMemOwn;
22
23 protected glp_graph(long cPtr, boolean cMemoryOwn) {
24 swigCMemOwn = cMemoryOwn;
25 swigCPtr = cPtr;
26 }
27
28 protected static long getCPtr(glp_graph obj) {
29 return (obj == null) ? 0 : obj.swigCPtr;
30 }
31
32 protected void finalize() {
33 delete();
34 }
35
36 public synchronized void delete() {
37 if (swigCPtr != 0) {
38 if (swigCMemOwn) {
39 swigCMemOwn = false;
40 GLPKJNI.delete_glp_graph(swigCPtr);
41 }
42 swigCPtr = 0;
43 }
44 }
45
46 public void setPool(SWIGTYPE_p_void value) {
47 GLPKJNI.glp_graph_pool_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
48 }
49
50 public SWIGTYPE_p_void getPool() {
51 long cPtr = GLPKJNI.glp_graph_pool_get(swigCPtr);
52 return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
53 }
54
55 public void setName(String value) {
56 GLPKJNI.glp_graph_name_set(swigCPtr, value);
57 }
58
59 public String getName() {
60 return GLPKJNI.glp_graph_name_get(swigCPtr);
61 }
62
63 public void setNv_max(int value) {
64 GLPKJNI.glp_graph_nv_max_set(swigCPtr, value);
65 }
66
67 public int getNv_max() {
68 return GLPKJNI.glp_graph_nv_max_get(swigCPtr);
69 }
70
71 public void setNv(int value) {
72 GLPKJNI.glp_graph_nv_set(swigCPtr, value);
73 }
74
75 public int getNv() {
76 return GLPKJNI.glp_graph_nv_get(swigCPtr);
77 }
78
79 public void setNa(int value) {
80 GLPKJNI.glp_graph_na_set(swigCPtr, value);
81 }
82
83 public int getNa() {
84 return GLPKJNI.glp_graph_na_get(swigCPtr);
85 }
86
87 public void setV(SWIGTYPE_p_p_glp_vertex value) {
88 GLPKJNI.glp_graph_v_set(swigCPtr, SWIGTYPE_p_p_glp_vertex.getCPtr(value));
89 }
90
91 public SWIGTYPE_p_p_glp_vertex getV() {
92 long cPtr = GLPKJNI.glp_graph_v_get(swigCPtr);
93 return (cPtr == 0) ? null : new SWIGTYPE_p_p_glp_vertex(cPtr, false);
94 }
95
96 public void setIndex(SWIGTYPE_p_void value) {
97 GLPKJNI.glp_graph_index_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
98 }
99
100 public SWIGTYPE_p_void getIndex() {
101 long cPtr = GLPKJNI.glp_graph_index_get(swigCPtr);
102 return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
103 }
104
105 public void setV_size(int value) {
106 GLPKJNI.glp_graph_v_size_set(swigCPtr, value);
107 }
108
109 public int getV_size() {
110 return GLPKJNI.glp_graph_v_size_get(swigCPtr);
111 }
112
113 public void setA_size(int value) {
114 GLPKJNI.glp_graph_a_size_set(swigCPtr, value);
115 }
116
117 public int getA_size() {
118 return GLPKJNI.glp_graph_a_size_get(swigCPtr);
119 }
120
121 public glp_graph() {
122 this(GLPKJNI.new_glp_graph(), true);
123 }
124
125 }