File: glpk_java.i

package info (click to toggle)
glpk-java 1.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 3,580 kB
  • sloc: sh: 3,609; java: 1,794; xml: 259; makefile: 154; ansic: 35
file content (92 lines) | stat: -rw-r--r-- 2,342 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/* File glpk_java.i
 *
 * This file contains definitions that are needed to generate Swig
 * code that is specific for GLPK for Java.
 */

%constant int GLP_JAVA_A_CAP  = offsetof(glp_java_arc_data, cap);
%constant int GLP_JAVA_A_COST = offsetof(glp_java_arc_data, cost);
%constant int GLP_JAVA_A_LOW  = offsetof(glp_java_arc_data, low);
%constant int GLP_JAVA_A_RC   = offsetof(glp_java_arc_data, rc);
%constant int GLP_JAVA_A_X    = offsetof(glp_java_arc_data, x);
%constant int GLP_JAVA_A_SIZE = sizeof(glp_java_arc_data);

%constant int GLP_JAVA_V_CUT  = offsetof(glp_java_vertex_data, cut);
%constant int GLP_JAVA_V_PI   = offsetof(glp_java_vertex_data, pi);
%constant int GLP_JAVA_V_RHS  = offsetof(glp_java_vertex_data, rhs);
%constant int GLP_JAVA_V_SET  = offsetof(glp_java_vertex_data, set);
%constant int GLP_JAVA_V_SIZE = sizeof(glp_java_vertex_data);

%javamethodmodifiers glp_java_arc_get_data(const glp_arc *arc)"
/**
 * Get arc data.
 *
 * @param arc arc
 * @return data
 */
public";

%javamethodmodifiers glp_java_vertex_get(const glp_graph *G, const int i)"
/**
 * Get vertex.
 *
 * @param G graph
 * @param i index
 * @return vertex
 */
public";

%javamethodmodifiers glp_java_vertex_data_get(const glp_graph *G, const int i)"
/**
 * Get vertex data.
 *
 * @param G graph
 * @param i index to vertex
 * @return data
 */
public";

%javamethodmodifiers glp_java_vertex_get_data (const glp_vertex *v)"
/**
 * Get vertex data.
 *
 * @param v vertex
 * @return data
 */
public";

%javamethodmodifiers glp_java_error(char *message)"
/**
 * Abort GLPK library with error message. This method can be used to stop the
 * solver using a GlpkTerminalListener.
 *
 * @param message message
 */
public";

%javamethodmodifiers glp_java_set_msg_lvl(int msg_lvl)"
/**
 * Sets the message level. This method enables and disables debug output of
 * GLPK for Java.
 *
 * @param msg_lvl message level
 *
 * @see GLPKConstants#GLP_JAVA_MSG_LVL_OFF
 * @see GLPKConstants#GLP_JAVA_MSG_LVL_ALL
 */
public";

%javamethodmodifiers glp_java_set_numeric_locale(char *locale)"
/**
 * Sets the locale for number formatting.
 * GLPK requires locale \"C\" for importing model files. Use the following code
 * to set the locale.
 * <pre>
 * GLPK.glp_java_set_numeric_locale(\"C\");
 * </pre>
 *
 * @param locale locale
 */
public";

%include "glpk_java.h"