/*
* Function declarations
*/
int glp_java_term_hook(void *info, const char *s);
void glp_java_error_hook(void *in);
/*
* Static variables to handle errors inside callbacks
*/
#define GLP_JAVA_MAX_CALLBACK_LEVEL 4
TLS int glp_java_callback_level = 0;
TLS int glp_java_error_occured = 0;
TLS jmp_buf *glp_java_callback_env[GLP_JAVA_MAX_CALLBACK_LEVEL];
/*
* Message level.
*/
TLS int glp_java_msg_level = GLP_JAVA_MSG_LVL_OFF;
/**
* Aborts with error message.
*/
void glp_java_error(char *message) {
glp_error("%s\n", message);
}
/**
* Sets message level.
*/
void glp_java_set_msg_lvl(int msg_lvl) {
glp_java_msg_level = msg_lvl;
}
/**
* Sets locale for number formatting.
*/
void glp_java_set_numeric_locale(const char *locale) {
setlocale(LC_NUMERIC, locale);
}
/**
* Terminal hook function.
*/
int glp_java_term_hook(void *info, const char *s) {
jclass cls;
jmethodID mid = NULL;
JNIEnv *env = (JNIEnv *) info;
jstring str = NULL;
jint ret = 0;
glp_java_callback_level++;
if (glp_java_callback_level >= GLP_JAVA_MAX_CALLBACK_LEVEL) {
glp_java_error_occured = 1;
} else {
glp_java_error_occured = 0;
cls = (*env)->FindClass(env, "org/gnu/glpk/GlpkTerminal");
if (cls != NULL) {
mid = (*env)->GetStaticMethodID(
env, cls, "callback", "(Ljava/lang/String;)I");
if (mid != NULL) {
str = (*env)->NewStringUTF(env, s);
ret = (*env)->CallStaticIntMethod(env, cls, mid, str);
if (str != NULL) {
(*env)->DeleteLocalRef( env, str );
}
}
(*env)->DeleteLocalRef( env, cls );
}
}
glp_java_callback_level--;
if (glp_java_error_occured) {
longjmp(*glp_java_callback_env[glp_java_callback_level], 1);
}
return ret;
}
/**
* Call back function for MIP solver.
*/
void glp_java_cb(glp_tree *tree, void *info) {
jclass cls;
jmethodID mid = NULL;
JNIEnv *env = (JNIEnv *) info;
jlong ltree;
glp_java_callback_level++;
if (glp_java_callback_level >= GLP_JAVA_MAX_CALLBACK_LEVEL) {
glp_java_error_occured = 1;
} else {
glp_java_error_occured = 0;
cls = (*env)->FindClass(env, "org/gnu/glpk/GlpkCallback");
if (cls != NULL) {
mid = (*env)->GetStaticMethodID(
env, cls, "callback", "(J)V");
}
if (mid != NULL) {
*(glp_tree **)<ree = tree;
(*env)->CallStaticVoidMethod(env, cls, mid, ltree);
}
if (cls != NULL) {
(*env)->DeleteLocalRef( env, cls );
}
}
glp_java_callback_level--;
if (glp_java_error_occured) {
longjmp(*glp_java_callback_env[glp_java_callback_level], 1);
}
}
/**
* This hook function will be processed if an error occured
* calling the glpk library.
*
* @param in pointer to long jump environment
*/
void glp_java_error_hook(void *in) {
glp_java_error_occured = 1;
/* free GLPK memory */
glp_free_env();
/* safely return */
longjmp(*((jmp_buf*)in), 1);
}
/**
* This function is used to throw a Java exception.
*
* @param env Java environment
* @param message detail message
*/
void glp_java_throw(JNIEnv *env, char *message) {
jclass newExcCls;
newExcCls = (*env)->FindClass(env, "org/gnu/glpk/GlpkException");
if (newExcCls == NULL) {
newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException");
}
if (newExcCls != NULL) {
(*env)->ThrowNew(env, newExcCls, message);
}
}
/**
* This function is used to throw a java.lang.OutOfMemoryError.
*
* @param env Java environment
* @param message detail message
*/
void glp_java_throw_outofmemory(JNIEnv *env, char *message) {
jclass newExcCls;
newExcCls = (*env)->FindClass(env, "java/lang/OutOfMemoryError");
if (newExcCls != NULL) {
(*env)->ThrowNew(env, newExcCls, message);
}
}
/**
* Gets arc data.
*
* @param arc arc
* @return data
*/
glp_java_arc_data *glp_java_arc_get_data(const glp_arc *arc) {
return (glp_java_arc_data *) arc->data;
}
/**
* Gets vertex.
*
* @param G graph
* @param i index
* @return vertex
*/
glp_vertex *glp_java_vertex_get(
const glp_graph *G, const int i) {
if (i < 1 || i > G->nv) {
glp_error( "Index %d is out of range.\n", i);
}
return G->v[i];
}
/**
* Gets vertex data.
*
* @param G graph
* @param i index to vertex
* @return data
*/
glp_java_vertex_data *glp_java_vertex_data_get(
const glp_graph *G, const int i) {
if (i < 1 || i > G->nv) {
glp_error( "Index %d is out of range.\n", i);
}
return (glp_java_vertex_data *) G->v[i]->data;
}
/**
* Gets vertex data.
*
* @param v vertex
* @return data
*/
glp_java_vertex_data *glp_java_vertex_get_data(
const glp_vertex *v) {
return v->data;
}
%}
// Add handling for structures
%include "glpk_java_structures.i"
%glp_structure(glp_arc)
%glp_structure(glp_graph)
%glp_structure(glp_vertex)
// Add handling for arrays
%include "glpk_java_arrays.i"
%glp_array_functions(int, intArray)
%glp_array_functions(double, doubleArray)
// Add handling for String arrays in glp_main
%include "various.i"
%apply char **STRING_ARRAY { const char *argv[] };
// Exception handling
%exception {
jmp_buf glp_java_env;
if (glp_java_msg_level != GLP_JAVA_MSG_LVL_OFF) {
glp_printf("entering function $name.\n");
}
glp_java_callback_env[glp_java_callback_level] = &glp_java_env;
if (setjmp(glp_java_env)) {
glp_java_throw(jenv, "function $name failed");
} else {
glp_error_hook(glp_java_error_hook, &glp_java_env);
$action;
}
glp_java_callback_env[glp_java_callback_level] = NULL;
glp_error_hook(NULL, NULL);
if (glp_java_msg_level != GLP_JAVA_MSG_LVL_OFF) {
glp_printf("leaving function $name.\n");
}
}
%typemap(javaclassmodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [],
SWIGTYPE (CLASS::*) "
/**
* Wrapper class for pointer generated by SWIG.
* Please, refer to doc/glpk-java.pdf of the GLPK for Java distribution
* and to doc/glpk.pdf of the GLPK source distribution
* for details. You can download the GLPK source distribution from
* ftp://ftp.gnu.org/gnu/glpk .
*/
public class";
%pragma(java) moduleclassmodifiers = "
/**
* Wrapper class generated by SWIG.
*
Please, refer to doc/glpk-java.pdf of the GLPK for Java distribution
* and to doc/glpk.pdf of the GLPK source distribution
* for details. You can download the source distribution from
* ftp://ftp.gnu.org/gnu/glpk .
*
*
For handling arrays of int and double the following methods are
* provided:
* @see #new_doubleArray(int)
* @see #delete_doubleArray(SWIGTYPE_p_double)
* @see #doubleArray_getitem(SWIGTYPE_p_double, int)
* @see #doubleArray_setitem(SWIGTYPE_p_double, int, double)
* @see #new_intArray(int)
* @see #delete_intArray(SWIGTYPE_p_int)
* @see #intArray_getitem(SWIGTYPE_p_int, int)
* @see #intArray_setitem(SWIGTYPE_p_int, int, int)
*/
public class";
// Add the library to be wrapped
%include "glpk_java.i"
%include "glpk_javadoc.i"
%include "glpk.h"
libglpk-java-1.12.0/swig/glpk_javadoc.i 0000644 0001750 0001750 00001265124 12663122700 014640 0000000 0000000
%javamethodmodifiers AMD_aat(Int n, const Int Ap[], const Int Ai[], Int Len[], Int Tp[], double Info[]) "
/**
*/
public";
%javamethodmodifiers bigmul(int n, int m, unsigned short x[], unsigned short y[]) "
/**
* bigmul - multiply unsigned integer numbers of arbitrary precision .
*
SYNOPSIS
* #include \"bignum.h\" void bigmul(int n, int m, unsigned short x[], unsigned short y[]);
* DESCRIPTION
* The routine bigmul multiplies unsigned integer numbers of arbitrary precision.
* n is the number of digits of multiplicand, n >= 1;
* m is the number of digits of multiplier, m >= 1;
* x is an array containing digits of the multiplicand in elements x[m], x[m+1], ..., x[n+m-1]. Contents of x[0], x[1], ..., x[m-1] are ignored on entry.
* y is an array containing digits of the multiplier in elements y[0], y[1], ..., y[m-1].
* On exit digits of the product are stored in elements x[0], x[1], ..., x[n+m-1]. The array y is not changed.
*/
public";
%javamethodmodifiers bigdiv(int n, int m, unsigned short x[], unsigned short y[]) "
/**
* bigdiv - divide unsigned integer numbers of arbitrary precision .
* SYNOPSIS
* #include \"bignum.h\" void bigdiv(int n, int m, unsigned short x[], unsigned short y[]);
* DESCRIPTION
* The routine bigdiv divides one unsigned integer number of arbitrary precision by another with the algorithm described in [1].
* n is the difference between the number of digits of dividend and the number of digits of divisor, n >= 0.
* m is the number of digits of divisor, m >= 1.
* x is an array containing digits of the dividend in elements x[0], x[1], ..., x[n+m-1].
* y is an array containing digits of the divisor in elements y[0], y[1], ..., y[m-1]. The highest digit y[m-1] must be non-zero.
* On exit n+1 digits of the quotient are stored in elements x[m], x[m+1], ..., x[n+m], and m digits of the remainder are stored in elements x[0], x[1], ..., x[m-1]. The array y is changed but then restored.
* REFERENCES
*
D. Knuth. The Art of Computer Programming. Vol. 2: Seminumerical Algorithms. Stanford University, 1969.
*/
public";
%javamethodmodifiers sub(struct csa *csa, int ct, int table[], int level, int weight, int l_weight) "
/**
*/
public";
%javamethodmodifiers wclique(int n_, const int w[], const unsigned char a_[], int ind[]) "
/**
*/
public";
%javamethodmodifiers AMD_1(Int n, const Int Ap[], const Int Ai[], Int P[], Int Pinv[], Int Len[], Int slen, Int S[], double Control[], double Info[]) "
/**
*/
public";
%javamethodmodifiers set_penalty(struct csa *csa, double tol, double tol1) "
/**
*/
public";
%javamethodmodifiers check_feas(struct csa *csa, int phase, double tol, double tol1) "
/**
*/
public";
%javamethodmodifiers adjust_penalty(struct csa *csa, double tol, double tol1) "
/**
*/
public";
%javamethodmodifiers choose_pivot(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers sum_infeas(SPXLP *lp, const double beta[]) "
/**
*/
public";
%javamethodmodifiers display(struct csa *csa, int spec) "
/**
*/
public";
%javamethodmodifiers primal_simplex(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers spx_primal(glp_prob *P, const glp_smcp *parm) "
/**
*/
public";
%javamethodmodifiers xdlopen(const char *module) "
/**
*/
public";
%javamethodmodifiers xdlsym(void *h, const char *symbol) "
/**
*/
public";
%javamethodmodifiers xdlclose(void *h) "
/**
*/
public";
%javamethodmodifiers fn_gmtime(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers error1(MPL *mpl, const char *str, const char *s, const char *fmt, const char *f, const char *msg) "
/**
*/
public";
%javamethodmodifiers fn_str2time(MPL *mpl, const char *str, const char *fmt) "
/**
*/
public";
%javamethodmodifiers error2(MPL *mpl, const char *fmt, const char *f, const char *msg) "
/**
*/
public";
%javamethodmodifiers weekday(int j) "
/**
*/
public";
%javamethodmodifiers firstday(int year) "
/**
*/
public";
%javamethodmodifiers fn_time2str(MPL *mpl, char *str, double t, const char *fmt) "
/**
*/
public";
%javamethodmodifiers glp_puts(const char *s) "
/**
* glp_puts - write string on terminal .
* SYNOPSIS
* void glp_puts(const char *s);
* The routine glp_puts writes the string s on the terminal.
*/
public";
%javamethodmodifiers glp_printf(const char *fmt,...) "
/**
* glp_printf - write formatted output on terminal .
* SYNOPSIS
* void glp_printf(const char *fmt, ...);
* DESCRIPTION
* The routine glp_printf uses the format control string fmt to format its parameters and writes the formatted output on the terminal.
*/
public";
%javamethodmodifiers glp_vprintf(const char *fmt, va_list arg) "
/**
* glp_vprintf - write formatted output on terminal .
* SYNOPSIS
* void glp_vprintf(const char *fmt, va_list arg);
* DESCRIPTION
* The routine glp_vprintf uses the format control string fmt to format its parameters specified by the list arg and writes the formatted output on the terminal.
*/
public";
%javamethodmodifiers glp_term_out(int flag) "
/**
* glp_term_out - enable/disable terminal output .
* SYNOPSIS
* int glp_term_out(int flag);
* DESCRIPTION
* Depending on the parameter flag the routine glp_term_out enables or disables terminal output performed by glpk routines:
* GLP_ON - enable terminal output; GLP_OFF - disable terminal output.
* RETURNS
* The routine glp_term_out returns the previous value of the terminal output flag.
*/
public";
%javamethodmodifiers glp_term_hook(int(*func)(void *info, const char *s), void *info) "
/**
* glp_term_hook - install hook to intercept terminal output .
* SYNOPSIS
* void glp_term_hook(int (*func)(void *info, const char *s), void *info);
* DESCRIPTION
* The routine glp_term_hook installs a user-defined hook routine to intercept all terminal output performed by glpk routines.
* This feature can be used to redirect the terminal output to other destination, for example to a file or a text window.
* The parameter func specifies the user-defined hook routine. It is called from an internal printing routine, which passes to it two parameters: info and s. The parameter info is a transit pointer, specified in the corresponding call to the routine glp_term_hook; it may be used to pass some information to the hook routine. The parameter s is a pointer to the null terminated character string, which is intended to be written to the terminal. If the hook routine returns zero, the printing routine writes the string s to the terminal in a usual way; otherwise, if the hook routine returns non-zero, no terminal output is performed.
* To uninstall the hook routine the parameters func and info should be specified as NULL.
*/
public";
%javamethodmodifiers glp_open_tee(const char *name) "
/**
* glp_open_tee - start copying terminal output to text file .
* SYNOPSIS
* int glp_open_tee(const char *name);
* DESCRIPTION
* The routine glp_open_tee starts copying all the terminal output to an output text file, whose name is specified by the character string name.
* RETURNS
* 0 - operation successful 1 - copying terminal output is already active 2 - unable to create output file
*/
public";
%javamethodmodifiers glp_close_tee(void) "
/**
* glp_close_tee - stop copying terminal output to text file .
* SYNOPSIS
* int glp_close_tee(void);
* DESCRIPTION
* The routine glp_close_tee stops copying the terminal output to the output text file previously open by the routine glp_open_tee closing that file.
* RETURNS
* 0 - operation successful 1 - copying terminal output was not started
*/
public";
%javamethodmodifiers gen_cut(glp_tree *tree, struct worka *worka, int j) "
/**
*/
public";
%javamethodmodifiers fcmp(const void *p1, const void *p2) "
/**
*/
public";
%javamethodmodifiers ios_gmi_gen(glp_tree *tree) "
/**
*/
public";
%javamethodmodifiers strtrim(char *str) "
/**
* strtrim - remove trailing spaces from character string .
* SYNOPSIS
* #include \"misc.h\" char *strtrim(char *str);
* DESCRIPTION
* The routine strtrim removes trailing spaces from the character string str.
* RETURNS
* The routine returns a pointer to the character string.
* EXAMPLES
* strtrim(\"Errare humanum est \") => \"Errare humanum est\"
* strtrim(\" \") => \"\"
*/
public";
%javamethodmodifiers create_prob(glp_prob *lp) "
/**
* glp_create_prob - create problem object .
* SYNOPSIS
* glp_prob *glp_create_prob(void);
* DESCRIPTION
* The routine glp_create_prob creates a new problem object, which is initially \"empty\", i.e. has no rows and columns.
* RETURNS
* The routine returns a pointer to the object created, which should be used in any subsequent operations on this object.
*/
public";
%javamethodmodifiers glp_create_prob(void) "
/**
*/
public";
%javamethodmodifiers glp_set_prob_name(glp_prob *lp, const char *name) "
/**
* glp_set_prob_name - assign (change) problem name .
* SYNOPSIS
* void glp_set_prob_name(glp_prob *lp, const char *name);
* DESCRIPTION
* The routine glp_set_prob_name assigns a given symbolic name (1 up to 255 characters) to the specified problem object.
* If the parameter name is NULL or empty string, the routine erases an existing symbolic name of the problem object.
*/
public";
%javamethodmodifiers glp_set_obj_name(glp_prob *lp, const char *name) "
/**
* glp_set_obj_name - assign (change) objective function name .
* SYNOPSIS
* void glp_set_obj_name(glp_prob *lp, const char *name);
* DESCRIPTION
* The routine glp_set_obj_name assigns a given symbolic name (1 up to 255 characters) to the objective function of the specified problem object.
* If the parameter name is NULL or empty string, the routine erases an existing name of the objective function.
*/
public";
%javamethodmodifiers glp_set_obj_dir(glp_prob *lp, int dir) "
/**
* glp_set_obj_dir - set (change) optimization direction flag .
* SYNOPSIS
* void glp_set_obj_dir(glp_prob *lp, int dir);
* DESCRIPTION
* The routine glp_set_obj_dir sets (changes) optimization direction flag (i.e. \"sense\" of the objective function) as specified by the parameter dir:
* GLP_MIN - minimization; GLP_MAX - maximization.
*/
public";
%javamethodmodifiers glp_add_rows(glp_prob *lp, int nrs) "
/**
* glp_add_rows - add new rows to problem object .
* SYNOPSIS
* int glp_add_rows(glp_prob *lp, int nrs);
* DESCRIPTION
* The routine glp_add_rows adds nrs rows (constraints) to the specified problem object. New rows are always added to the end of the row list, so the ordinal numbers of existing rows remain unchanged.
* Being added each new row is initially free (unbounded) and has empty list of the constraint coefficients.
* RETURNS
* The routine glp_add_rows returns the ordinal number of the first new row added to the problem object.
*/
public";
%javamethodmodifiers glp_add_cols(glp_prob *lp, int ncs) "
/**
* glp_add_cols - add new columns to problem object .
* SYNOPSIS
* int glp_add_cols(glp_prob *lp, int ncs);
* DESCRIPTION
* The routine glp_add_cols adds ncs columns (structural variables) to the specified problem object. New columns are always added to the end of the column list, so the ordinal numbers of existing columns remain unchanged.
* Being added each new column is initially fixed at zero and has empty list of the constraint coefficients.
* RETURNS
* The routine glp_add_cols returns the ordinal number of the first new column added to the problem object.
*/
public";
%javamethodmodifiers glp_set_row_name(glp_prob *lp, int i, const char *name) "
/**
* glp_set_row_name - assign (change) row name .
* SYNOPSIS
* void glp_set_row_name(glp_prob *lp, int i, const char *name);
* DESCRIPTION
* The routine glp_set_row_name assigns a given symbolic name (1 up to 255 characters) to i-th row (auxiliary variable) of the specified problem object.
* If the parameter name is NULL or empty string, the routine erases an existing name of i-th row.
*/
public";
%javamethodmodifiers glp_set_col_name(glp_prob *lp, int j, const char *name) "
/**
* glp_set_col_name - assign (change) column name .
* SYNOPSIS
* void glp_set_col_name(glp_prob *lp, int j, const char *name);
* DESCRIPTION
* The routine glp_set_col_name assigns a given symbolic name (1 up to 255 characters) to j-th column (structural variable) of the specified problem object.
* If the parameter name is NULL or empty string, the routine erases an existing name of j-th column.
*/
public";
%javamethodmodifiers glp_set_row_bnds(glp_prob *lp, int i, int type, double lb, double ub) "
/**
* glp_set_row_bnds - set (change) row bounds .
* SYNOPSIS
* void glp_set_row_bnds(glp_prob *lp, int i, int type, double lb, double ub);
* DESCRIPTION
* The routine glp_set_row_bnds sets (changes) the type and bounds of i-th row (auxiliary variable) of the specified problem object.
* Parameters type, lb, and ub specify the type, lower bound, and upper bound, respectively, as follows:
* Type Bounds Comments
* GLP_FR -inf < x < +inf Free variable GLP_LO lb <= x < +inf Variable with lower bound GLP_UP -inf < x <= ub Variable with upper bound GLP_DB lb <= x <= ub Double-bounded variable GLP_FX x = lb Fixed variable
* where x is the auxiliary variable associated with i-th row.
* If the row has no lower bound, the parameter lb is ignored. If the row has no upper bound, the parameter ub is ignored. If the row is an equality constraint (i.e. the corresponding auxiliary variable is of fixed type), only the parameter lb is used while the parameter ub is ignored.
*/
public";
%javamethodmodifiers glp_set_col_bnds(glp_prob *lp, int j, int type, double lb, double ub) "
/**
* glp_set_col_bnds - set (change) column bounds .
* SYNOPSIS
* void glp_set_col_bnds(glp_prob *lp, int j, int type, double lb, double ub);
* DESCRIPTION
* The routine glp_set_col_bnds sets (changes) the type and bounds of j-th column (structural variable) of the specified problem object.
* Parameters type, lb, and ub specify the type, lower bound, and upper bound, respectively, as follows:
* Type Bounds Comments
* GLP_FR -inf < x < +inf Free variable GLP_LO lb <= x < +inf Variable with lower bound GLP_UP -inf < x <= ub Variable with upper bound GLP_DB lb <= x <= ub Double-bounded variable GLP_FX x = lb Fixed variable
* where x is the structural variable associated with j-th column.
* If the column has no lower bound, the parameter lb is ignored. If the column has no upper bound, the parameter ub is ignored. If the column is of fixed type, only the parameter lb is used while the parameter ub is ignored.
*/
public";
%javamethodmodifiers glp_set_obj_coef(glp_prob *lp, int j, double coef) "
/**
* glp_set_obj_coef - set (change) obj. .
* coefficient or constant term
* SYNOPSIS
* void glp_set_obj_coef(glp_prob *lp, int j, double coef);
* DESCRIPTION
* The routine glp_set_obj_coef sets (changes) objective coefficient at j-th column (structural variable) of the specified problem object.
* If the parameter j is 0, the routine sets (changes) the constant term (\"shift\") of the objective function.
*/
public";
%javamethodmodifiers glp_set_mat_row(glp_prob *lp, int i, int len, const int ind[], const double val[]) "
/**
* glp_set_mat_row - set (replace) row of the constraint matrix .
* SYNOPSIS
* void glp_set_mat_row(glp_prob *lp, int i, int len, const int ind[], const double val[]);
* DESCRIPTION
* The routine glp_set_mat_row stores (replaces) the contents of i-th row of the constraint matrix of the specified problem object.
* Column indices and numeric values of new row elements must be placed in locations ind[1], ..., ind[len] and val[1], ..., val[len], where 0 <= len <= n is the new length of i-th row, n is the current number of columns in the problem object. Elements with identical column indices are not allowed. Zero elements are allowed, but they are not stored in the constraint matrix.
* If the parameter len is zero, the parameters ind and/or val can be specified as NULL.
*/
public";
%javamethodmodifiers glp_set_mat_col(glp_prob *lp, int j, int len, const int ind[], const double val[]) "
/**
* glp_set_mat_col - set (replace) column of the constraint matrix .
* SYNOPSIS
* void glp_set_mat_col(glp_prob *lp, int j, int len, const int ind[], const double val[]);
* DESCRIPTION
* The routine glp_set_mat_col stores (replaces) the contents of j-th column of the constraint matrix of the specified problem object.
* Row indices and numeric values of new column elements must be placed in locations ind[1], ..., ind[len] and val[1], ..., val[len], where 0 <= len <= m is the new length of j-th column, m is the current number of rows in the problem object. Elements with identical column indices are not allowed. Zero elements are allowed, but they are not stored in the constraint matrix.
* If the parameter len is zero, the parameters ind and/or val can be specified as NULL.
*/
public";
%javamethodmodifiers glp_load_matrix(glp_prob *lp, int ne, const int ia[], const int ja[], const double ar[]) "
/**
* glp_load_matrix - load (replace) the whole constraint matrix .
* SYNOPSIS
* void glp_load_matrix(glp_prob *lp, int ne, const int ia[], const int ja[], const double ar[]);
* DESCRIPTION
* The routine glp_load_matrix loads the constraint matrix passed in the arrays ia, ja, and ar into the specified problem object. Before loading the current contents of the constraint matrix is destroyed.
* Constraint coefficients (elements of the constraint matrix) must be specified as triplets (ia[k], ja[k], ar[k]) for k = 1, ..., ne, where ia[k] is the row index, ja[k] is the column index, ar[k] is a numeric value of corresponding constraint coefficient. The parameter ne specifies the total number of (non-zero) elements in the matrix to be loaded. Coefficients with identical indices are not allowed. Zero coefficients are allowed, however, they are not stored in the constraint matrix.
* If the parameter ne is zero, the parameters ia, ja, and ar can be specified as NULL.
*/
public";
%javamethodmodifiers glp_check_dup(int m, int n, int ne, const int ia[], const int ja[]) "
/**
* glp_check_dup - check for duplicate elements in sparse matrix .
* SYNOPSIS
* int glp_check_dup(int m, int n, int ne, const int ia[], const int ja[]);
* DESCRIPTION
* The routine glp_check_dup checks for duplicate elements (that is, elements with identical indices) in a sparse matrix specified in the coordinate format.
* The parameters m and n specifies, respectively, the number of rows and columns in the matrix, m >= 0, n >= 0.
* The parameter ne specifies the number of (structurally) non-zero elements in the matrix, ne >= 0.
* Elements of the matrix are specified as doublets (ia[k],ja[k]) for k = 1,...,ne, where ia[k] is a row index, ja[k] is a column index.
* The routine glp_check_dup can be used prior to a call to the routine glp_load_matrix to check that the constraint matrix to be loaded has no duplicate elements.
* RETURNS
* The routine glp_check_dup returns one of the following values:
* 0 - the matrix has no duplicate elements;
* -k - indices ia[k] or/and ja[k] are out of range;
* +k - element (ia[k],ja[k]) is duplicate.
*/
public";
%javamethodmodifiers glp_sort_matrix(glp_prob *P) "
/**
* glp_sort_matrix - sort elements of the constraint matrix .
* SYNOPSIS
* void glp_sort_matrix(glp_prob *P);
* DESCRIPTION
* The routine glp_sort_matrix sorts elements of the constraint matrix rebuilding its row and column linked lists. On exit from the routine the constraint matrix is not changed, however, elements in the row linked lists become ordered by ascending column indices, and the elements in the column linked lists become ordered by ascending row indices.
*/
public";
%javamethodmodifiers glp_del_rows(glp_prob *lp, int nrs, const int num[]) "
/**
* glp_del_rows - delete rows from problem object .
* SYNOPSIS
* void glp_del_rows(glp_prob *lp, int nrs, const int num[]);
* DESCRIPTION
* The routine glp_del_rows deletes rows from the specified problem object. Ordinal numbers of rows to be deleted should be placed in locations num[1], ..., num[nrs], where nrs > 0.
* Note that deleting rows involves changing ordinal numbers of other rows remaining in the problem object. New ordinal numbers of the remaining rows are assigned under the assumption that the original order of rows is not changed.
*/
public";
%javamethodmodifiers glp_del_cols(glp_prob *lp, int ncs, const int num[]) "
/**
* glp_del_cols - delete columns from problem object .
* SYNOPSIS
* void glp_del_cols(glp_prob *lp, int ncs, const int num[]);
* DESCRIPTION
* The routine glp_del_cols deletes columns from the specified problem object. Ordinal numbers of columns to be deleted should be placed in locations num[1], ..., num[ncs], where ncs > 0.
* Note that deleting columns involves changing ordinal numbers of other columns remaining in the problem object. New ordinal numbers of the remaining columns are assigned under the assumption that the original order of columns is not changed.
*/
public";
%javamethodmodifiers glp_copy_prob(glp_prob *dest, glp_prob *prob, int names) "
/**
* glp_copy_prob - copy problem object content .
* SYNOPSIS
* void glp_copy_prob(glp_prob *dest, glp_prob *prob, int names);
* DESCRIPTION
* The routine glp_copy_prob copies the content of the problem object prob to the problem object dest.
* The parameter names is a flag. If it is non-zero, the routine also copies all symbolic names; otherwise, if it is zero, symbolic names are not copied.
*/
public";
%javamethodmodifiers delete_prob(glp_prob *lp) "
/**
* glp_erase_prob - erase problem object content .
* glp_delete_prob - delete problem object
* SYNOPSIS
* void glp_erase_prob(glp_prob *lp);
* DESCRIPTION
* The routine glp_erase_prob erases the content of the specified problem object. The effect of this operation is the same as if the problem object would be deleted with the routine glp_delete_prob and then created anew with the routine glp_create_prob, with exception that the handle (pointer) to the problem object remains valid.
* SYNOPSIS
* void glp_delete_prob(glp_prob *lp);
* DESCRIPTION
* The routine glp_delete_prob deletes the specified problem object and frees all the memory allocated to it.
*/
public";
%javamethodmodifiers glp_erase_prob(glp_prob *lp) "
/**
*/
public";
%javamethodmodifiers glp_delete_prob(glp_prob *lp) "
/**
*/
public";
%javamethodmodifiers spy_chuzr_sel(SPXLP *lp, const double beta[], double tol, double tol1, int list[]) "
/**
*/
public";
%javamethodmodifiers spy_chuzr_std(SPXLP *lp, const double beta[], int num, const int list[]) "
/**
*/
public";
%javamethodmodifiers spy_alloc_se(SPXLP *lp, SPYSE *se) "
/**
*/
public";
%javamethodmodifiers spy_reset_refsp(SPXLP *lp, SPYSE *se) "
/**
*/
public";
%javamethodmodifiers spy_eval_gamma_i(SPXLP *lp, SPYSE *se, int i) "
/**
*/
public";
%javamethodmodifiers spy_chuzr_pse(SPXLP *lp, SPYSE *se, const double beta[], int num, const int list[]) "
/**
*/
public";
%javamethodmodifiers spy_update_gamma(SPXLP *lp, SPYSE *se, int p, int q, const double trow[], const double tcol[]) "
/**
*/
public";
%javamethodmodifiers spy_free_se(SPXLP *lp, SPYSE *se) "
/**
*/
public";
%javamethodmodifiers spx_init_lp(SPXLP *lp, glp_prob *P, int excl) "
/**
*/
public";
%javamethodmodifiers spx_alloc_lp(SPXLP *lp) "
/**
*/
public";
%javamethodmodifiers spx_build_lp(SPXLP *lp, glp_prob *P, int excl, int shift, int map[]) "
/**
*/
public";
%javamethodmodifiers spx_build_basis(SPXLP *lp, glp_prob *P, const int map[]) "
/**
*/
public";
%javamethodmodifiers spx_store_basis(SPXLP *lp, glp_prob *P, const int map[], int daeh[]) "
/**
*/
public";
%javamethodmodifiers spx_store_sol(SPXLP *lp, glp_prob *P, int shift, const int map[], const int daeh[], const double beta[], const double pi[], const double d[]) "
/**
*/
public";
%javamethodmodifiers spx_free_lp(SPXLP *lp) "
/**
*/
public";
%javamethodmodifiers AMD_defaults(double Control[]) "
/**
*/
public";
%javamethodmodifiers lufint_create(void) "
/**
*/
public";
%javamethodmodifiers lufint_factorize(LUFINT *fi, int n, int(*col)(void *info, int j, int ind[], double val[]), void *info) "
/**
*/
public";
%javamethodmodifiers lufint_delete(LUFINT *fi) "
/**
*/
public";
%javamethodmodifiers ios_proxy_heur(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers glp_ios_reason(glp_tree *tree) "
/**
* glp_ios_reason - determine reason for calling the callback routine .
* SYNOPSIS
* glp_ios_reason(glp_tree *tree);
* RETURNS
* The routine glp_ios_reason returns a code, which indicates why the user-defined callback routine is being called.
*/
public";
%javamethodmodifiers glp_ios_get_prob(glp_tree *tree) "
/**
* glp_ios_get_prob - access the problem object .
* SYNOPSIS
* glp_prob *glp_ios_get_prob(glp_tree *tree);
* DESCRIPTION
* The routine glp_ios_get_prob can be called from the user-defined callback routine to access the problem object, which is used by the MIP solver. It is the original problem object passed to the routine glp_intopt if the MIP presolver is not used; otherwise it is an internal problem object built by the presolver. If the current subproblem exists, LP segment of the problem object corresponds to its LP relaxation.
* RETURNS
* The routine glp_ios_get_prob returns a pointer to the problem object used by the MIP solver.
*/
public";
%javamethodmodifiers glp_ios_tree_size(glp_tree *tree, int *a_cnt, int *n_cnt, int *t_cnt) "
/**
* glp_ios_tree_size - determine size of the branch-and-bound tree .
* SYNOPSIS
* void glp_ios_tree_size(glp_tree *tree, int *a_cnt, int *n_cnt, int *t_cnt);
* DESCRIPTION
* The routine glp_ios_tree_size stores the following three counts which characterize the current size of the branch-and-bound tree:
* a_cnt is the current number of active nodes, i.e. the current size of the active list;
* n_cnt is the current number of all (active and inactive) nodes;
* t_cnt is the total number of nodes including those which have been already removed from the tree. This count is increased whenever a new node appears in the tree and never decreased.
* If some of the parameters a_cnt, n_cnt, t_cnt is a null pointer, the corresponding count is not stored.
*/
public";
%javamethodmodifiers glp_ios_curr_node(glp_tree *tree) "
/**
* glp_ios_curr_node - determine current active subproblem .
* SYNOPSIS
* int glp_ios_curr_node(glp_tree *tree);
* RETURNS
* The routine glp_ios_curr_node returns the reference number of the current active subproblem. However, if the current subproblem does not exist, the routine returns zero.
*/
public";
%javamethodmodifiers glp_ios_next_node(glp_tree *tree, int p) "
/**
* glp_ios_next_node - determine next active subproblem .
* SYNOPSIS
* int glp_ios_next_node(glp_tree *tree, int p);
* RETURNS
* If the parameter p is zero, the routine glp_ios_next_node returns the reference number of the first active subproblem. However, if the tree is empty, zero is returned.
* If the parameter p is not zero, it must specify the reference number of some active subproblem, in which case the routine returns the reference number of the next active subproblem. However, if there is no next active subproblem in the list, zero is returned.
* All subproblems in the active list are ordered chronologically, i.e. subproblem A precedes subproblem B if A was created before B.
*/
public";
%javamethodmodifiers glp_ios_prev_node(glp_tree *tree, int p) "
/**
* glp_ios_prev_node - determine previous active subproblem .
* SYNOPSIS
* int glp_ios_prev_node(glp_tree *tree, int p);
* RETURNS
* If the parameter p is zero, the routine glp_ios_prev_node returns the reference number of the last active subproblem. However, if the tree is empty, zero is returned.
* If the parameter p is not zero, it must specify the reference number of some active subproblem, in which case the routine returns the reference number of the previous active subproblem. However, if there is no previous active subproblem in the list, zero is returned.
* All subproblems in the active list are ordered chronologically, i.e. subproblem A precedes subproblem B if A was created before B.
*/
public";
%javamethodmodifiers glp_ios_up_node(glp_tree *tree, int p) "
/**
* glp_ios_up_node - determine parent subproblem .
* SYNOPSIS
* int glp_ios_up_node(glp_tree *tree, int p);
* RETURNS
* The parameter p must specify the reference number of some (active or inactive) subproblem, in which case the routine iet_get_up_node returns the reference number of its parent subproblem. However, if the specified subproblem is the root of the tree and, therefore, has no parent, the routine returns zero.
*/
public";
%javamethodmodifiers glp_ios_node_level(glp_tree *tree, int p) "
/**
* glp_ios_node_level - determine subproblem level .
* SYNOPSIS
* int glp_ios_node_level(glp_tree *tree, int p);
* RETURNS
* The routine glp_ios_node_level returns the level of the subproblem, whose reference number is p, in the branch-and-bound tree. (The root subproblem has level 0, and the level of any other subproblem is the level of its parent plus one.)
*/
public";
%javamethodmodifiers glp_ios_node_bound(glp_tree *tree, int p) "
/**
* glp_ios_node_bound - determine subproblem local bound .
* SYNOPSIS
* double glp_ios_node_bound(glp_tree *tree, int p);
* RETURNS
* The routine glp_ios_node_bound returns the local bound for (active or inactive) subproblem, whose reference number is p.
* COMMENTS
* The local bound for subproblem p is an lower (minimization) or upper (maximization) bound for integer optimal solution to this subproblem (not to the original problem). This bound is local in the sense that only subproblems in the subtree rooted at node p cannot have better integer feasible solutions.
* On creating a subproblem (due to the branching step) its local bound is inherited from its parent and then may get only stronger (never weaker). For the root subproblem its local bound is initially set to -DBL_MAX (minimization) or +DBL_MAX (maximization) and then improved as the root LP relaxation has been solved.
* Note that the local bound is not necessarily the optimal objective value to corresponding LP relaxation; it may be stronger.
*/
public";
%javamethodmodifiers glp_ios_best_node(glp_tree *tree) "
/**
* glp_ios_best_node - find active subproblem with best local bound .
* SYNOPSIS
* int glp_ios_best_node(glp_tree *tree);
* RETURNS
* The routine glp_ios_best_node returns the reference number of the active subproblem, whose local bound is best (i.e. smallest in case of minimization or largest in case of maximization). However, if the tree is empty, the routine returns zero.
* COMMENTS
* The best local bound is an lower (minimization) or upper (maximization) bound for integer optimal solution to the original MIP problem.
*/
public";
%javamethodmodifiers glp_ios_mip_gap(glp_tree *tree) "
/**
* glp_ios_mip_gap - compute relative MIP gap .
* SYNOPSIS
* double glp_ios_mip_gap(glp_tree *tree);
* DESCRIPTION
* The routine glp_ios_mip_gap computes the relative MIP gap with the following formula:
* gap = |best_mip - best_bnd| / (|best_mip| + DBL_EPSILON),
* where best_mip is the best integer feasible solution found so far, best_bnd is the best (global) bound. If no integer feasible solution has been found yet, gap is set to DBL_MAX.
* RETURNS
* The routine glp_ios_mip_gap returns the relative MIP gap.
*/
public";
%javamethodmodifiers glp_ios_node_data(glp_tree *tree, int p) "
/**
* glp_ios_node_data - access subproblem application-specific data .
* SYNOPSIS
* void *glp_ios_node_data(glp_tree *tree, int p);
* DESCRIPTION
* The routine glp_ios_node_data allows the application accessing a memory block allocated for the subproblem (which may be active or inactive), whose reference number is p.
* The size of the block is defined by the control parameter cb_size passed to the routine glp_intopt. The block is initialized by binary zeros on creating corresponding subproblem, and its contents is kept until the subproblem will be removed from the tree.
* The application may use these memory blocks to store specific data for each subproblem.
* RETURNS
* The routine glp_ios_node_data returns a pointer to the memory block for the specified subproblem. Note that if cb_size = 0, the routine returns a null pointer.
*/
public";
%javamethodmodifiers glp_ios_row_attr(glp_tree *tree, int i, glp_attr *attr) "
/**
* glp_ios_row_attr - retrieve additional row attributes .
* SYNOPSIS
* void glp_ios_row_attr(glp_tree *tree, int i, glp_attr *attr);
* DESCRIPTION
* The routine glp_ios_row_attr retrieves additional attributes of row i and stores them in the structure glp_attr.
*/
public";
%javamethodmodifiers glp_ios_pool_size(glp_tree *tree) "
/**
*/
public";
%javamethodmodifiers glp_ios_add_row(glp_tree *tree, const char *name, int klass, int flags, int len, const int ind[], const double val[], int type, double rhs) "
/**
*/
public";
%javamethodmodifiers glp_ios_del_row(glp_tree *tree, int i) "
/**
*/
public";
%javamethodmodifiers glp_ios_clear_pool(glp_tree *tree) "
/**
*/
public";
%javamethodmodifiers glp_ios_can_branch(glp_tree *tree, int j) "
/**
* glp_ios_can_branch - check if can branch upon specified variable .
* SYNOPSIS
* int glp_ios_can_branch(glp_tree *tree, int j);
* RETURNS
* If j-th variable (column) can be used to branch upon, the routine glp_ios_can_branch returns non-zero, otherwise zero.
*/
public";
%javamethodmodifiers glp_ios_branch_upon(glp_tree *tree, int j, int sel) "
/**
* glp_ios_branch_upon - choose variable to branch upon .
* SYNOPSIS
* void glp_ios_branch_upon(glp_tree *tree, int j, int sel);
* DESCRIPTION
* The routine glp_ios_branch_upon can be called from the user-defined callback routine in response to the reason GLP_IBRANCH to choose a branching variable, whose ordinal number is j. Should note that only variables, for which the routine glp_ios_can_branch returns non-zero, can be used to branch upon.
* The parameter sel is a flag that indicates which branch (subproblem) should be selected next to continue the search:
* GLP_DN_BRNCH - select down-branch; GLP_UP_BRNCH - select up-branch; GLP_NO_BRNCH - use general selection technique.
*/
public";
%javamethodmodifiers glp_ios_select_node(glp_tree *tree, int p) "
/**
* glp_ios_select_node - select subproblem to continue the search .
* SYNOPSIS
* void glp_ios_select_node(glp_tree *tree, int p);
* DESCRIPTION
* The routine glp_ios_select_node can be called from the user-defined callback routine in response to the reason GLP_ISELECT to select an active subproblem, whose reference number is p. The search will be continued from the subproblem selected.
*/
public";
%javamethodmodifiers glp_ios_heur_sol(glp_tree *tree, const double x[]) "
/**
* glp_ios_heur_sol - provide solution found by heuristic .
* SYNOPSIS
* int glp_ios_heur_sol(glp_tree *tree, const double x[]);
* DESCRIPTION
* The routine glp_ios_heur_sol can be called from the user-defined callback routine in response to the reason GLP_IHEUR to provide an integer feasible solution found by a primal heuristic.
* Primal values of all variables (columns) found by the heuristic should be placed in locations x[1], ..., x[n], where n is the number of columns in the original problem object. Note that the routine glp_ios_heur_sol does not check primal feasibility of the solution provided.
* Using the solution passed in the array x the routine computes value of the objective function. If the objective value is better than the best known integer feasible solution, the routine computes values of auxiliary variables (rows) and stores all solution components in the problem object.
* RETURNS
* If the provided solution is accepted, the routine glp_ios_heur_sol returns zero. Otherwise, if the provided solution is rejected, the routine returns non-zero.
*/
public";
%javamethodmodifiers glp_ios_terminate(glp_tree *tree) "
/**
* glp_ios_terminate - terminate the solution process. .
* SYNOPSIS
* void glp_ios_terminate(glp_tree *tree);
* DESCRIPTION
* The routine glp_ios_terminate sets a flag indicating that the MIP solver should prematurely terminate the search.
*/
public";
%javamethodmodifiers spx_chuzc_sel(SPXLP *lp, const double d[], double tol, double tol1, int list[]) "
/**
*/
public";
%javamethodmodifiers spx_chuzc_std(SPXLP *lp, const double d[], int num, const int list[]) "
/**
*/
public";
%javamethodmodifiers spx_alloc_se(SPXLP *lp, SPXSE *se) "
/**
*/
public";
%javamethodmodifiers spx_reset_refsp(SPXLP *lp, SPXSE *se) "
/**
*/
public";
%javamethodmodifiers spx_eval_gamma_j(SPXLP *lp, SPXSE *se, int j) "
/**
*/
public";
%javamethodmodifiers spx_chuzc_pse(SPXLP *lp, SPXSE *se, const double d[], int num, const int list[]) "
/**
*/
public";
%javamethodmodifiers spx_update_gamma(SPXLP *lp, SPXSE *se, int p, int q, const double trow[], const double tcol[]) "
/**
*/
public";
%javamethodmodifiers spx_free_se(SPXLP *lp, SPXSE *se) "
/**
*/
public";
%javamethodmodifiers branch_first(glp_tree *T, int *next) "
/**
* ios_choose_var - select variable to branch on .
* SYNOPSIS
* #include \"glpios.h\" int ios_choose_var(glp_tree *T, int *next);
* The routine ios_choose_var chooses a variable from the candidate list to branch on. Additionally the routine provides a flag stored in the location next to suggests which of the child subproblems should be solved next.
* RETURNS
* The routine ios_choose_var returns the ordinal number of the column choosen.
*/
public";
%javamethodmodifiers branch_last(glp_tree *T, int *next) "
/**
*/
public";
%javamethodmodifiers branch_mostf(glp_tree *T, int *next) "
/**
*/
public";
%javamethodmodifiers branch_drtom(glp_tree *T, int *next) "
/**
*/
public";
%javamethodmodifiers ios_choose_var(glp_tree *T, int *next) "
/**
*/
public";
%javamethodmodifiers ios_pcost_init(glp_tree *tree) "
/**
*/
public";
%javamethodmodifiers eval_degrad(glp_prob *P, int j, double bnd) "
/**
*/
public";
%javamethodmodifiers ios_pcost_update(glp_tree *tree) "
/**
*/
public";
%javamethodmodifiers ios_pcost_free(glp_tree *tree) "
/**
*/
public";
%javamethodmodifiers eval_psi(glp_tree *T, int j, int brnch) "
/**
*/
public";
%javamethodmodifiers progress(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers ios_pcost_branch(glp_tree *T, int *_next) "
/**
*/
public";
%javamethodmodifiers clear_flag(Int wflg, Int wbig, Int W[], Int n) "
/**
*/
public";
%javamethodmodifiers AMD_2(Int n, Int Pe[], Int Iw[], Int Len[], Int iwlen, Int pfree, Int Nv[], Int Next[], Int Last[], Int Head[], Int Elen[], Int Degree[], Int W[], double Control[], double Info[]) "
/**
*/
public";
%javamethodmodifiers errfunc(const char *fmt,...) "
/**
* glp_error - display fatal error message and terminate execution .
* SYNOPSIS
* void glp_error(const char *fmt, ...);
* DESCRIPTION
* The routine glp_error (implemented as a macro) formats its parameters using the format control string fmt, writes the formatted message on the terminal, and abnormally terminates the program.
*/
public";
%javamethodmodifiers glp_error_(const char *file, int line) "
/**
*/
public";
%javamethodmodifiers glp_at_error(void) "
/**
* glp_at_error - check for error state .
* SYNOPSIS
* int glp_at_error(void);
* DESCRIPTION
* The routine glp_at_error checks if the GLPK environment is at error state, i.e. if the call to the routine is (indirectly) made from the glp_error routine via an user-defined hook routine.
* RETURNS
* If the GLPK environment is at error state, the routine glp_at_error returns non-zero, otherwise zero.
*/
public";
%javamethodmodifiers glp_assert_(const char *expr, const char *file, int line) "
/**
* glp_assert - check for logical condition .
* SYNOPSIS
* void glp_assert(int expr);
* DESCRIPTION
* The routine glp_assert (implemented as a macro) checks for a logical condition specified by the parameter expr. If the condition is false (i.e. the value of expr is zero), the routine writes a message on the terminal and abnormally terminates the program.
*/
public";
%javamethodmodifiers glp_error_hook(void(*func)(void *info), void *info) "
/**
* glp_error_hook - install hook to intercept abnormal termination .
* SYNOPSIS
* void glp_error_hook(void (*func)(void *info), void *info);
* DESCRIPTION
* The routine glp_error_hook installs a user-defined hook routine to intercept abnormal termination.
* The parameter func specifies the user-defined hook routine. It is called from the routine glp_error before the latter calls the abort function to abnormally terminate the application program because of fatal error. The parameter info is a transit pointer, specified in the corresponding call to the routine glp_error_hook; it may be used to pass some information to the hook routine.
* To uninstall the hook routine the parameters func and info should be both specified as NULL.
*/
public";
%javamethodmodifiers put_err_msg(const char *msg) "
/**
* put_err_msg - provide error message string .
* SYNOPSIS
* #include \"env.h\" void put_err_msg(const char *msg);
* DESCRIPTION
* The routine put_err_msg stores an error message string pointed to by msg to the environment block.
*/
public";
%javamethodmodifiers get_err_msg(void) "
/**
* get_err_msg - obtain error message string .
* SYNOPSIS
* #include \"env.h\" const char *get_err_msg(void);
* RETURNS
* The routine get_err_msg returns a pointer to an error message string previously stored by the routine put_err_msg.
*/
public";
%javamethodmodifiers create_graph(glp_graph *G, int v_size, int a_size) "
/**
* glp_create_graph - create graph .
* SYNOPSIS
* glp_graph *glp_create_graph(int v_size, int a_size);
* DESCRIPTION
* The routine creates a new graph, which initially is empty, i.e. has no vertices and arcs.
* The parameter v_size specifies the size of data associated with each vertex of the graph (0 to 256 bytes).
* The parameter a_size specifies the size of data associated with each arc of the graph (0 to 256 bytes).
* RETURNS
* The routine returns a pointer to the graph created.
*/
public";
%javamethodmodifiers glp_create_graph(int v_size, int a_size) "
/**
*/
public";
%javamethodmodifiers glp_set_graph_name(glp_graph *G, const char *name) "
/**
* glp_set_graph_name - assign (change) graph name .
* SYNOPSIS
* void glp_set_graph_name(glp_graph *G, const char *name);
* DESCRIPTION
* The routine glp_set_graph_name assigns a symbolic name specified by the character string name (1 to 255 chars) to the graph.
* If the parameter name is NULL or an empty string, the routine erases the existing symbolic name of the graph.
*/
public";
%javamethodmodifiers glp_add_vertices(glp_graph *G, int nadd) "
/**
* glp_add_vertices - add new vertices to graph .
* SYNOPSIS
* int glp_add_vertices(glp_graph *G, int nadd);
* DESCRIPTION
* The routine glp_add_vertices adds nadd vertices to the specified graph. New vertices are always added to the end of the vertex list, so ordinal numbers of existing vertices remain unchanged.
* Being added each new vertex is isolated (has no incident arcs).
* RETURNS
* The routine glp_add_vertices returns an ordinal number of the first new vertex added to the graph.
*/
public";
%javamethodmodifiers glp_set_vertex_name(glp_graph *G, int i, const char *name) "
/**
*/
public";
%javamethodmodifiers glp_add_arc(glp_graph *G, int i, int j) "
/**
* glp_add_arc - add new arc to graph .
* SYNOPSIS
* glp_arc *glp_add_arc(glp_graph *G, int i, int j);
* DESCRIPTION
* The routine glp_add_arc adds a new arc to the specified graph.
* The parameters i and j specify the ordinal numbers of, resp., tail and head vertices of the arc. Note that self-loops and multiple arcs are allowed.
* RETURNS
* The routine glp_add_arc returns a pointer to the arc added.
*/
public";
%javamethodmodifiers glp_del_vertices(glp_graph *G, int ndel, const int num[]) "
/**
* glp_del_vertices - delete vertices from graph .
* SYNOPSIS
* void glp_del_vertices(glp_graph *G, int ndel, const int num[]);
* DESCRIPTION
* The routine glp_del_vertices deletes vertices along with all incident arcs from the specified graph. Ordinal numbers of vertices to be deleted should be placed in locations num[1], ..., num[ndel], ndel > 0.
* Note that deleting vertices involves changing ordinal numbers of other vertices remaining in the graph. New ordinal numbers of the remaining vertices are assigned under the assumption that the original order of vertices is not changed.
*/
public";
%javamethodmodifiers glp_del_arc(glp_graph *G, glp_arc *a) "
/**
* glp_del_arc - delete arc from graph .
* SYNOPSIS
* void glp_del_arc(glp_graph *G, glp_arc *a);
* DESCRIPTION
* The routine glp_del_arc deletes an arc from the specified graph. The arc to be deleted must exist.
*/
public";
%javamethodmodifiers delete_graph(glp_graph *G) "
/**
* glp_erase_graph - erase graph content .
* SYNOPSIS
* void glp_erase_graph(glp_graph *G, int v_size, int a_size);
* DESCRIPTION
* The routine glp_erase_graph erases the content of the specified graph. The effect of this operation is the same as if the graph would be deleted with the routine glp_delete_graph and then created anew with the routine glp_create_graph, with exception that the handle (pointer) to the graph remains valid.
*/
public";
%javamethodmodifiers glp_erase_graph(glp_graph *G, int v_size, int a_size) "
/**
*/
public";
%javamethodmodifiers glp_delete_graph(glp_graph *G) "
/**
* glp_delete_graph - delete graph .
* SYNOPSIS
* void glp_delete_graph(glp_graph *G);
* DESCRIPTION
* The routine glp_delete_graph deletes the specified graph and frees all the memory allocated to this program object.
*/
public";
%javamethodmodifiers glp_create_v_index(glp_graph *G) "
/**
*/
public";
%javamethodmodifiers glp_find_vertex(glp_graph *G, const char *name) "
/**
*/
public";
%javamethodmodifiers glp_delete_v_index(glp_graph *G) "
/**
*/
public";
%javamethodmodifiers glp_read_graph(glp_graph *G, const char *fname) "
/**
* glp_read_graph - read graph from plain text file .
* SYNOPSIS
* int glp_read_graph(glp_graph *G, const char *fname);
* DESCRIPTION
* The routine glp_read_graph reads a graph from a plain text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers glp_write_graph(glp_graph *G, const char *fname) "
/**
* glp_write_graph - write graph to plain text file .
* SYNOPSIS
* int glp_write_graph(glp_graph *G, const char *fname).
* DESCRIPTION
* The routine glp_write_graph writes the specified graph to a plain text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers str2num(const char *str, double *val_) "
/**
* str2num - convert character string to value of double type .
* SYNOPSIS
* #include \"misc.h\" int str2num(const char *str, double *val);
* DESCRIPTION
* The routine str2num converts the character string str to a value of double type and stores the value into location, which the parameter val points to (in the case of error content of this location is not changed).
* RETURNS
* The routine returns one of the following error codes:
* 0 - no error; 1 - value out of range; 2 - character string is syntactically incorrect.
*/
public";
%javamethodmodifiers assign_capacities(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers assign_costs(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers assign_imbalance(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers exponential(struct csa *csa, double lambda[1]) "
/**
*/
public";
%javamethodmodifiers gen_additional_arcs(struct csa *csa, struct arcs *arc_ptr) "
/**
*/
public";
%javamethodmodifiers gen_basic_grid(struct csa *csa, struct arcs *arc_ptr) "
/**
*/
public";
%javamethodmodifiers gen_more_arcs(struct csa *csa, struct arcs *arc_ptr) "
/**
*/
public";
%javamethodmodifiers generate(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers output(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers randy(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers select_source_sinks(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers uniform(struct csa *csa, double a[2]) "
/**
*/
public";
%javamethodmodifiers glp_gridgen(glp_graph *G_, int _v_rhs, int _a_cap, int _a_cost, const int parm[1+14]) "
/**
*/
public";
%javamethodmodifiers fp2rat(double x, double eps, double *p, double *q) "
/**
* fp2rat - convert floating-point number to rational number .
* SYNOPSIS
* #include \"misc.h\" int fp2rat(double x, double eps, double *p, double *q);
* DESCRIPTION
* Given a floating-point number 0 <= x < 1 the routine fp2rat finds its \"best\" rational approximation p / q, where p >= 0 and q > 0 are integer numbers, such that |x - p / q| <= eps.
* RETURNS
* The routine fp2rat returns the number of iterations used to achieve the specified precision eps.
* EXAMPLES
* For x = sqrt(2) - 1 = 0.414213562373095 and eps = 1e-6 the routine gives p = 408 and q = 985, where 408 / 985 = 0.414213197969543.
* BACKGROUND
* It is well known that every positive real number x can be expressed as the following continued fraction:
* x = b[0] + a[1]
* b[1] + a[2]
* b[2] + a[3]
* b[3] + ...
* where:
* a[k] = 1, k = 0, 1, 2, ...
* b[k] = floor(x[k]), k = 0, 1, 2, ...
* x[0] = x,
* x[k] = 1 / frac(x[k-1]), k = 1, 2, 3, ...
* To find the \"best\" rational approximation of x the routine computes partial fractions f[k] by dropping after k terms as follows:
* f[k] = A[k] / B[k],
* where:
* A[-1] = 1, A[0] = b[0], B[-1] = 0, B[0] = 1,
* A[k] = b[k] * A[k-1] + a[k] * A[k-2],
* B[k] = b[k] * B[k-1] + a[k] * B[k-2].
* Once the condition
* |x - f[k]| <= eps
* has been satisfied, the routine reports p = A[k] and q = B[k] as the final answer.
* In the table below here is some statistics obtained for one million random numbers uniformly distributed in the range [0, 1). eps max p mean p max q mean q max k mean k
1e-1 8 1.6 9 3.2 3 1.4 1e-2 98 6.2 99 12.4 5 2.4 1e-3 997 20.7 998 41.5 8 3.4 1e-4 9959 66.6 9960 133.5 10 4.4 1e-5 97403 211.7 97404 424.2 13 5.3 1e-6 479669 669.9 479670 1342.9 15 6.3 1e-7 1579030 2127.3 3962146 4257.8 16 7.3 1e-8 26188823 6749.4 26188824 13503.4 19 8.2
* REFERENCES
* W. B. Jones and W. J. Thron, \"Continued Fractions: Analytic Theory
and Applications,\" Encyclopedia on Mathematics and Its Applications, Addison-Wesley, 1980.
*/
public";
%javamethodmodifiers scfint_create(int type) "
/**
*/
public";
%javamethodmodifiers scfint_factorize(SCFINT *fi, int n, int(*col)(void *info, int j, int ind[], double val[]), void *info) "
/**
*/
public";
%javamethodmodifiers scfint_update(SCFINT *fi, int upd, int j, int len, const int ind[], const double val[]) "
/**
*/
public";
%javamethodmodifiers scfint_ftran(SCFINT *fi, double x[]) "
/**
*/
public";
%javamethodmodifiers scfint_btran(SCFINT *fi, double x[]) "
/**
*/
public";
%javamethodmodifiers scfint_estimate(SCFINT *fi) "
/**
*/
public";
%javamethodmodifiers scfint_delete(SCFINT *fi) "
/**
*/
public";
%javamethodmodifiers set_row_attrib(glp_tree *tree, struct MIR *mir) "
/**
* ios_mir_init - initialize MIR cut generator .
* SYNOPSIS
* #include \"glpios.h\" void *ios_mir_init(glp_tree *tree);
* DESCRIPTION
* The routine ios_mir_init initializes the MIR cut generator assuming that the current subproblem is the root subproblem.
* RETURNS
* The routine ios_mir_init returns a pointer to the MIR cut generator working area.
*/
public";
%javamethodmodifiers set_col_attrib(glp_tree *tree, struct MIR *mir) "
/**
*/
public";
%javamethodmodifiers set_var_bounds(glp_tree *tree, struct MIR *mir) "
/**
*/
public";
%javamethodmodifiers mark_useless_rows(glp_tree *tree, struct MIR *mir) "
/**
*/
public";
%javamethodmodifiers ios_mir_init(glp_tree *tree) "
/**
*/
public";
%javamethodmodifiers get_current_point(glp_tree *tree, struct MIR *mir) "
/**
* ios_mir_gen - generate MIR cuts .
* SYNOPSIS
* #include \"glpios.h\" void ios_mir_gen(glp_tree *tree, void *gen, IOSPOOL *pool);
* DESCRIPTION
* The routine ios_mir_gen generates MIR cuts for the current point and adds them to the cut pool.
*/
public";
%javamethodmodifiers initial_agg_row(glp_tree *tree, struct MIR *mir, int i) "
/**
*/
public";
%javamethodmodifiers subst_fixed_vars(struct MIR *mir) "
/**
*/
public";
%javamethodmodifiers bound_subst_heur(struct MIR *mir) "
/**
*/
public";
%javamethodmodifiers build_mod_row(struct MIR *mir) "
/**
*/
public";
%javamethodmodifiers mir_ineq(const int n, const double a[], const double b, double alpha[], double *beta, double *gamma) "
/**
*/
public";
%javamethodmodifiers cmir_ineq(const int n, const double a[], const double b, const double u[], const char cset[], const double delta, double alpha[], double *beta, double *gamma) "
/**
*/
public";
%javamethodmodifiers cmir_cmp(const void *p1, const void *p2) "
/**
*/
public";
%javamethodmodifiers cmir_sep(const int n, const double a[], const double b, const double u[], const double x[], const double s, double alpha[], double *beta, double *gamma) "
/**
*/
public";
%javamethodmodifiers generate(struct MIR *mir) "
/**
*/
public";
%javamethodmodifiers back_subst(struct MIR *mir) "
/**
*/
public";
%javamethodmodifiers subst_aux_vars(glp_tree *tree, struct MIR *mir) "
/**
*/
public";
%javamethodmodifiers add_cut(glp_tree *tree, struct MIR *mir) "
/**
*/
public";
%javamethodmodifiers aggregate_row(glp_tree *tree, struct MIR *mir) "
/**
*/
public";
%javamethodmodifiers ios_mir_gen(glp_tree *tree, void *gen) "
/**
*/
public";
%javamethodmodifiers ios_mir_term(void *gen) "
/**
* ios_mir_term - terminate MIR cut generator .
* SYNOPSIS
* #include \"glpios.h\" void ios_mir_term(void *gen);
* DESCRIPTION
* The routine ios_mir_term deletes the MIR cut generator working area freeing all the memory allocated to it.
*/
public";
%javamethodmodifiers gzclose(gzFile file) "
/**
*/
public";
%javamethodmodifiers error(struct csa *csa, const char *fmt,...) "
/**
*/
public";
%javamethodmodifiers warning(struct csa *csa, const char *fmt,...) "
/**
*/
public";
%javamethodmodifiers read_char(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers read_designator(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers read_field(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers end_of_line(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers check_int(struct csa *csa, double num) "
/**
*/
public";
%javamethodmodifiers glp_read_mincost(glp_graph *G, int v_rhs, int a_low, int a_cap, int a_cost, const char *fname) "
/**
* glp_read_mincost - read min-cost flow problem data in DIMACS format .
* SYNOPSIS
* int glp_read_mincost(glp_graph *G, int v_rhs, int a_low, int a_cap, int a_cost, const char *fname);
* DESCRIPTION
* The routine glp_read_mincost reads minimum cost flow problem data in DIMACS format from a text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers glp_write_mincost(glp_graph *G, int v_rhs, int a_low, int a_cap, int a_cost, const char *fname) "
/**
* glp_write_mincost - write min-cost flow problem data in DIMACS format .
* SYNOPSIS
* int glp_write_mincost(glp_graph *G, int v_rhs, int a_low, int a_cap, int a_cost, const char *fname);
* DESCRIPTION
* The routine glp_write_mincost writes minimum cost flow problem data in DIMACS format to a text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers glp_read_maxflow(glp_graph *G, int *_s, int *_t, int a_cap, const char *fname) "
/**
* glp_read_maxflow - read maximum flow problem data in DIMACS format .
* SYNOPSIS
* int glp_read_maxflow(glp_graph *G, int *s, int *t, int a_cap, const char *fname);
* DESCRIPTION
* The routine glp_read_maxflow reads maximum flow problem data in DIMACS format from a text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers glp_write_maxflow(glp_graph *G, int s, int t, int a_cap, const char *fname) "
/**
* glp_write_maxflow - write maximum flow problem data in DIMACS format .
* SYNOPSIS
* int glp_write_maxflow(glp_graph *G, int s, int t, int a_cap, const char *fname);
* DESCRIPTION
* The routine glp_write_maxflow writes maximum flow problem data in DIMACS format to a text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers glp_read_asnprob(glp_graph *G, int v_set, int a_cost, const char *fname) "
/**
* glp_read_asnprob - read assignment problem data in DIMACS format .
* SYNOPSIS
* int glp_read_asnprob(glp_graph *G, int v_set, int a_cost, const char *fname);
* DESCRIPTION
* The routine glp_read_asnprob reads assignment problem data in DIMACS format from a text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers glp_write_asnprob(glp_graph *G, int v_set, int a_cost, const char *fname) "
/**
* glp_write_asnprob - write assignment problem data in DIMACS format .
* SYNOPSIS
* int glp_write_asnprob(glp_graph *G, int v_set, int a_cost, const char *fname);
* DESCRIPTION
* The routine glp_write_asnprob writes assignment problem data in DIMACS format to a text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers glp_read_ccdata(glp_graph *G, int v_wgt, const char *fname) "
/**
* glp_read_ccdata - read graph in DIMACS clique/coloring format .
* SYNOPSIS
* int glp_read_ccdata(glp_graph *G, int v_wgt, const char *fname);
* DESCRIPTION
* The routine glp_read_ccdata reads an (undirected) graph in DIMACS clique/coloring format from a text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers glp_write_ccdata(glp_graph *G, int v_wgt, const char *fname) "
/**
* glp_write_ccdata - write graph in DIMACS clique/coloring format .
* SYNOPSIS
* int glp_write_ccdata(glp_graph *G, int v_wgt, const char *fname);
* DESCRIPTION
* The routine glp_write_ccdata writes the specified graph in DIMACS clique/coloring format to a text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers glp_read_prob(glp_prob *P, int flags, const char *fname) "
/**
* glp_read_prob - read problem data in GLPK format .
* SYNOPSIS
* int glp_read_prob(glp_prob *P, int flags, const char *fname);
* The routine glp_read_prob reads problem data in GLPK LP/MIP format from a text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers glp_write_prob(glp_prob *P, int flags, const char *fname) "
/**
* glp_write_prob - write problem data in GLPK format .
* SYNOPSIS
* int glp_write_prob(glp_prob *P, int flags, const char *fname);
* The routine glp_write_prob writes problem data in GLPK LP/MIP format to a text file.
* RETURNS
* If the operation was successful, the routine returns zero. Otherwise it prints an error message and returns non-zero.
*/
public";
%javamethodmodifiers glp_read_cnfsat(glp_prob *P, const char *fname) "
/**
*/
public";
%javamethodmodifiers glp_check_cnfsat(glp_prob *P) "
/**
*/
public";
%javamethodmodifiers glp_write_cnfsat(glp_prob *P, const char *fname) "
/**
*/
public";
%javamethodmodifiers AMD_control(double Control[]) "
/**
*/
public";
%javamethodmodifiers spm_create_mat(int m, int n) "
/**
* spm_create_mat - create general sparse matrix .
* SYNOPSIS
* #include \"glpspm.h\" SPM *spm_create_mat(int m, int n);
* DESCRIPTION
* The routine spm_create_mat creates a general sparse matrix having m rows and n columns. Being created the matrix is zero (empty), i.e. has no elements.
* RETURNS
* The routine returns a pointer to the matrix created.
*/
public";
%javamethodmodifiers spm_new_elem(SPM *A, int i, int j, double val) "
/**
* spm_new_elem - add new element to sparse matrix .
* SYNOPSIS
* #include \"glpspm.h\" SPME *spm_new_elem(SPM *A, int i, int j, double val);
* DESCRIPTION
* The routine spm_new_elem adds a new element to the specified sparse matrix. Parameters i, j, and val specify the row number, the column number, and a numerical value of the element, respectively.
* RETURNS
* The routine returns a pointer to the new element added.
*/
public";
%javamethodmodifiers spm_delete_mat(SPM *A) "
/**
* spm_delete_mat - delete general sparse matrix .
* SYNOPSIS
* #include \"glpspm.h\" void spm_delete_mat(SPM *A);
* DESCRIPTION
* The routine deletes the specified general sparse matrix freeing all the memory allocated to this object.
*/
public";
%javamethodmodifiers spm_test_mat_e(int n, int c) "
/**
* spm_test_mat_e - create test sparse matrix of E(n,c) class .
* SYNOPSIS
* #include \"glpspm.h\" SPM *spm_test_mat_e(int n, int c);
* DESCRIPTION
* The routine spm_test_mat_e creates a test sparse matrix of E(n,c) class as described in the book: Ole 0sterby, Zahari Zlatev. Direct Methods for Sparse Matrices. Springer-Verlag, 1983.
* Matrix of E(n,c) class is a symmetric positive definite matrix of the order n. It has the number 4 on its main diagonal and the number -1 on its four co-diagonals, two of which are neighbour to the main diagonal and two others are shifted from the main diagonal on the distance c.
* It is necessary that n >= 3 and 2 <= c <= n-1.
* RETURNS
* The routine returns a pointer to the matrix created.
*/
public";
%javamethodmodifiers spm_test_mat_d(int n, int c) "
/**
* spm_test_mat_d - create test sparse matrix of D(n,c) class .
* SYNOPSIS
* #include \"glpspm.h\" SPM *spm_test_mat_d(int n, int c);
* DESCRIPTION
* The routine spm_test_mat_d creates a test sparse matrix of D(n,c) class as described in the book: Ole 0sterby, Zahari Zlatev. Direct Methods for Sparse Matrices. Springer-Verlag, 1983.
* Matrix of D(n,c) class is a non-singular matrix of the order n. It has unity main diagonal, three co-diagonals above the main diagonal on the distance c, which are cyclically continued below the main diagonal, and a triangle block of the size 10x10 in the upper right corner.
* It is necessary that n >= 14 and 1 <= c <= n-13.
* RETURNS
* The routine returns a pointer to the matrix created.
*/
public";
%javamethodmodifiers spm_show_mat(const SPM *A, const char *fname) "
/**
* spm_show_mat - write sparse matrix pattern in BMP file format .
* SYNOPSIS
* #include \"glpspm.h\" int spm_show_mat(const SPM *A, const char *fname);
* DESCRIPTION
* The routine spm_show_mat writes pattern of the specified sparse matrix in uncompressed BMP file format (Windows bitmap) to a binary file whose name is specified by the character string fname.
* Each pixel corresponds to one matrix element. The pixel colors have the following meaning:
* Black structurally zero element White positive element Cyan negative element Green zero element Red duplicate element
* RETURNS
* If no error occured, the routine returns zero. Otherwise, it prints an appropriate error message and returns non-zero.
*/
public";
%javamethodmodifiers spm_read_hbm(const char *fname) "
/**
* spm_read_hbm - read sparse matrix in Harwell-Boeing format .
* SYNOPSIS
* #include \"glpspm.h\" SPM *spm_read_hbm(const char *fname);
* DESCRIPTION
* The routine spm_read_hbm reads a sparse matrix in the Harwell-Boeing format from a text file whose name is the character string fname.
* Detailed description of the Harwell-Boeing format recognised by this routine can be found in the following report:
* I.S.Duff, R.G.Grimes, J.G.Lewis. User's Guide for the Harwell-Boeing Sparse Matrix Collection (Release I), TR/PA/92/86, October 1992.
* NOTE
* The routine spm_read_hbm reads the matrix \"as is\", due to which zero and/or duplicate elements can appear in the matrix.
* RETURNS
* If no error occured, the routine returns a pointer to the matrix created. Otherwise, the routine prints an appropriate error message and returns NULL.
*/
public";
%javamethodmodifiers spm_count_nnz(const SPM *A) "
/**
* spm_count_nnz - determine number of non-zeros in sparse matrix .
* SYNOPSIS
* #include \"glpspm.h\" int spm_count_nnz(const SPM *A);
* RETURNS
* The routine spm_count_nnz returns the number of structural non-zero elements in the specified sparse matrix.
*/
public";
%javamethodmodifiers spm_drop_zeros(SPM *A, double eps) "
/**
* spm_drop_zeros - remove zero elements from sparse matrix .
* SYNOPSIS
* #include \"glpspm.h\" int spm_drop_zeros(SPM *A, double eps);
* DESCRIPTION
* The routine spm_drop_zeros removes all elements from the specified sparse matrix, whose absolute value is less than eps.
* If the parameter eps is 0, only zero elements are removed from the matrix.
* RETURNS
* The routine returns the number of elements removed.
*/
public";
%javamethodmodifiers spm_read_mat(const char *fname) "
/**
* spm_read_mat - read sparse matrix from text file .
* SYNOPSIS
* #include \"glpspm.h\" SPM *spm_read_mat(const char *fname);
* DESCRIPTION
* The routine reads a sparse matrix from a text file whose name is specified by the parameter fname.
* For the file format see description of the routine spm_write_mat.
* RETURNS
* On success the routine returns a pointer to the matrix created, otherwise NULL.
*/
public";
%javamethodmodifiers spm_write_mat(const SPM *A, const char *fname) "
/**
* spm_write_mat - write sparse matrix to text file .
* SYNOPSIS
* #include \"glpspm.h\" int spm_write_mat(const SPM *A, const char *fname);
* DESCRIPTION
* The routine spm_write_mat writes the specified sparse matrix to a text file whose name is specified by the parameter fname. This file can be read back with the routine spm_read_mat.
* RETURNS
* On success the routine returns zero, otherwise non-zero.
* FILE FORMAT
* The file created by the routine spm_write_mat is a plain text file, which contains the following information:
* m n nnz row[1] col[1] val[1] row[2] col[2] val[2] . . . row[nnz] col[nnz] val[nnz]
* where: m is the number of rows; n is the number of columns; nnz is the number of non-zeros; row[k], k = 1,...,nnz, are row indices; col[k], k = 1,...,nnz, are column indices; val[k], k = 1,...,nnz, are element values.
*/
public";
%javamethodmodifiers spm_transpose(const SPM *A) "
/**
* spm_transpose - transpose sparse matrix .
* SYNOPSIS
* #include \"glpspm.h\" SPM *spm_transpose(const SPM *A);
* RETURNS
* The routine computes and returns sparse matrix B, which is a matrix transposed to sparse matrix A.
*/
public";
%javamethodmodifiers spm_add_sym(const SPM *A, const SPM *B) "
/**
*/
public";
%javamethodmodifiers spm_add_num(SPM *C, double alfa, const SPM *A, double beta, const SPM *B) "
/**
*/
public";
%javamethodmodifiers spm_add_mat(double alfa, const SPM *A, double beta, const SPM *B) "
/**
*/
public";
%javamethodmodifiers spm_mul_sym(const SPM *A, const SPM *B) "
/**
*/
public";
%javamethodmodifiers spm_mul_num(SPM *C, const SPM *A, const SPM *B) "
/**
*/
public";
%javamethodmodifiers spm_mul_mat(const SPM *A, const SPM *B) "
/**
*/
public";
%javamethodmodifiers spm_create_per(int n) "
/**
*/
public";
%javamethodmodifiers spm_check_per(PER *P) "
/**
*/
public";
%javamethodmodifiers spm_delete_per(PER *P) "
/**
*/
public";
%javamethodmodifiers glp_check_kkt(glp_prob *P, int sol, int cond, double *_ae_max, int *_ae_ind, double *_re_max, int *_re_ind) "
/**
*/
public";
%javamethodmodifiers create_slice(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expand_slice(MPL *mpl, SLICE *slice, SYMBOL *sym) "
/**
*/
public";
%javamethodmodifiers slice_dimen(MPL *mpl, SLICE *slice) "
/**
*/
public";
%javamethodmodifiers slice_arity(MPL *mpl, SLICE *slice) "
/**
*/
public";
%javamethodmodifiers fake_slice(MPL *mpl, int dim) "
/**
*/
public";
%javamethodmodifiers delete_slice(MPL *mpl, SLICE *slice) "
/**
*/
public";
%javamethodmodifiers is_number(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers is_symbol(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers is_literal(MPL *mpl, char *literal) "
/**
*/
public";
%javamethodmodifiers read_number(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers read_symbol(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers read_slice(MPL *mpl, char *name, int dim) "
/**
*/
public";
%javamethodmodifiers select_set(MPL *mpl, char *name) "
/**
*/
public";
%javamethodmodifiers simple_format(MPL *mpl, SET *set, MEMBER *memb, SLICE *slice) "
/**
*/
public";
%javamethodmodifiers matrix_format(MPL *mpl, SET *set, MEMBER *memb, SLICE *slice, int tr) "
/**
*/
public";
%javamethodmodifiers set_data(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers select_parameter(MPL *mpl, char *name) "
/**
*/
public";
%javamethodmodifiers set_default(MPL *mpl, PARAMETER *par, SYMBOL *altval) "
/**
*/
public";
%javamethodmodifiers read_value(MPL *mpl, PARAMETER *par, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers plain_format(MPL *mpl, PARAMETER *par, SLICE *slice) "
/**
*/
public";
%javamethodmodifiers tabular_format(MPL *mpl, PARAMETER *par, SLICE *slice, int tr) "
/**
*/
public";
%javamethodmodifiers tabbing_format(MPL *mpl, SYMBOL *altval) "
/**
*/
public";
%javamethodmodifiers parameter_data(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers data_section(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers ios_create_vec(int n) "
/**
* ios_create_vec - create sparse vector .
* SYNOPSIS
* #include \"glpios.h\" IOSVEC *ios_create_vec(int n);
* DESCRIPTION
* The routine ios_create_vec creates a sparse vector of dimension n, which initially is a null vector.
* RETURNS
* The routine returns a pointer to the vector created.
*/
public";
%javamethodmodifiers ios_check_vec(IOSVEC *v) "
/**
* ios_check_vec - check that sparse vector has correct representation .
* SYNOPSIS
* #include \"glpios.h\" void ios_check_vec(IOSVEC *v);
* DESCRIPTION
* The routine ios_check_vec checks that a sparse vector specified by the parameter v has correct representation.
* NOTE
* Complexity of this operation is O(n).
*/
public";
%javamethodmodifiers ios_get_vj(IOSVEC *v, int j) "
/**
* ios_get_vj - retrieve component of sparse vector .
* SYNOPSIS
* #include \"glpios.h\" double ios_get_vj(IOSVEC *v, int j);
* RETURNS
* The routine ios_get_vj returns j-th component of a sparse vector specified by the parameter v.
*/
public";
%javamethodmodifiers ios_set_vj(IOSVEC *v, int j, double val) "
/**
* ios_set_vj - set/change component of sparse vector .
* SYNOPSIS
* #include \"glpios.h\" void ios_set_vj(IOSVEC *v, int j, double val);
* DESCRIPTION
* The routine ios_set_vj assigns val to j-th component of a sparse vector specified by the parameter v.
*/
public";
%javamethodmodifiers ios_clear_vec(IOSVEC *v) "
/**
* ios_clear_vec - set all components of sparse vector to zero .
* SYNOPSIS
* #include \"glpios.h\" void ios_clear_vec(IOSVEC *v);
* DESCRIPTION
* The routine ios_clear_vec sets all components of a sparse vector specified by the parameter v to zero.
*/
public";
%javamethodmodifiers ios_clean_vec(IOSVEC *v, double eps) "
/**
* ios_clean_vec - remove zero or small components from sparse vector .
* SYNOPSIS
* #include \"glpios.h\" void ios_clean_vec(IOSVEC *v, double eps);
* DESCRIPTION
* The routine ios_clean_vec removes zero components and components whose magnitude is less than eps from a sparse vector specified by the parameter v. If eps is 0.0, only zero components are removed.
*/
public";
%javamethodmodifiers ios_copy_vec(IOSVEC *x, IOSVEC *y) "
/**
* ios_copy_vec - copy sparse vector (x := y) .
* SYNOPSIS
* #include \"glpios.h\" void ios_copy_vec(IOSVEC *x, IOSVEC *y);
* DESCRIPTION
* The routine ios_copy_vec copies a sparse vector specified by the parameter y to a sparse vector specified by the parameter x.
*/
public";
%javamethodmodifiers ios_linear_comb(IOSVEC *x, double a, IOSVEC *y) "
/**
* ios_linear_comb - compute linear combination (x := x + a * y) .
* SYNOPSIS
* #include \"glpios.h\" void ios_linear_comb(IOSVEC *x, double a, IOSVEC *y);
* DESCRIPTION
* The routine ios_linear_comb computes the linear combination
* x := x + a * y,
* where x and y are sparse vectors, a is a scalar.
*/
public";
%javamethodmodifiers ios_delete_vec(IOSVEC *v) "
/**
* ios_delete_vec - delete sparse vector .
* SYNOPSIS
* #include \"glpios.h\" void ios_delete_vec(IOSVEC *v);
* DESCRIPTION
* The routine ios_delete_vec deletes a sparse vector specified by the parameter v freeing all the memory allocated to this object.
*/
public";
%javamethodmodifiers bfd_create_it(void) "
/**
*/
public";
%javamethodmodifiers bfd_get_bfcp(BFD *bfd, void *parm) "
/**
*/
public";
%javamethodmodifiers bfd_set_bfcp(BFD *bfd, const void *parm) "
/**
*/
public";
%javamethodmodifiers bfd_col(void *info_, int j, int ind[], double val[]) "
/**
*/
public";
%javamethodmodifiers bfd_factorize(BFD *bfd, int m, int(*col1)(void *info, int j, int ind[], double val[]), void *info1) "
/**
*/
public";
%javamethodmodifiers bfd_condest(BFD *bfd) "
/**
*/
public";
%javamethodmodifiers bfd_ftran(BFD *bfd, double x[]) "
/**
*/
public";
%javamethodmodifiers bfd_btran(BFD *bfd, double x[]) "
/**
*/
public";
%javamethodmodifiers bfd_update(BFD *bfd, int j, int len, const int ind[], const double val[]) "
/**
*/
public";
%javamethodmodifiers bfd_get_count(BFD *bfd) "
/**
*/
public";
%javamethodmodifiers bfd_delete_it(BFD *bfd) "
/**
*/
public";
%javamethodmodifiers set_d_eps(mpq_t x, double val) "
/**
* glp_exact - solve LP problem in exact arithmetic .
* SYNOPSIS
* int glp_exact(glp_prob *lp, const glp_smcp *parm);
* DESCRIPTION
* The routine glp_exact is a tentative implementation of the primal two-phase simplex method based on exact (rational) arithmetic. It is similar to the routine glp_simplex, however, for all internal computations it uses arithmetic of rational numbers, which is exact in mathematical sense, i.e. free of round-off errors unlike floating point arithmetic.
* Note that the routine glp_exact uses inly two control parameters passed in the structure glp_smcp, namely, it_lim and tm_lim.
* RETURNS
* 0 The LP problem instance has been successfully solved. This code does not necessarily mean that the solver has found optimal solution. It only means that the solution process was successful.
* GLP_EBADB Unable to start the search, because the initial basis specified in the problem object is invalidthe number of basic (auxiliary and structural) variables is not the same as the number of rows in the problem object.
* GLP_ESING Unable to start the search, because the basis matrix correspodning to the initial basis is exactly singular.
* GLP_EBOUND Unable to start the search, because some double-bounded variables have incorrect bounds.
* GLP_EFAIL The problem has no rows/columns.
* GLP_EITLIM The search was prematurely terminated, because the simplex iteration limit has been exceeded.
* GLP_ETMLIM The search was prematurely terminated, because the time limit has been exceeded.
*/
public";
%javamethodmodifiers load_data(SSX *ssx, glp_prob *lp) "
/**
*/
public";
%javamethodmodifiers load_basis(SSX *ssx, glp_prob *lp) "
/**
*/
public";
%javamethodmodifiers glp_exact(glp_prob *lp, const glp_smcp *parm) "
/**
*/
public";
%javamethodmodifiers rng_unif_01(RNG *rand) "
/**
* rng_unif_01 - obtain pseudo-random number in the range [0, 1] .
* SYNOPSIS
* #include \"rng.h\" double rng_unif_01(RNG *rand);
* RETURNS
* The routine rng_unif_01 returns a next pseudo-random number which is uniformly distributed in the range [0, 1].
*/
public";
%javamethodmodifiers rng_uniform(RNG *rand, double a, double b) "
/**
* rng_uniform - obtain pseudo-random number in the range [a, b] .
* SYNOPSIS
* #include \"rng.h\" double rng_uniform(RNG *rand, double a, double b);
* RETURNS
* The routine rng_uniform returns a next pseudo-random number which is uniformly distributed in the range [a, b].
*/
public";
%javamethodmodifiers round2n(double x) "
/**
* round2n - round floating-point number to nearest power of two .
* SYNOPSIS
* #include \"misc.h\" double round2n(double x);
* RETURNS
* Given a positive floating-point value x the routine round2n returns 2^n such that |x - 2^n| is minimal.
* EXAMPLES
* round2n(10.1) = 2^3 = 8 round2n(15.3) = 2^4 = 16 round2n(0.01) = 2^(-7) = 0.0078125
* BACKGROUND
* Let x = f * 2^e, where 0.5 <= f < 1 is a normalized fractional part, e is an integer exponent. Then, obviously, 0.5 * 2^e <= x < 2^e, so if x - 0.5 * 2^e <= 2^e - x, we choose 0.5 * 2^e = 2^(e-1), and 2^e otherwise. The latter condition can be written as 2 * x <= 1.5 * 2^e or 2 * f * 2^e <= 1.5 * 2^e or, finally, f <= 0.75.
*/
public";
%javamethodmodifiers show_progress(glp_tree *T, int bingo) "
/**
*/
public";
%javamethodmodifiers is_branch_hopeful(glp_tree *T, int p) "
/**
*/
public";
%javamethodmodifiers check_integrality(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers record_solution(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers fix_by_red_cost(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers branch_on(glp_tree *T, int j, int next) "
/**
*/
public";
%javamethodmodifiers cleanup_the_tree(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers round_heur(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers generate_cuts(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers remove_cuts(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers display_cut_info(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers ios_driver(glp_tree *T) "
/**
* ios_driver - branch-and-cut driver .
* SYNOPSIS
* #include \"glpios.h\" int ios_driver(glp_tree *T);
* DESCRIPTION
* The routine ios_driver is a branch-and-cut driver. It controls the MIP solution process.
* RETURNS
* 0 The MIP problem instance has been successfully solved. This code does not necessarily mean that the solver has found optimal solution. It only means that the solution process was successful.
* GLP_EFAIL The search was prematurely terminated due to the solver failure.
* GLP_EMIPGAP The search was prematurely terminated, because the relative mip gap tolerance has been reached.
* GLP_ETMLIM The search was prematurely terminated, because the time limit has been exceeded.
* GLP_ESTOP The search was prematurely terminated by application.
*/
public";
%javamethodmodifiers print_help(const char *my_name) "
/**
*/
public";
%javamethodmodifiers print_version(int briefly) "
/**
*/
public";
%javamethodmodifiers parse_cmdline(struct csa *csa, int argc, const char *argv[]) "
/**
*/
public";
%javamethodmodifiers glp_main(int argc, const char *argv[]) "
/**
*/
public";
%javamethodmodifiers gz_reset(gz_statep state) "
/**
*/
public";
%javamethodmodifiers gz_open(char *path, int fd, const char *mode) const "
/**
*/
public";
%javamethodmodifiers gzopen(char *path, const char *mode) const "
/**
*/
public";
%javamethodmodifiers gzopen64(char *path, const char *mode) const "
/**
*/
public";
%javamethodmodifiers gzdopen(int fd, const char *mode) "
/**
*/
public";
%javamethodmodifiers gzbuffer(gzFile file, unsigned size) "
/**
*/
public";
%javamethodmodifiers gzrewind(gzFile file) "
/**
*/
public";
%javamethodmodifiers gzseek64(gzFile file, z_off64_t offset, int whence) "
/**
*/
public";
%javamethodmodifiers gzseek(gzFile file, z_off_t offset, int whence) "
/**
*/
public";
%javamethodmodifiers gztell64(gzFile file) "
/**
*/
public";
%javamethodmodifiers gztell(gzFile file) "
/**
*/
public";
%javamethodmodifiers gzoffset64(gzFile file) "
/**
*/
public";
%javamethodmodifiers gzoffset(gzFile file) "
/**
*/
public";
%javamethodmodifiers gzeof(gzFile file) "
/**
*/
public";
%javamethodmodifiers gzerror(gzFile file, int *errnum) "
/**
*/
public";
%javamethodmodifiers gzclearerr(gzFile file) "
/**
*/
public";
%javamethodmodifiers gz_error(gz_statep state, int err, const char *msg) "
/**
*/
public";
%javamethodmodifiers gz_intmax() "
/**
*/
public";
%javamethodmodifiers alloc_content(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers generate_model(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers build_problem(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers postsolve_model(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers clean_model(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers open_input(MPL *mpl, char *file) "
/**
*/
public";
%javamethodmodifiers read_char(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers close_input(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers open_output(MPL *mpl, char *file) "
/**
*/
public";
%javamethodmodifiers write_char(MPL *mpl, int c) "
/**
*/
public";
%javamethodmodifiers write_text(MPL *mpl, char *fmt,...) "
/**
*/
public";
%javamethodmodifiers flush_output(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers error(MPL *mpl, char *fmt,...) "
/**
*/
public";
%javamethodmodifiers warning(MPL *mpl, char *fmt,...) "
/**
*/
public";
%javamethodmodifiers mpl_initialize(void) "
/**
*/
public";
%javamethodmodifiers mpl_read_model(MPL *mpl, char *file, int skip_data) "
/**
*/
public";
%javamethodmodifiers mpl_read_data(MPL *mpl, char *file) "
/**
*/
public";
%javamethodmodifiers mpl_generate(MPL *mpl, char *file) "
/**
*/
public";
%javamethodmodifiers mpl_get_prob_name(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers mpl_get_num_rows(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers mpl_get_num_cols(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers mpl_get_row_name(MPL *mpl, int i) "
/**
*/
public";
%javamethodmodifiers mpl_get_row_kind(MPL *mpl, int i) "
/**
*/
public";
%javamethodmodifiers mpl_get_row_bnds(MPL *mpl, int i, double *_lb, double *_ub) "
/**
*/
public";
%javamethodmodifiers mpl_get_mat_row(MPL *mpl, int i, int ndx[], double val[]) "
/**
*/
public";
%javamethodmodifiers mpl_get_row_c0(MPL *mpl, int i) "
/**
*/
public";
%javamethodmodifiers mpl_get_col_name(MPL *mpl, int j) "
/**
*/
public";
%javamethodmodifiers mpl_get_col_kind(MPL *mpl, int j) "
/**
*/
public";
%javamethodmodifiers mpl_get_col_bnds(MPL *mpl, int j, double *_lb, double *_ub) "
/**
*/
public";
%javamethodmodifiers mpl_has_solve_stmt(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers mpl_put_row_soln(MPL *mpl, int i, int stat, double prim, double dual) "
/**
*/
public";
%javamethodmodifiers mpl_put_col_soln(MPL *mpl, int j, int stat, double prim, double dual) "
/**
*/
public";
%javamethodmodifiers mpl_postsolve(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers mpl_terminate(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers glp_init_cpxcp(glp_cpxcp *parm) "
/**
* glp_init_cpxcp - initialize CPLEX LP format control parameters .
* SYNOPSIS
* void glp_init_cpxcp(glp_cpxcp *parm):
* The routine glp_init_cpxcp initializes control parameters used by the CPLEX LP input/output routines glp_read_lp and glp_write_lp with default values.
* Default values of the control parameters are stored in the glp_cpxcp structure, which the parameter parm points to.
*/
public";
%javamethodmodifiers check_parm(const char *func, const glp_cpxcp *parm) "
/**
*/
public";
%javamethodmodifiers error(struct csa *csa, const char *fmt,...) "
/**
*/
public";
%javamethodmodifiers warning(struct csa *csa, const char *fmt,...) "
/**
*/
public";
%javamethodmodifiers read_char(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers add_char(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers the_same(char *s1, char *s2) "
/**
*/
public";
%javamethodmodifiers scan_token(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers find_col(struct csa *csa, char *name) "
/**
*/
public";
%javamethodmodifiers parse_linear_form(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers parse_objective(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers parse_constraints(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers set_lower_bound(struct csa *csa, int j, double lb) "
/**
*/
public";
%javamethodmodifiers set_upper_bound(struct csa *csa, int j, double ub) "
/**
*/
public";
%javamethodmodifiers parse_bounds(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers parse_integer(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers glp_read_lp(glp_prob *P, const glp_cpxcp *parm, const char *fname) "
/**
*/
public";
%javamethodmodifiers check_name(char *name) "
/**
*/
public";
%javamethodmodifiers adjust_name(char *name) "
/**
*/
public";
%javamethodmodifiers row_name(struct csa *csa, int i, char rname[255+1]) "
/**
*/
public";
%javamethodmodifiers col_name(struct csa *csa, int j, char cname[255+1]) "
/**
*/
public";
%javamethodmodifiers glp_write_lp(glp_prob *P, const glp_cpxcp *parm, const char *fname) "
/**
*/
public";
%javamethodmodifiers glp_get_prob_name(glp_prob *lp) "
/**
* glp_get_prob_name - retrieve problem name .
* SYNOPSIS
* const char *glp_get_prob_name(glp_prob *lp);
* RETURNS
* The routine glp_get_prob_name returns a pointer to an internal buffer, which contains symbolic name of the problem. However, if the problem has no assigned name, the routine returns NULL.
*/
public";
%javamethodmodifiers glp_get_obj_name(glp_prob *lp) "
/**
* glp_get_obj_name - retrieve objective function name .
* SYNOPSIS
* const char *glp_get_obj_name(glp_prob *lp);
* RETURNS
* The routine glp_get_obj_name returns a pointer to an internal buffer, which contains a symbolic name of the objective function. However, if the objective function has no assigned name, the routine returns NULL.
*/
public";
%javamethodmodifiers glp_get_obj_dir(glp_prob *lp) "
/**
* glp_get_obj_dir - retrieve optimization direction flag .
* SYNOPSIS
* int glp_get_obj_dir(glp_prob *lp);
* RETURNS
* The routine glp_get_obj_dir returns the optimization direction flag (i.e. \"sense\" of the objective function):
* GLP_MIN - minimization; GLP_MAX - maximization.
*/
public";
%javamethodmodifiers glp_get_num_rows(glp_prob *lp) "
/**
* glp_get_num_rows - retrieve number of rows .
* SYNOPSIS
* int glp_get_num_rows(glp_prob *lp);
* RETURNS
* The routine glp_get_num_rows returns the current number of rows in the specified problem object.
*/
public";
%javamethodmodifiers glp_get_num_cols(glp_prob *lp) "
/**
* glp_get_num_cols - retrieve number of columns .
* SYNOPSIS
* int glp_get_num_cols(glp_prob *lp);
* RETURNS
* The routine glp_get_num_cols returns the current number of columns in the specified problem object.
*/
public";
%javamethodmodifiers glp_get_row_name(glp_prob *lp, int i) "
/**
* glp_get_row_name - retrieve row name .
* SYNOPSIS
* const char *glp_get_row_name(glp_prob *lp, int i);
* RETURNS
* The routine glp_get_row_name returns a pointer to an internal buffer, which contains symbolic name of i-th row. However, if i-th row has no assigned name, the routine returns NULL.
*/
public";
%javamethodmodifiers glp_get_col_name(glp_prob *lp, int j) "
/**
* glp_get_col_name - retrieve column name .
* SYNOPSIS
* const char *glp_get_col_name(glp_prob *lp, int j);
* RETURNS
* The routine glp_get_col_name returns a pointer to an internal buffer, which contains symbolic name of j-th column. However, if j-th column has no assigned name, the routine returns NULL.
*/
public";
%javamethodmodifiers glp_get_row_type(glp_prob *lp, int i) "
/**
* glp_get_row_type - retrieve row type .
* SYNOPSIS
* int glp_get_row_type(glp_prob *lp, int i);
* RETURNS
* The routine glp_get_row_type returns the type of i-th row, i.e. the type of corresponding auxiliary variable, as follows:
* GLP_FR - free (unbounded) variable; GLP_LO - variable with lower bound; GLP_UP - variable with upper bound; GLP_DB - double-bounded variable; GLP_FX - fixed variable.
*/
public";
%javamethodmodifiers glp_get_row_lb(glp_prob *lp, int i) "
/**
* glp_get_row_lb - retrieve row lower bound .
* SYNOPSIS
* double glp_get_row_lb(glp_prob *lp, int i);
* RETURNS
* The routine glp_get_row_lb returns the lower bound of i-th row, i.e. the lower bound of corresponding auxiliary variable. However, if the row has no lower bound, the routine returns -DBL_MAX.
*/
public";
%javamethodmodifiers glp_get_row_ub(glp_prob *lp, int i) "
/**
* glp_get_row_ub - retrieve row upper bound .
* SYNOPSIS
* double glp_get_row_ub(glp_prob *lp, int i);
* RETURNS
* The routine glp_get_row_ub returns the upper bound of i-th row, i.e. the upper bound of corresponding auxiliary variable. However, if the row has no upper bound, the routine returns +DBL_MAX.
*/
public";
%javamethodmodifiers glp_get_col_type(glp_prob *lp, int j) "
/**
* glp_get_col_type - retrieve column type .
* SYNOPSIS
* int glp_get_col_type(glp_prob *lp, int j);
* RETURNS
* The routine glp_get_col_type returns the type of j-th column, i.e. the type of corresponding structural variable, as follows:
* GLP_FR - free (unbounded) variable; GLP_LO - variable with lower bound; GLP_UP - variable with upper bound; GLP_DB - double-bounded variable; GLP_FX - fixed variable.
*/
public";
%javamethodmodifiers glp_get_col_lb(glp_prob *lp, int j) "
/**
* glp_get_col_lb - retrieve column lower bound .
* SYNOPSIS
* double glp_get_col_lb(glp_prob *lp, int j);
* RETURNS
* The routine glp_get_col_lb returns the lower bound of j-th column, i.e. the lower bound of corresponding structural variable. However, if the column has no lower bound, the routine returns -DBL_MAX.
*/
public";
%javamethodmodifiers glp_get_col_ub(glp_prob *lp, int j) "
/**
* glp_get_col_ub - retrieve column upper bound .
* SYNOPSIS
* double glp_get_col_ub(glp_prob *lp, int j);
* RETURNS
* The routine glp_get_col_ub returns the upper bound of j-th column, i.e. the upper bound of corresponding structural variable. However, if the column has no upper bound, the routine returns +DBL_MAX.
*/
public";
%javamethodmodifiers glp_get_obj_coef(glp_prob *lp, int j) "
/**
* glp_get_obj_coef - retrieve obj. .
* coefficient or constant term
* SYNOPSIS
* double glp_get_obj_coef(glp_prob *lp, int j);
* RETURNS
* The routine glp_get_obj_coef returns the objective coefficient at j-th structural variable (column) of the specified problem object.
* If the parameter j is zero, the routine returns the constant term (\"shift\") of the objective function.
*/
public";
%javamethodmodifiers glp_get_num_nz(glp_prob *lp) "
/**
* glp_get_num_nz - retrieve number of constraint coefficients .
* SYNOPSIS
* int glp_get_num_nz(glp_prob *lp);
* RETURNS
* The routine glp_get_num_nz returns the number of (non-zero) elements in the constraint matrix of the specified problem object.
*/
public";
%javamethodmodifiers glp_get_mat_row(glp_prob *lp, int i, int ind[], double val[]) "
/**
* glp_get_mat_row - retrieve row of the constraint matrix .
* SYNOPSIS
* int glp_get_mat_row(glp_prob *lp, int i, int ind[], double val[]);
* DESCRIPTION
* The routine glp_get_mat_row scans (non-zero) elements of i-th row of the constraint matrix of the specified problem object and stores their column indices and numeric values to locations ind[1], ..., ind[len] and val[1], ..., val[len], respectively, where 0 <= len <= n is the number of elements in i-th row, n is the number of columns.
* The parameter ind and/or val can be specified as NULL, in which case corresponding information is not stored.
* RETURNS
* The routine glp_get_mat_row returns the length len, i.e. the number of (non-zero) elements in i-th row.
*/
public";
%javamethodmodifiers glp_get_mat_col(glp_prob *lp, int j, int ind[], double val[]) "
/**
* glp_get_mat_col - retrieve column of the constraint matrix .
* SYNOPSIS
* int glp_get_mat_col(glp_prob *lp, int j, int ind[], double val[]);
* DESCRIPTION
* The routine glp_get_mat_col scans (non-zero) elements of j-th column of the constraint matrix of the specified problem object and stores their row indices and numeric values to locations ind[1], ..., ind[len] and val[1], ..., val[len], respectively, where 0 <= len <= m is the number of elements in j-th column, m is the number of rows.
* The parameter ind or/and val can be specified as NULL, in which case corresponding information is not stored.
* RETURNS
* The routine glp_get_mat_col returns the length len, i.e. the number of (non-zero) elements in j-th column.
*/
public";
%javamethodmodifiers ymalloc(int size) "
/**
*/
public";
%javamethodmodifiers yrealloc(void *ptr, int size) "
/**
*/
public";
%javamethodmodifiers yfree(void *ptr) "
/**
*/
public";
%javamethodmodifiers drand(double *seed) "
/**
*/
public";
%javamethodmodifiers irand(double *seed, int size) "
/**
*/
public";
%javamethodmodifiers sort(void **array, int size, int(*comp)(const void *, const void *)) "
/**
*/
public";
%javamethodmodifiers vecp_remove(vecp *v, void *e) "
/**
*/
public";
%javamethodmodifiers order_update(solver *s, int v) "
/**
*/
public";
%javamethodmodifiers order_unassigned(solver *s, int v) "
/**
*/
public";
%javamethodmodifiers order_select(solver *s, float random_var_freq) "
/**
*/
public";
%javamethodmodifiers act_var_rescale(solver *s) "
/**
*/
public";
%javamethodmodifiers act_var_bump(solver *s, int v) "
/**
*/
public";
%javamethodmodifiers act_var_decay(solver *s) "
/**
*/
public";
%javamethodmodifiers act_clause_rescale(solver *s) "
/**
*/
public";
%javamethodmodifiers act_clause_bump(solver *s, clause *c) "
/**
*/
public";
%javamethodmodifiers act_clause_decay(solver *s) "
/**
*/
public";
%javamethodmodifiers clause_new(solver *s, lit *begin, lit *end, int learnt) "
/**
*/
public";
%javamethodmodifiers clause_remove(solver *s, clause *c) "
/**
*/
public";
%javamethodmodifiers clause_simplify(solver *s, clause *c) "
/**
*/
public";
%javamethodmodifiers solver_setnvars(solver *s, int n) "
/**
*/
public";
%javamethodmodifiers enqueue(solver *s, lit l, clause *from) "
/**
*/
public";
%javamethodmodifiers assume(solver *s, lit l) "
/**
*/
public";
%javamethodmodifiers solver_canceluntil(solver *s, int level) "
/**
*/
public";
%javamethodmodifiers solver_record(solver *s, veci *cls) "
/**
*/
public";
%javamethodmodifiers solver_progress(solver *s) "
/**
*/
public";
%javamethodmodifiers solver_lit_removable(solver *s, lit l, int minl) "
/**
*/
public";
%javamethodmodifiers solver_analyze(solver *s, clause *c, veci *learnt) "
/**
*/
public";
%javamethodmodifiers solver_propagate(solver *s) "
/**
*/
public";
%javamethodmodifiers clause_cmp(const void *x, const void *y) "
/**
*/
public";
%javamethodmodifiers solver_reducedb(solver *s) "
/**
*/
public";
%javamethodmodifiers solver_search(solver *s, int nof_conflicts, int nof_learnts) "
/**
*/
public";
%javamethodmodifiers solver_new(void) "
/**
*/
public";
%javamethodmodifiers solver_delete(solver *s) "
/**
*/
public";
%javamethodmodifiers solver_addclause(solver *s, lit *begin, lit *end) "
/**
*/
public";
%javamethodmodifiers solver_simplify(solver *s) "
/**
*/
public";
%javamethodmodifiers solver_solve(solver *s, lit *begin, lit *end) "
/**
*/
public";
%javamethodmodifiers solver_nvars(solver *s) "
/**
*/
public";
%javamethodmodifiers solver_nclauses(solver *s) "
/**
*/
public";
%javamethodmodifiers solver_nconflicts(solver *s) "
/**
*/
public";
%javamethodmodifiers selectionsort(void **array, int size, int(*comp)(const void *, const void *)) "
/**
*/
public";
%javamethodmodifiers sortrnd(void **array, int size, int(*comp)(const void *, const void *), double *seed) "
/**
*/
public";
%javamethodmodifiers zlibVersion() "
/**
*/
public";
%javamethodmodifiers zlibCompileFlags() "
/**
*/
public";
%javamethodmodifiers zError(int err) "
/**
*/
public";
%javamethodmodifiers zcalloc(voidpf opaque, unsigned items, unsigned size) "
/**
*/
public";
%javamethodmodifiers zcfree(voidpf opaque, voidpf ptr) "
/**
*/
public";
%javamethodmodifiers spy_chuzc_std(SPXLP *lp, const double d[], double s, const double trow[], double tol_piv, double tol, double tol1) "
/**
*/
public";
%javamethodmodifiers spy_chuzc_harris(SPXLP *lp, const double d[], double s, const double trow[], double tol_piv, double tol, double tol1) "
/**
*/
public";
%javamethodmodifiers min_row_aij(glp_prob *lp, int i, int scaled) "
/**
*/
public";
%javamethodmodifiers max_row_aij(glp_prob *lp, int i, int scaled) "
/**
*/
public";
%javamethodmodifiers min_col_aij(glp_prob *lp, int j, int scaled) "
/**
*/
public";
%javamethodmodifiers max_col_aij(glp_prob *lp, int j, int scaled) "
/**
*/
public";
%javamethodmodifiers min_mat_aij(glp_prob *lp, int scaled) "
/**
*/
public";
%javamethodmodifiers max_mat_aij(glp_prob *lp, int scaled) "
/**
*/
public";
%javamethodmodifiers eq_scaling(glp_prob *lp, int flag) "
/**
*/
public";
%javamethodmodifiers gm_scaling(glp_prob *lp, int flag) "
/**
*/
public";
%javamethodmodifiers max_row_ratio(glp_prob *lp) "
/**
*/
public";
%javamethodmodifiers max_col_ratio(glp_prob *lp) "
/**
*/
public";
%javamethodmodifiers gm_iterate(glp_prob *lp, int it_max, double tau) "
/**
*/
public";
%javamethodmodifiers scale_prob(glp_prob *lp, int flags) "
/**
* scale_prob - scale problem data .
* SYNOPSIS
* #include \"glpscl.h\" void scale_prob(glp_prob *lp, int flags);
* DESCRIPTION
* The routine scale_prob performs automatic scaling of problem data for the specified problem object.
*/
public";
%javamethodmodifiers glp_scale_prob(glp_prob *lp, int flags) "
/**
* glp_scale_prob - scale problem data .
* SYNOPSIS
* void glp_scale_prob(glp_prob *lp, int flags);
* DESCRIPTION
* The routine glp_scale_prob performs automatic scaling of problem data for the specified problem object.
* The parameter flags specifies scaling options used by the routine. Options can be combined with the bitwise OR operator and may be the following:
* GLP_SF_GM perform geometric mean scaling; GLP_SF_EQ perform equilibration scaling; GLP_SF_2N round scale factors to nearest power of two; GLP_SF_SKIP skip scaling, if the problem is well scaled.
* The parameter flags may be specified as GLP_SF_AUTO, in which case the routine chooses scaling options automatically.
*/
public";
%javamethodmodifiers show_progress(SSX *ssx, int phase) "
/**
*/
public";
%javamethodmodifiers ssx_phase_I(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_phase_II(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_driver(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers jday(int d, int m, int y) "
/**
* jday - convert calendar date to Julian day number .
* SYNOPSIS
* #include \"jd.h\" int jday(int d, int m, int y);
* DESCRIPTION
* The routine jday converts a calendar date, Gregorian calendar, to corresponding Julian day number j.
* From the given day d, month m, and year y, the Julian day number j is computed without using tables.
* The routine is valid for 1 <= y <= 4000.
* RETURNS
* The routine jday returns the Julian day number, or negative value if the specified date is incorrect.
* REFERENCES
* R. G. Tantzen, Algorithm 199: conversions between calendar date and Julian day number, Communications of the ACM, vol. 6, no. 8, p. 444, Aug. 1963.
*/
public";
%javamethodmodifiers jdate(int j, int *d_, int *m_, int *y_) "
/**
* jdate - convert Julian day number to calendar date .
* SYNOPSIS
* #include \"jd.h\" int jdate(int j, int *d, int *m, int *y);
* DESCRIPTION
* The routine jdate converts a Julian day number j to corresponding calendar date, Gregorian calendar.
* The day d, month m, and year y are computed without using tables and stored in corresponding locations.
* The routine is valid for 1721426 <= j <= 3182395.
* RETURNS
* If the conversion is successful, the routine returns zero, otherwise non-zero.
* REFERENCES
* R. G. Tantzen, Algorithm 199: conversions between calendar date and Julian day number, Communications of the ACM, vol. 6, no. 8, p. 444, Aug. 1963.
*/
public";
%javamethodmodifiers glp_time(void) "
/**
*/
public";
%javamethodmodifiers glp_difftime(double t1, double t0) "
/**
* glp_difftime - compute difference between two time values .
* SYNOPSIS
* double glp_difftime(double t1, double t0);
* RETURNS
* The routine glp_difftime returns the difference between two time values t1 and t0, expressed in seconds.
*/
public";
%javamethodmodifiers jth_col(void *info, int j, int ind[], double val[]) "
/**
*/
public";
%javamethodmodifiers spx_factorize(SPXLP *lp) "
/**
*/
public";
%javamethodmodifiers spx_eval_beta(SPXLP *lp, double beta[]) "
/**
*/
public";
%javamethodmodifiers spx_eval_obj(SPXLP *lp, const double beta[]) "
/**
*/
public";
%javamethodmodifiers spx_eval_pi(SPXLP *lp, double pi[]) "
/**
*/
public";
%javamethodmodifiers spx_eval_dj(SPXLP *lp, const double pi[], int j) "
/**
*/
public";
%javamethodmodifiers spx_eval_tcol(SPXLP *lp, int j, double tcol[]) "
/**
*/
public";
%javamethodmodifiers spx_eval_rho(SPXLP *lp, int i, double rho[]) "
/**
*/
public";
%javamethodmodifiers spx_eval_tij(SPXLP *lp, const double rho[], int j) "
/**
*/
public";
%javamethodmodifiers spx_eval_trow(SPXLP *lp, const double rho[], double trow[]) "
/**
*/
public";
%javamethodmodifiers spx_update_beta(SPXLP *lp, double beta[], int p, int p_flag, int q, const double tcol[]) "
/**
*/
public";
%javamethodmodifiers spx_update_d(SPXLP *lp, double d[], int p, int q, const double trow[], const double tcol[]) "
/**
*/
public";
%javamethodmodifiers spx_change_basis(SPXLP *lp, int p, int p_flag, int q) "
/**
*/
public";
%javamethodmodifiers spx_update_invb(SPXLP *lp, int i, int k) "
/**
*/
public";
%javamethodmodifiers glp_init_mpscp(glp_mpscp *parm) "
/**
* glp_init_mpscp - initialize MPS format control parameters .
* SYNOPSIS
* void glp_init_mpscp(glp_mpscp *parm);
* DESCRIPTION
* The routine glp_init_mpscp initializes control parameters, which are used by the MPS input/output routines glp_read_mps and glp_write_mps, with default values.
* Default values of the control parameters are stored in the glp_mpscp structure, which the parameter parm points to.
*/
public";
%javamethodmodifiers check_parm(const char *func, const glp_mpscp *parm) "
/**
*/
public";
%javamethodmodifiers error(struct csa *csa, const char *fmt,...) "
/**
*/
public";
%javamethodmodifiers warning(struct csa *csa, const char *fmt,...) "
/**
*/
public";
%javamethodmodifiers read_char(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers indicator(struct csa *csa, int name) "
/**
*/
public";
%javamethodmodifiers read_field(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers patch_name(struct csa *csa, char *name) "
/**
*/
public";
%javamethodmodifiers read_number(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers skip_field(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers read_name(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers read_rows(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers read_columns(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers read_rhs(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers read_ranges(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers read_bounds(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers glp_read_mps(glp_prob *P, int fmt, const glp_mpscp *parm, const char *fname) "
/**
*/
public";
%javamethodmodifiers mps_name(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers row_name(struct csa *csa, int i) "
/**
*/
public";
%javamethodmodifiers col_name(struct csa *csa, int j) "
/**
*/
public";
%javamethodmodifiers mps_numb(struct csa *csa, double val) "
/**
*/
public";
%javamethodmodifiers glp_write_mps(glp_prob *P, int fmt, const glp_mpscp *parm, const char *fname) "
/**
*/
public";
%javamethodmodifiers dmp_create_pool(void) "
/**
* dmp_create_pool - create dynamic memory pool .
* SYNOPSIS
* #include \"dmp.h\" DMP *dmp_create_pool(void);
* DESCRIPTION
* The routine dmp_create_pool creates a dynamic memory pool.
* RETURNS
* The routine returns a pointer to the memory pool created.
*/
public";
%javamethodmodifiers dmp_get_atom(DMP *pool, int size) "
/**
* dmp_get_atom - get free atom from dynamic memory pool .
* SYNOPSIS
* #include \"dmp.h\" void *dmp_get_atom(DMP *pool, int size);
* DESCRIPTION
* The routine dmp_get_atom obtains a free atom (memory space) from the specified memory pool.
* The parameter size is the atom size, in bytes, 1 <= size <= 256.
* Note that the free atom contains arbitrary data, not binary zeros.
* RETURNS
* The routine returns a pointer to the free atom obtained.
*/
public";
%javamethodmodifiers dmp_free_atom(DMP *pool, void *atom, int size) "
/**
* dmp_free_atom - return atom to dynamic memory pool .
* SYNOPSIS
* #include \"dmp.h\" void dmp_free_atom(DMP *pool, void *atom, int size);
* DESCRIPTION
* The routine dmp_free_atom returns the specified atom (memory space) to the specified memory pool, making the atom free.
* The parameter size is the atom size, in bytes, 1 <= size <= 256.
* Note that the atom can be returned only to the pool, from which it was obtained, and its size must be exactly the same as on obtaining it from the pool.
*/
public";
%javamethodmodifiers dmp_in_use(DMP *pool) "
/**
* dmp_in_use - determine how many atoms are still in use .
* SYNOPSIS
* #include \"dmp.h\" size_t dmp_in_use(DMP *pool);
* RETURNS
* The routine returns the number of atoms of the specified memory pool which are still in use.
*/
public";
%javamethodmodifiers dmp_delete_pool(DMP *pool) "
/**
* dmp_delete_pool - delete dynamic memory pool .
* SYNOPSIS
* #include \"dmp.h\" void dmp_delete_pool(DMP *pool);
* DESCRIPTION
* The routine dmp_delete_pool deletes the specified dynamic memory pool freeing all the memory allocated to this object.
*/
public";
%javamethodmodifiers mc21a(int n, const int icn[], const int ip[], const int lenr[], int iperm[], int pr[], int arp[], int cv[], int out[]) "
/**
* mc21a - permutations for zero-free diagonal .
* SYNOPSIS
* #include \"mc21a.h\" int mc21a(int n, const int icn[], const int ip[], const int lenr[], int iperm[], int pr[], int arp[], int cv[], int out[]);
* DESCRIPTION
* Given the pattern of nonzeros of a sparse matrix, the routine mc21a attempts to find a permutation of its rows that makes the matrix have no zeros on its diagonal.
* INPUT PARAMETERS
* n order of matrix.
* icn array containing the column indices of the non-zeros. Those belonging to a single row must be contiguous but the ordering of column indices within each row is unimportant and wasted space between rows is permitted.
* ip ip[i], i = 1,2,...,n, is the position in array icn of the first column index of a non-zero in row i.
* lenr lenr[i], i = 1,2,...,n, is the number of non-zeros in row i.
* OUTPUT PARAMETER
* iperm contains permutation to make diagonal have the smallest number of zeros on it. Elements (iperm[i], i), i = 1,2,...,n, are non-zero at the end of the algorithm unless the matrix is structurally singular. In this case, (iperm[i], i) will be zero for n - numnz entries.
* WORKING ARRAYS
* pr working array of length [1+n], where pr[0] is not used. pr[i] is the previous row to i in the depth first search.
* arp working array of length [1+n], where arp[0] is not used. arp[i] is one less than the number of non-zeros in row i which have not been scanned when looking for a cheap assignment.
* cv working array of length [1+n], where cv[0] is not used. cv[i] is the most recent row extension at which column i was visited.
* out working array of length [1+n], where out[0] is not used. out[i] is one less than the number of non-zeros in row i which have not been scanned during one pass through the main loop.
* RETURNS
* The routine mc21a returns numnz, the number of non-zeros on diagonal of permuted matrix.
*/
public";
%javamethodmodifiers make_edge(struct csa *csa, int from, int to, int c1, int c2) "
/**
*/
public";
%javamethodmodifiers permute(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers connect(struct csa *csa, int offset, int cv, int x1, int y1) "
/**
*/
public";
%javamethodmodifiers gen_rmf(struct csa *csa, int a, int b, int c1, int c2) "
/**
*/
public";
%javamethodmodifiers print_max_format(struct csa *csa, network *n, char *comm[], int dim) "
/**
*/
public";
%javamethodmodifiers gen_free_net(network *n) "
/**
*/
public";
%javamethodmodifiers glp_rmfgen(glp_graph *G_, int *_s, int *_t, int _a_cap, const int parm[1+5]) "
/**
*/
public";
%javamethodmodifiers fcmp(const void *ptr1, const void *ptr2) "
/**
*/
public";
%javamethodmodifiers get_column(glp_prob *lp, int j, int ind[], double val[]) "
/**
*/
public";
%javamethodmodifiers cpx_basis(glp_prob *lp) "
/**
*/
public";
%javamethodmodifiers glp_cpx_basis(glp_prob *lp) "
/**
* glp_cpx_basis - construct Bixby's initial LP basis .
* SYNOPSIS
* void glp_cpx_basis(glp_prob *lp);
* DESCRIPTION
* The routine glp_cpx_basis constructs an advanced initial basis for the specified problem object.
* The routine is based on Bixby's algorithm described in the paper:
* Robert E. Bixby. Implementing the Simplex Method: The Initial Basis. ORSA Journal on Computing, Vol. 4, No. 3, 1992, pp. 267-84.
*/
public";
%javamethodmodifiers ios_clq_init(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers ios_clq_gen(glp_tree *T, void *G_) "
/**
*/
public";
%javamethodmodifiers ios_clq_term(void *G_) "
/**
*/
public";
%javamethodmodifiers init_rows_cols(Int n_row, Int n_col, Colamd_Row Row[], Colamd_Col Col[], Int A[], Int p[], Int stats[COLAMD_STATS]) "
/**
*/
public";
%javamethodmodifiers init_scoring(Int n_row, Int n_col, Colamd_Row Row[], Colamd_Col Col[], Int A[], Int head[], double knobs[COLAMD_KNOBS], Int *p_n_row2, Int *p_n_col2, Int *p_max_deg) "
/**
*/
public";
%javamethodmodifiers find_ordering(Int n_row, Int n_col, Int Alen, Colamd_Row Row[], Colamd_Col Col[], Int A[], Int head[], Int n_col2, Int max_deg, Int pfree, Int aggressive) "
/**
*/
public";
%javamethodmodifiers order_children(Int n_col, Colamd_Col Col[], Int p[]) "
/**
*/
public";
%javamethodmodifiers detect_super_cols(Colamd_Col Col[], Int A[], Int head[], Int row_start, Int row_length) "
/**
*/
public";
%javamethodmodifiers garbage_collection(Int n_row, Int n_col, Colamd_Row Row[], Colamd_Col Col[], Int A[], Int *pfree) "
/**
*/
public";
%javamethodmodifiers clear_mark(Int tag_mark, Int max_mark, Int n_row, Colamd_Row Row[]) "
/**
*/
public";
%javamethodmodifiers print_report(char *method, Int stats[COLAMD_STATS]) "
/**
*/
public";
%javamethodmodifiers t_add(size_t a, size_t b, int *ok) "
/**
*/
public";
%javamethodmodifiers t_mult(size_t a, size_t k, int *ok) "
/**
*/
public";
%javamethodmodifiers COLAMD_recommended(Int nnz, Int n_row, Int n_col) "
/**
*/
public";
%javamethodmodifiers COLAMD_set_defaults(double knobs[COLAMD_KNOBS]) "
/**
*/
public";
%javamethodmodifiers SYMAMD_MAIN(Int n, Int A[], Int p[], Int perm[], double knobs[COLAMD_KNOBS], Int stats[COLAMD_STATS], void *(*allocate)(size_t, size_t), void(*release)(void *)) "
/**
*/
public";
%javamethodmodifiers COLAMD_MAIN(Int n_row, Int n_col, Int Alen, Int A[], Int p[], double knobs[COLAMD_KNOBS], Int stats[COLAMD_STATS]) "
/**
*/
public";
%javamethodmodifiers COLAMD_report(Int stats[COLAMD_STATS]) "
/**
*/
public";
%javamethodmodifiers SYMAMD_report(Int stats[COLAMD_STATS]) "
/**
*/
public";
%javamethodmodifiers check_flags(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers set_art_bounds(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers set_orig_bounds(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers check_feas(struct csa *csa, double tol, double tol1, int recov) "
/**
*/
public";
%javamethodmodifiers choose_pivot(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers display(struct csa *csa, int spec) "
/**
*/
public";
%javamethodmodifiers dual_simplex(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers spy_dual(glp_prob *P, const glp_smcp *parm) "
/**
*/
public";
%javamethodmodifiers avl_create_tree(int(*fcmp)(void *info, const void *key1, const void *key2), void *info) "
/**
*/
public";
%javamethodmodifiers avl_strcmp(void *info, const void *key1, const void *key2) "
/**
*/
public";
%javamethodmodifiers rotate_subtree(AVL *tree, AVLNODE *node) "
/**
*/
public";
%javamethodmodifiers avl_insert_node(AVL *tree, const void *key) "
/**
*/
public";
%javamethodmodifiers avl_set_node_type(AVLNODE *node, int type) "
/**
*/
public";
%javamethodmodifiers avl_set_node_link(AVLNODE *node, void *link) "
/**
*/
public";
%javamethodmodifiers avl_find_node(AVL *tree, const void *key) "
/**
*/
public";
%javamethodmodifiers avl_get_node_type(AVLNODE *node) "
/**
*/
public";
%javamethodmodifiers avl_get_node_link(AVLNODE *node) "
/**
*/
public";
%javamethodmodifiers find_next_node(AVL *tree, AVLNODE *node) "
/**
*/
public";
%javamethodmodifiers avl_delete_node(AVL *tree, AVLNODE *node) "
/**
*/
public";
%javamethodmodifiers avl_delete_tree(AVL *tree) "
/**
*/
public";
%javamethodmodifiers triang(int m, int n, int(*mat)(void *info, int k, int ind[], double val[]), void *info, double tol, int rn[], int cn[]) "
/**
*/
public";
%javamethodmodifiers btfint_create(void) "
/**
*/
public";
%javamethodmodifiers factorize_triv(BTFINT *fi, int k, int(*col)(void *info, int j, int ind[], double val[]), void *info) "
/**
*/
public";
%javamethodmodifiers factorize_block(BTFINT *fi, int k, int(*col)(void *info, int j, int ind[], double val[]), void *info) "
/**
*/
public";
%javamethodmodifiers btfint_factorize(BTFINT *fi, int n, int(*col)(void *info, int j, int ind[], double val[]), void *info) "
/**
*/
public";
%javamethodmodifiers btfint_delete(BTFINT *fi) "
/**
*/
public";
%javamethodmodifiers gz_init(gz_statep state) "
/**
*/
public";
%javamethodmodifiers gz_comp(gz_statep state, int flush) "
/**
*/
public";
%javamethodmodifiers gz_zero(gz_statep state, z_off64_t len) "
/**
*/
public";
%javamethodmodifiers gzwrite(gzFile file, voidpc buf, unsigned len) "
/**
*/
public";
%javamethodmodifiers gzputc(gzFile file, int c) "
/**
*/
public";
%javamethodmodifiers gzputs(gzFile file, const char *str) "
/**
*/
public";
%javamethodmodifiers gzprintf(gzFile file, const char *format,...) "
/**
*/
public";
%javamethodmodifiers gzflush(gzFile file, int flush) "
/**
*/
public";
%javamethodmodifiers gzsetparams(gzFile file, int level, int strategy) "
/**
*/
public";
%javamethodmodifiers gzclose_w(gzFile file) "
/**
*/
public";
%javamethodmodifiers compress2(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level) "
/**
*/
public";
%javamethodmodifiers compress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen) "
/**
*/
public";
%javamethodmodifiers compressBound(uLong sourceLen) "
/**
*/
public";
%javamethodmodifiers read_card(struct dsa *dsa) "
/**
*/
public";
%javamethodmodifiers scan_int(struct dsa *dsa, char *fld, int pos, int width, int *val) "
/**
*/
public";
%javamethodmodifiers parse_fmt(struct dsa *dsa, char *fmt) "
/**
*/
public";
%javamethodmodifiers read_int_array(struct dsa *dsa, char *name, char *fmt, int n, int val[]) "
/**
*/
public";
%javamethodmodifiers read_real_array(struct dsa *dsa, char *name, char *fmt, int n, double val[]) "
/**
*/
public";
%javamethodmodifiers hbm_read_mat(const char *fname) "
/**
*/
public";
%javamethodmodifiers hbm_free_mat(HBM *hbm) "
/**
* hbm_free_mat - free sparse matrix in Harwell-Boeing format .
* SYNOPSIS
* #include \"glphbm.h\" void hbm_free_mat(HBM *hbm);
* DESCRIPTION
* The hbm_free_mat routine frees all the memory allocated to the data structure containing a sparse matrix in the Harwell-Boeing format.
*/
public";
%javamethodmodifiers glp_set_row_stat(glp_prob *lp, int i, int stat) "
/**
* glp_set_row_stat - set (change) row status .
* SYNOPSIS
* void glp_set_row_stat(glp_prob *lp, int i, int stat);
* DESCRIPTION
* The routine glp_set_row_stat sets (changes) status of the auxiliary variable associated with i-th row.
* The new status of the auxiliary variable should be specified by the parameter stat as follows:
* GLP_BS - basic variable; GLP_NL - non-basic variable; GLP_NU - non-basic variable on its upper bound; if the variable is not double-bounded, this means the same as GLP_NL (only in case of this routine); GLP_NF - the same as GLP_NL (only in case of this routine); GLP_NS - the same as GLP_NL (only in case of this routine).
*/
public";
%javamethodmodifiers glp_set_col_stat(glp_prob *lp, int j, int stat) "
/**
* glp_set_col_stat - set (change) column status .
* SYNOPSIS
* void glp_set_col_stat(glp_prob *lp, int j, int stat);
* DESCRIPTION
* The routine glp_set_col_stat sets (changes) status of the structural variable associated with j-th column.
* The new status of the structural variable should be specified by the parameter stat as follows:
* GLP_BS - basic variable; GLP_NL - non-basic variable; GLP_NU - non-basic variable on its upper bound; if the variable is not double-bounded, this means the same as GLP_NL (only in case of this routine); GLP_NF - the same as GLP_NL (only in case of this routine); GLP_NS - the same as GLP_NL (only in case of this routine).
*/
public";
%javamethodmodifiers glp_std_basis(glp_prob *lp) "
/**
* glp_std_basis - construct standard initial LP basis .
* SYNOPSIS
* void glp_std_basis(glp_prob *lp);
* DESCRIPTION
* The routine glp_std_basis builds the \"standard\" (trivial) initial basis for the specified problem object.
* In the \"standard\" basis all auxiliary variables are basic, and all structural variables are non-basic.
*/
public";
%javamethodmodifiers glp_intfeas1(glp_prob *P, int use_bound, int obj_bound) "
/**
*/
public";
%javamethodmodifiers strspx(char *str) "
/**
* strspx - remove all spaces from character string .
* SYNOPSIS
* #include \"misc.h\" char *strspx(char *str);
* DESCRIPTION
* The routine strspx removes all spaces from the character string str.
* RETURNS
* The routine returns a pointer to the character string.
* EXAMPLES
* strspx(\" Errare humanum est \") => \"Errarehumanumest\"
* strspx(\" \") => \"\"
*/
public";
%javamethodmodifiers kellerman(int n, int(*func)(void *info, int i, int ind[]), void *info, void *H_) "
/**
*/
public";
%javamethodmodifiers ifu_expand(IFU *ifu, double c[], double r[], double d) "
/**
*/
public";
%javamethodmodifiers ifu_bg_update(IFU *ifu, double c[], double r[], double d) "
/**
*/
public";
%javamethodmodifiers givens(double a, double b, double *c, double *s) "
/**
*/
public";
%javamethodmodifiers ifu_gr_update(IFU *ifu, double c[], double r[], double d) "
/**
*/
public";
%javamethodmodifiers ifu_a_solve(IFU *ifu, double x[], double w[]) "
/**
*/
public";
%javamethodmodifiers ifu_at_solve(IFU *ifu, double x[], double w[]) "
/**
*/
public";
%javamethodmodifiers cfg_create_graph(int n, int nv_max) "
/**
*/
public";
%javamethodmodifiers add_edge(CFG *G, int v, int w) "
/**
*/
public";
%javamethodmodifiers cfg_add_clique(CFG *G, int size, const int ind[]) "
/**
*/
public";
%javamethodmodifiers cfg_get_adjacent(CFG *G, int v, int ind[]) "
/**
*/
public";
%javamethodmodifiers intersection(int d_len, int d_ind[], int d_pos[], int len, const int ind[]) "
/**
*/
public";
%javamethodmodifiers cfg_expand_clique(CFG *G, int c_len, int c_ind[]) "
/**
*/
public";
%javamethodmodifiers cfg_check_clique(CFG *G, int c_len, const int c_ind[]) "
/**
*/
public";
%javamethodmodifiers cfg_delete_graph(CFG *G) "
/**
*/
public";
%javamethodmodifiers AMD_post_tree(Int root, Int k, Int Child[], const Int Sibling[], Int Order[], Int Stack[]) "
/**
*/
public";
%javamethodmodifiers db_iodbc_open_int(TABDCA *dca, int mode, const char **sqllines) "
/**
*/
public";
%javamethodmodifiers db_mysql_open_int(TABDCA *dca, int mode, const char **sqllines) "
/**
*/
public";
%javamethodmodifiers db_iodbc_open(TABDCA *dca, int mode) "
/**
*/
public";
%javamethodmodifiers db_iodbc_read(TABDCA *dca, void *link) "
/**
*/
public";
%javamethodmodifiers db_iodbc_write(TABDCA *dca, void *link) "
/**
*/
public";
%javamethodmodifiers db_iodbc_close(TABDCA *dca, void *link) "
/**
*/
public";
%javamethodmodifiers db_mysql_open(TABDCA *dca, int mode) "
/**
*/
public";
%javamethodmodifiers db_mysql_read(TABDCA *dca, void *link) "
/**
*/
public";
%javamethodmodifiers db_mysql_write(TABDCA *dca, void *link) "
/**
*/
public";
%javamethodmodifiers db_mysql_close(TABDCA *dca, void *link) "
/**
*/
public";
%javamethodmodifiers most_feas(glp_tree *T) "
/**
* ios_choose_node - select subproblem to continue the search .
* SYNOPSIS
* #include \"glpios.h\" int ios_choose_node(glp_tree *T);
* DESCRIPTION
* The routine ios_choose_node selects a subproblem from the active list to continue the search. The choice depends on the backtracking technique option.
* RETURNS
* The routine ios_choose_node return the reference number of the subproblem selected.
*/
public";
%javamethodmodifiers best_proj(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers best_node(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers ios_choose_node(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers npp_implied_bounds(NPP *npp, NPPROW *p) "
/**
* npp_implied_bounds - determine implied column bounds .
* SYNOPSIS
* #include \"glpnpp.h\" void npp_implied_bounds(NPP *npp, NPPROW *p);
* DESCRIPTION
* The routine npp_implied_bounds inspects general row (constraint) p:
* L[p] <= sum a[p,j] x[j] <= U[p], (1)
* l[j] <= x[j] <= u[j], (2)
* where L[p] <= U[p] and l[j] <= u[j] for all a[p,j] != 0, to compute implied bounds of columns (variables x[j]) in this row.
* The routine stores implied column bounds l'[j] and u'[j] in column descriptors (NPPCOL); it does not change current column bounds l[j] and u[j]. (Implied column bounds can be then used to strengthen the current column bounds; see the routines npp_implied_lower and npp_implied_upper).
* ALGORITHM
* Current column bounds (2) define implied lower and upper bounds of row (1) as follows:
* L'[p] = inf sum a[p,j] x[j] = j (3) = sum a[p,j] l[j] + sum a[p,j] u[j], j in Jp j in Jn
* U'[p] = sup sum a[p,j] x[j] = (4) = sum a[p,j] u[j] + sum a[p,j] l[j], j in Jp j in Jn
* Jp = {j: a[p,j] > 0}, Jn = {j: a[p,j] < 0}. (5)
* (Note that bounds of all columns in row p are assumed to be correct, so L'[p] <= U'[p].)
* If L[p] > L'[p] and/or U[p] < U'[p], the lower and/or upper bound of row (1) can be active, in which case such row defines implied bounds of its variables.
* Let x[k] be some variable having in row (1) coefficient a[p,k] != 0. Consider a case when row lower bound can be active (L[p] > L'[p]):
* sum a[p,j] x[j] >= L[p] ==> j
* sum a[p,j] x[j] + a[p,k] x[k] >= L[p] ==> j!=k (6) a[p,k] x[k] >= L[p] - sum a[p,j] x[j] ==> j!=k
* a[p,k] x[k] >= L[p,k],
* where
* L[p,k] = inf(L[p] - sum a[p,j] x[j]) = j!=k
* = L[p] - sup sum a[p,j] x[j] = (7) j!=k
* = L[p] - sum a[p,j] u[j] - sum a[p,j] l[j]. j in Jpk} j in Jnk}
* Thus:
* x[k] >= l'[k] = L[p,k] / a[p,k], if a[p,k] > 0, (8)
* x[k] <= u'[k] = L[p,k] / a[p,k], if a[p,k] < 0. (9)
* where l'[k] and u'[k] are implied lower and upper bounds of variable x[k], resp.
* Now consider a similar case when row upper bound can be active (U[p] < U'[p]):
* sum a[p,j] x[j] <= U[p] ==> j
* sum a[p,j] x[j] + a[p,k] x[k] <= U[p] ==> j!=k (10) a[p,k] x[k] <= U[p] - sum a[p,j] x[j] ==> j!=k
* a[p,k] x[k] <= U[p,k],
* where:
* U[p,k] = sup(U[p] - sum a[p,j] x[j]) = j!=k
* = U[p] - inf sum a[p,j] x[j] = (11) j!=k
* = U[p] - sum a[p,j] l[j] - sum a[p,j] u[j]. j in Jpk} j in Jnk}
* Thus:
* x[k] <= u'[k] = U[p,k] / a[p,k], if a[p,k] > 0, (12)
* x[k] >= l'[k] = U[p,k] / a[p,k], if a[p,k] < 0. (13)
* Note that in formulae (8), (9), (12), and (13) coefficient a[p,k] must not be too small in magnitude relatively to other non-zero coefficients in row (1), i.e. the following condition must hold:
* |a[p,k]| >= eps * max(1, |a[p,j]|), (14) j
* where eps is a relative tolerance for constraint coefficients. Otherwise the implied column bounds can be numerical inreliable. For example, using formula (8) for the following inequality constraint:
* 1e-12 x1 - x2 - x3 >= 0,
* where x1 >= -1, x2, x3, >= 0, may lead to numerically unreliable conclusion that x1 >= 0.
* Using formulae (8), (9), (12), and (13) to compute implied bounds for one variable requires |J| operations, where J = {j: a[p,j] != 0}, because this needs computing L[p,k] and U[p,k]. Thus, computing implied bounds for all variables in row (1) would require |J|^2 operations, that is not a good technique. However, the total number of operations can be reduced to |J| as follows.
* Let a[p,k] > 0. Then from (7) and (11) we have:
* L[p,k] = L[p] - (U'[p] - a[p,k] u[k]) = = L[p] - U'[p] + a[p,k] u[k],
* U[p,k] = U[p] - (L'[p] - a[p,k] l[k]) = = U[p] - L'[p] + a[p,k] l[k],
* where L'[p] and U'[p] are implied row lower and upper bounds defined by formulae (3) and (4). Substituting these expressions into (8) and (12) gives:
* l'[k] = L[p,k] / a[p,k] = u[k] + (L[p] - U'[p]) / a[p,k], (15)
* u'[k] = U[p,k] / a[p,k] = l[k] + (U[p] - L'[p]) / a[p,k]. (16)
* Similarly, if a[p,k] < 0, according to (7) and (11) we have:
* L[p,k] = L[p] - (U'[p] - a[p,k] l[k]) = = L[p] - U'[p] + a[p,k] l[k],
* U[p,k] = U[p] - (L'[p] - a[p,k] u[k]) = = U[p] - L'[p] + a[p,k] u[k],
* and substituting these expressions into (8) and (12) gives:
* l'[k] = U[p,k] / a[p,k] = u[k] + (U[p] - L'[p]) / a[p,k], (17)
* u'[k] = L[p,k] / a[p,k] = l[k] + (L[p] - U'[p]) / a[p,k]. (18)
* Note that formulae (15)-(18) can be used only if L'[p] and U'[p] exist. However, if for some variable x[j] it happens that l[j] = -oo and/or u[j] = +oo, values of L'[p] (if a[p,j] > 0) and/or U'[p] (if a[p,j] < 0) are undefined. Consider, therefore, the most general situation, when some column bounds (2) may not exist.
* Let:
* J' = {j : (a[p,j] > 0 and l[j] = -oo) or (19) (a[p,j] < 0 and u[j] = +oo)}.
* Then (assuming that row upper bound U[p] can be active) the following three cases are possible:
* 1) |J'| = 0. In this case L'[p] exists, thus, for all variables x[j] in row (1) we can use formulae (16) and (17);
* 2) J' = {k}. In this case L'[p] = -oo, however, U[p,k] (11) exists, so for variable x[k] we can use formulae (12) and (13). Note that for all other variables x[j] (j != k) l'[j] = -oo (if a[p,j] < 0) or u'[j] = +oo (if a[p,j] > 0);
* 3) |J'| > 1. In this case for all variables x[j] in row [1] we have l'[j] = -oo (if a[p,j] < 0) or u'[j] = +oo (if a[p,j] > 0).
* Similarly, let:
* J'' = {j : (a[p,j] > 0 and u[j] = +oo) or (20) (a[p,j] < 0 and l[j] = -oo)}.
* Then (assuming that row lower bound L[p] can be active) the following three cases are possible:
* 1) |J''| = 0. In this case U'[p] exists, thus, for all variables x[j] in row (1) we can use formulae (15) and (18);
* 2) J'' = {k}. In this case U'[p] = +oo, however, L[p,k] (7) exists, so for variable x[k] we can use formulae (8) and (9). Note that for all other variables x[j] (j != k) l'[j] = -oo (if a[p,j] > 0) or u'[j] = +oo (if a[p,j] < 0);
* 3) |J''| > 1. In this case for all variables x[j] in row (1) we have l'[j] = -oo (if a[p,j] > 0) or u'[j] = +oo (if a[p,j] < 0).
*/
public";
%javamethodmodifiers npp_empty_row(NPP *npp, NPPROW *p) "
/**
* npp_empty_row - process empty row .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_empty_row(NPP *npp, NPPROW *p);
* DESCRIPTION
* The routine npp_empty_row processes row p, which is empty, i.e. coefficients at all columns in this row are zero:
* L[p] <= sum 0 x[j] <= U[p], (1)
* where L[p] <= U[p].
* RETURNS
* 0 - success;
* 1 - problem has no primal feasible solution.
* PROBLEM TRANSFORMATION
* If the following conditions hold:
* L[p] <= +eps, U[p] >= -eps, (2)
* where eps is an absolute tolerance for row value, the row p is redundant. In this case it can be replaced by equivalent redundant row, which is free (unbounded), and then removed from the problem. Otherwise, the row p is infeasible and, thus, the problem has no primal feasible solution.
* RECOVERING BASIC SOLUTION
* See the routine npp_free_row.
* RECOVERING INTERIOR-POINT SOLUTION
* See the routine npp_free_row.
* RECOVERING MIP SOLUTION
* None needed.
*/
public";
%javamethodmodifiers rcv_empty_col(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_empty_col(NPP *npp, NPPCOL *q) "
/**
*/
public";
%javamethodmodifiers npp_implied_value(NPP *npp, NPPCOL *q, double s) "
/**
* npp_implied_value - process implied column value .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_implied_value(NPP *npp, NPPCOL *q, double s);
* DESCRIPTION
* For column q:
* l[q] <= x[q] <= u[q], (1)
* where l[q] < u[q], the routine npp_implied_value processes its implied value s[q]. If this implied value satisfies to the current column bounds and integrality condition, the routine fixes column q at the given point. Note that the column is kept in the problem in any case.
* RETURNS
* 0 - column has been fixed;
* 1 - implied value violates to current column bounds;
* 2 - implied value violates integrality condition.
* ALGORITHM
* Implied column value s[q] satisfies to the current column bounds if the following condition holds:
* l[q] - eps <= s[q] <= u[q] + eps, (2)
* where eps is an absolute tolerance for column value. If the column is integral, the following condition also must hold:
* |s[q] - floor(s[q]+0.5)| <= eps, (3)
* where floor(s[q]+0.5) is the nearest integer to s[q].
* If both condition (2) and (3) are satisfied, the column can be fixed at the value s[q], or, if it is integral, at floor(s[q]+0.5). Otherwise, if s[q] violates (2) or (3), the problem has no feasible solution.
* Note: If s[q] is close to l[q] or u[q], it seems to be reasonable to fix the column at its lower or upper bound, resp. rather than at the implied value.
*/
public";
%javamethodmodifiers rcv_eq_singlet(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_eq_singlet(NPP *npp, NPPROW *p) "
/**
*/
public";
%javamethodmodifiers npp_implied_lower(NPP *npp, NPPCOL *q, double l) "
/**
* npp_implied_lower - process implied column lower bound .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_implied_lower(NPP *npp, NPPCOL *q, double l);
* DESCRIPTION
* For column q:
* l[q] <= x[q] <= u[q], (1)
* where l[q] < u[q], the routine npp_implied_lower processes its implied lower bound l'[q]. As the result the current column lower bound may increase. Note that the column is kept in the problem in any case.
* RETURNS
* 0 - current column lower bound has not changed;
* 1 - current column lower bound has changed, but not significantly;
* 2 - current column lower bound has significantly changed;
* 3 - column has been fixed on its upper bound;
* 4 - implied lower bound violates current column upper bound.
* ALGORITHM
* If column q is integral, before processing its implied lower bound should be rounded up: ( floor(l'[q]+0.5), if |l'[q] - floor(l'[q]+0.5)| <= eps
l'[q] := < (2) ( ceil(l'[q]), otherwise
* where floor(l'[q]+0.5) is the nearest integer to l'[q], ceil(l'[q]) is smallest integer not less than l'[q], and eps is an absolute tolerance for column value.
* Processing implied column lower bound l'[q] includes the following cases:
* 1) if l'[q] < l[q] + eps, implied lower bound is redundant;
* 2) if l[q] + eps <= l[q] <= u[q] + eps, current column lower bound l[q] can be strengthened by replacing it with l'[q]. If in this case new column lower bound becomes close to current column upper bound u[q], the column can be fixed on its upper bound;
* 3) if l'[q] > u[q] + eps, implied lower bound violates current column upper bound u[q], in which case the problem has no primal feasible solution.
*/
public";
%javamethodmodifiers npp_implied_upper(NPP *npp, NPPCOL *q, double u) "
/**
* npp_implied_upper - process implied column upper bound .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_implied_upper(NPP *npp, NPPCOL *q, double u);
* DESCRIPTION
* For column q:
* l[q] <= x[q] <= u[q], (1)
* where l[q] < u[q], the routine npp_implied_upper processes its implied upper bound u'[q]. As the result the current column upper bound may decrease. Note that the column is kept in the problem in any case.
* RETURNS
* 0 - current column upper bound has not changed;
* 1 - current column upper bound has changed, but not significantly;
* 2 - current column upper bound has significantly changed;
* 3 - column has been fixed on its lower bound;
* 4 - implied upper bound violates current column lower bound.
* ALGORITHM
* If column q is integral, before processing its implied upper bound should be rounded down: ( floor(u'[q]+0.5), if |u'[q] - floor(l'[q]+0.5)| <= eps
u'[q] := < (2) ( floor(l'[q]), otherwise
* where floor(u'[q]+0.5) is the nearest integer to u'[q], floor(u'[q]) is largest integer not greater than u'[q], and eps is an absolute tolerance for column value.
* Processing implied column upper bound u'[q] includes the following cases:
* 1) if u'[q] > u[q] - eps, implied upper bound is redundant;
* 2) if l[q] - eps <= u[q] <= u[q] - eps, current column upper bound u[q] can be strengthened by replacing it with u'[q]. If in this case new column upper bound becomes close to current column lower bound, the column can be fixed on its lower bound;
* 3) if u'[q] < l[q] - eps, implied upper bound violates current column lower bound l[q], in which case the problem has no primal feasible solution.
*/
public";
%javamethodmodifiers rcv_ineq_singlet(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_ineq_singlet(NPP *npp, NPPROW *p) "
/**
*/
public";
%javamethodmodifiers rcv_implied_slack(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_implied_slack(NPP *npp, NPPCOL *q) "
/**
*/
public";
%javamethodmodifiers rcv_implied_free(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_implied_free(NPP *npp, NPPCOL *q) "
/**
*/
public";
%javamethodmodifiers rcv_eq_doublet(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_eq_doublet(NPP *npp, NPPROW *p) "
/**
*/
public";
%javamethodmodifiers rcv_forcing_row(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_forcing_row(NPP *npp, NPPROW *p, int at) "
/**
*/
public";
%javamethodmodifiers npp_analyze_row(NPP *npp, NPPROW *p) "
/**
* npp_analyze_row - perform general row analysis .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_analyze_row(NPP *npp, NPPROW *p);
* DESCRIPTION
* The routine npp_analyze_row performs analysis of row p of general format:
* L[p] <= sum a[p,j] x[j] <= U[p], (1) j
* l[j] <= x[j] <= u[j], (2)
* where L[p] <= U[p] and l[j] <= u[j] for all a[p,j] != 0.
* RETURNS
* 0x?0 - row lower bound does not exist or is redundant;
* 0x?1 - row lower bound can be active;
* 0x?2 - row lower bound is a forcing bound;
* 0x0? - row upper bound does not exist or is redundant;
* 0x1? - row upper bound can be active;
* 0x2? - row upper bound is a forcing bound;
* 0x33 - row bounds are inconsistent with column bounds.
* ALGORITHM
* Analysis of row (1) is based on analysis of its implied lower and upper bounds, which are determined by bounds of corresponding columns (variables) as follows:
* L'[p] = inf sum a[p,j] x[j] = j (3) = sum a[p,j] l[j] + sum a[p,j] u[j], j in Jp j in Jn
* U'[p] = sup sum a[p,j] x[j] = (4) = sum a[p,j] u[j] + sum a[p,j] l[j], j in Jp j in Jn
* Jp = {j: a[p,j] > 0}, Jn = {j: a[p,j] < 0}. (5)
* (Note that bounds of all columns in row p are assumed to be correct, so L'[p] <= U'[p].)
* Analysis of row lower bound L[p] includes the following cases:
* 1) if L[p] > U'[p] + eps, where eps is an absolute tolerance for row value, row lower bound L[p] and implied row upper bound U'[p] are inconsistent, ergo, the problem has no primal feasible solution;
* 2) if U'[p] - eps <= L[p] <= U'[p] + eps, i.e. if L[p] =~ U'[p], the row is a forcing row on its lower bound (see description of the routine npp_forcing_row);
* 3) if L[p] > L'[p] + eps, row lower bound L[p] can be active (this conclusion does not account other rows in the problem);
* 4) if L[p] <= L'[p] + eps, row lower bound L[p] cannot be active, so it is redundant and can be removed (replaced by -oo).
* Analysis of row upper bound U[p] is performed in a similar way and includes the following cases:
* 1) if U[p] < L'[p] - eps, row upper bound U[p] and implied row lower bound L'[p] are inconsistent, ergo the problem has no primal feasible solution;
* 2) if L'[p] - eps <= U[p] <= L'[p] + eps, i.e. if U[p] =~ L'[p], the row is a forcing row on its upper bound (see description of the routine npp_forcing_row);
* 3) if U[p] < U'[p] - eps, row upper bound U[p] can be active (this conclusion does not account other rows in the problem);
* 4) if U[p] >= U'[p] - eps, row upper bound U[p] cannot be active, so it is redundant and can be removed (replaced by +oo).
*/
public";
%javamethodmodifiers rcv_inactive_bound(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_inactive_bound(NPP *npp, NPPROW *p, int which) "
/**
*/
public";
%javamethodmodifiers initialize(void) "
/**
*/
public";
%javamethodmodifiers open(const char *path, int oflag,...) "
/**
*/
public";
%javamethodmodifiers read(int fd, void *buf, unsigned long nbyte) "
/**
*/
public";
%javamethodmodifiers write(int fd, const void *buf, unsigned long nbyte) "
/**
*/
public";
%javamethodmodifiers lseek(int fd, long offset, int whence) "
/**
*/
public";
%javamethodmodifiers close(int fd) "
/**
*/
public";
%javamethodmodifiers main(int argc, char **argv) "
/**
*/
public";
%javamethodmodifiers spx_alloc_at(SPXLP *lp, SPXAT *at) "
/**
*/
public";
%javamethodmodifiers spx_build_at(SPXLP *lp, SPXAT *at) "
/**
*/
public";
%javamethodmodifiers spx_at_prod(SPXLP *lp, SPXAT *at, double y[], double s, const double x[]) "
/**
*/
public";
%javamethodmodifiers spx_nt_prod1(SPXLP *lp, SPXAT *at, double y[], int ign, double s, const double x[]) "
/**
*/
public";
%javamethodmodifiers spx_eval_trow1(SPXLP *lp, SPXAT *at, const double rho[], double trow[]) "
/**
*/
public";
%javamethodmodifiers spx_free_at(SPXLP *lp, SPXAT *at) "
/**
*/
public";
%javamethodmodifiers prepare_row_info(int n, const double a[], const double l[], const double u[], struct f_info *f) "
/**
*/
public";
%javamethodmodifiers row_implied_bounds(const struct f_info *f, double *LL, double *UU) "
/**
*/
public";
%javamethodmodifiers col_implied_bounds(const struct f_info *f, int n, const double a[], double L, double U, const double l[], const double u[], int k, double *ll, double *uu) "
/**
*/
public";
%javamethodmodifiers check_row_bounds(const struct f_info *f, double *L_, double *U_) "
/**
*/
public";
%javamethodmodifiers check_col_bounds(const struct f_info *f, int n, const double a[], double L, double U, const double l[], const double u[], int flag, int j, double *_lj, double *_uj) "
/**
*/
public";
%javamethodmodifiers check_efficiency(int flag, double l, double u, double ll, double uu) "
/**
*/
public";
%javamethodmodifiers basic_preprocessing(glp_prob *mip, double L[], double U[], double l[], double u[], int nrs, const int num[], int max_pass) "
/**
*/
public";
%javamethodmodifiers ios_preprocess_node(glp_tree *tree, int max_pass) "
/**
* ios_preprocess_node - preprocess current subproblem .
* SYNOPSIS
* #include \"glpios.h\" int ios_preprocess_node(glp_tree *tree, int max_pass);
* DESCRIPTION
* The routine ios_preprocess_node performs basic preprocessing of the current subproblem.
* RETURNS
* If no primal infeasibility is detected, the routine returns zero, otherwise non-zero.
*/
public";
%javamethodmodifiers lpx_eval_tab_row(glp_prob *lp, int k, int ind[], double val[]) "
/**
*/
public";
%javamethodmodifiers lpx_dual_ratio_test(glp_prob *lp, int len, const int ind[], const double val[], int how, double tol) "
/**
*/
public";
%javamethodmodifiers new_node(glp_tree *tree, IOSNPD *parent) "
/**
* ios_create_tree - create branch-and-bound tree .
* SYNOPSIS
* #include \"glpios.h\" glp_tree *ios_create_tree(glp_prob *mip, const glp_iocp *parm);
* DESCRIPTION
* The routine ios_create_tree creates the branch-and-bound tree.
* Being created the tree consists of the only root subproblem whose reference number is 1. Note that initially the root subproblem is in frozen state and therefore needs to be revived.
* RETURNS
* The routine returns a pointer to the tree created.
*/
public";
%javamethodmodifiers ios_create_tree(glp_prob *mip, const glp_iocp *parm) "
/**
*/
public";
%javamethodmodifiers ios_revive_node(glp_tree *tree, int p) "
/**
* ios_revive_node - revive specified subproblem .
* SYNOPSIS
* #include \"glpios.h\" void ios_revive_node(glp_tree *tree, int p);
* DESCRIPTION
* The routine ios_revive_node revives the specified subproblem, whose reference number is p, and thereby makes it the current subproblem. Note that the specified subproblem must be active. Besides, if the current subproblem already exists, it must be frozen before reviving another subproblem.
*/
public";
%javamethodmodifiers ios_freeze_node(glp_tree *tree) "
/**
* ios_freeze_node - freeze current subproblem .
* SYNOPSIS
* #include \"glpios.h\" void ios_freeze_node(glp_tree *tree);
* DESCRIPTION
* The routine ios_freeze_node freezes the current subproblem.
*/
public";
%javamethodmodifiers get_slot(glp_tree *tree) "
/**
* ios_clone_node - clone specified subproblem .
* SYNOPSIS
* #include \"glpios.h\" void ios_clone_node(glp_tree *tree, int p, int nnn, int ref[]);
* DESCRIPTION
* The routine ios_clone_node clones the specified subproblem, whose reference number is p, creating its nnn exact copies. Note that the specified subproblem must be active and must be in the frozen state (i.e. it must not be the current subproblem).
* Each clone, an exact copy of the specified subproblem, becomes a new active subproblem added to the end of the active list. After cloning the specified subproblem becomes inactive.
* The reference numbers of clone subproblems are stored to locations ref[1], ..., ref[nnn].
*/
public";
%javamethodmodifiers ios_clone_node(glp_tree *tree, int p, int nnn, int ref[]) "
/**
*/
public";
%javamethodmodifiers ios_delete_node(glp_tree *tree, int p) "
/**
* ios_delete_node - delete specified subproblem .
* SYNOPSIS
* #include \"glpios.h\" void ios_delete_node(glp_tree *tree, int p);
* DESCRIPTION
* The routine ios_delete_node deletes the specified subproblem, whose reference number is p. The subproblem must be active and must be in the frozen state (i.e. it must not be the current subproblem).
* Note that deletion is performed recursively, i.e. if a subproblem to be deleted is the only child of its parent, the parent subproblem is also deleted, etc.
*/
public";
%javamethodmodifiers ios_delete_tree(glp_tree *tree) "
/**
* ios_delete_tree - delete branch-and-bound tree .
* SYNOPSIS
* #include \"glpios.h\" void ios_delete_tree(glp_tree *tree);
* DESCRIPTION
* The routine ios_delete_tree deletes the branch-and-bound tree, which the parameter tree points to, and frees all the memory allocated to this program object.
* On exit components of the problem object are restored to correspond to the original MIP passed to the routine ios_create_tree.
*/
public";
%javamethodmodifiers ios_eval_degrad(glp_tree *tree, int j, double *dn, double *up) "
/**
* ios_eval_degrad - estimate obj. .
* degrad. for down- and up-branches
* SYNOPSIS
* #include \"glpios.h\" void ios_eval_degrad(glp_tree *tree, int j, double *dn, double *up);
* DESCRIPTION
* Given optimal basis to LP relaxation of the current subproblem the routine ios_eval_degrad performs the dual ratio test to compute the objective values in the adjacent basis for down- and up-branches, which are stored in locations *dn and *up, assuming that x[j] is a variable chosen to branch upon.
*/
public";
%javamethodmodifiers ios_round_bound(glp_tree *tree, double bound) "
/**
* ios_round_bound - improve local bound by rounding .
* SYNOPSIS
* #include \"glpios.h\" double ios_round_bound(glp_tree *tree, double bound);
* RETURNS
* For the given local bound for any integer feasible solution to the current subproblem the routine ios_round_bound returns an improved local bound for the same integer feasible solution.
* BACKGROUND
* Let the current subproblem has the following objective function:
* z = sum c[j] * x[j] + s >= b, (1) j in J
* where J = {j: c[j] is non-zero and integer, x[j] is integer}, s is the sum of terms corresponding to fixed variables, b is an initial local bound (minimization).
* From (1) it follows that:
* d * sum (c[j] / d) * x[j] + s >= b, (2) j in J
* or, equivalently,
* sum (c[j] / d) * x[j] >= (b - s) / d = h, (3) j in J
* where d = gcd(c[j]). Since the left-hand side of (3) is integer, h = (b - s) / d can be rounded up to the nearest integer:
* h' = ceil(h) = (b' - s) / d, (4)
* that gives an rounded, improved local bound:
* b' = d * h' + s. (5)
* In case of maximization '>=' in (1) should be replaced by '<=' that leads to the following formula:
* h' = floor(h) = (b' - s) / d, (6)
* which should used in the same way as (4).
* NOTE: If b is a valid local bound for a child of the current subproblem, b' is also valid for that child subproblem.
*/
public";
%javamethodmodifiers ios_is_hopeful(glp_tree *tree, double bound) "
/**
* ios_is_hopeful - check if subproblem is hopeful .
* SYNOPSIS
* #include \"glpios.h\" int ios_is_hopeful(glp_tree *tree, double bound);
* DESCRIPTION
* Given the local bound of a subproblem the routine ios_is_hopeful checks if the subproblem can have an integer optimal solution which is better than the best one currently known.
* RETURNS
* If the subproblem can have a better integer optimal solution, the routine returns non-zero; otherwise, if the corresponding branch can be pruned, the routine returns zero.
*/
public";
%javamethodmodifiers ios_best_node(glp_tree *tree) "
/**
* ios_best_node - find active node with best local bound .
* SYNOPSIS
* #include \"glpios.h\" int ios_best_node(glp_tree *tree);
* DESCRIPTION
* The routine ios_best_node finds an active node whose local bound is best among other active nodes.
* It is understood that the integer optimal solution of the original mip problem cannot be better than the best bound, so the best bound is an lower (minimization) or upper (maximization) global bound for the original problem.
* RETURNS
* The routine ios_best_node returns the subproblem reference number for the best node. However, if the tree is empty, it returns zero.
*/
public";
%javamethodmodifiers ios_relative_gap(glp_tree *tree) "
/**
* ios_relative_gap - compute relative mip gap .
* SYNOPSIS
* #include \"glpios.h\" double ios_relative_gap(glp_tree *tree);
* DESCRIPTION
* The routine ios_relative_gap computes the relative mip gap using the formula:
* gap = |best_mip - best_bnd| / (|best_mip| + DBL_EPSILON),
* where best_mip is the best integer feasible solution found so far, best_bnd is the best (global) bound. If no integer feasible solution has been found yet, rel_gap is set to DBL_MAX.
* RETURNS
* The routine ios_relative_gap returns the relative mip gap.
*/
public";
%javamethodmodifiers ios_solve_node(glp_tree *tree) "
/**
* ios_solve_node - solve LP relaxation of current subproblem .
* SYNOPSIS
* #include \"glpios.h\" int ios_solve_node(glp_tree *tree);
* DESCRIPTION
* The routine ios_solve_node re-optimizes LP relaxation of the current subproblem using the dual simplex method.
* RETURNS
* The routine returns the code which is reported by glp_simplex.
*/
public";
%javamethodmodifiers ios_create_pool(glp_tree *tree) "
/**
*/
public";
%javamethodmodifiers ios_add_row(glp_tree *tree, IOSPOOL *pool, const char *name, int klass, int flags, int len, const int ind[], const double val[], int type, double rhs) "
/**
*/
public";
%javamethodmodifiers ios_find_row(IOSPOOL *pool, int i) "
/**
*/
public";
%javamethodmodifiers ios_del_row(glp_tree *tree, IOSPOOL *pool, int i) "
/**
*/
public";
%javamethodmodifiers ios_clear_pool(glp_tree *tree, IOSPOOL *pool) "
/**
*/
public";
%javamethodmodifiers ios_delete_pool(glp_tree *tree, IOSPOOL *pool) "
/**
*/
public";
%javamethodmodifiers ios_process_sol(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers spx_chuzr_std(SPXLP *lp, int phase, const double beta[], int q, double s, const double tcol[], int *p_flag, double tol_piv, double tol, double tol1) "
/**
*/
public";
%javamethodmodifiers spx_chuzr_harris(SPXLP *lp, int phase, const double beta[], int q, double s, const double tcol[], int *p_flag, double tol_piv, double tol, double tol1) "
/**
*/
public";
%javamethodmodifiers read_char(struct csv *csv) "
/**
*/
public";
%javamethodmodifiers read_field(struct csv *csv) "
/**
*/
public";
%javamethodmodifiers csv_open_file(TABDCA *dca, int mode) "
/**
*/
public";
%javamethodmodifiers csv_read_record(TABDCA *dca, struct csv *csv) "
/**
*/
public";
%javamethodmodifiers csv_write_record(TABDCA *dca, struct csv *csv) "
/**
*/
public";
%javamethodmodifiers csv_close_file(TABDCA *dca, struct csv *csv) "
/**
*/
public";
%javamethodmodifiers read_byte(struct dbf *dbf) "
/**
*/
public";
%javamethodmodifiers read_header(TABDCA *dca, struct dbf *dbf) "
/**
*/
public";
%javamethodmodifiers parse_third_arg(TABDCA *dca, struct dbf *dbf) "
/**
*/
public";
%javamethodmodifiers write_byte(struct dbf *dbf, int b) "
/**
*/
public";
%javamethodmodifiers write_header(TABDCA *dca, struct dbf *dbf) "
/**
*/
public";
%javamethodmodifiers dbf_open_file(TABDCA *dca, int mode) "
/**
*/
public";
%javamethodmodifiers dbf_read_record(TABDCA *dca, struct dbf *dbf) "
/**
*/
public";
%javamethodmodifiers dbf_write_record(TABDCA *dca, struct dbf *dbf) "
/**
*/
public";
%javamethodmodifiers dbf_close_file(TABDCA *dca, struct dbf *dbf) "
/**
*/
public";
%javamethodmodifiers mpl_tab_drv_open(MPL *mpl, int mode) "
/**
*/
public";
%javamethodmodifiers mpl_tab_drv_read(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers mpl_tab_drv_write(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers mpl_tab_drv_close(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers gmp_get_atom(int size) "
/**
*/
public";
%javamethodmodifiers gmp_free_atom(void *ptr, int size) "
/**
*/
public";
%javamethodmodifiers gmp_pool_count(void) "
/**
*/
public";
%javamethodmodifiers gmp_get_work(int size) "
/**
*/
public";
%javamethodmodifiers gmp_free_mem(void) "
/**
*/
public";
%javamethodmodifiers _mpz_init(void) "
/**
*/
public";
%javamethodmodifiers mpz_clear(mpz_t x) "
/**
*/
public";
%javamethodmodifiers mpz_set(mpz_t z, mpz_t x) "
/**
*/
public";
%javamethodmodifiers mpz_set_si(mpz_t x, int val) "
/**
*/
public";
%javamethodmodifiers mpz_get_d(mpz_t x) "
/**
*/
public";
%javamethodmodifiers mpz_get_d_2exp(int *exp, mpz_t x) "
/**
*/
public";
%javamethodmodifiers mpz_swap(mpz_t x, mpz_t y) "
/**
*/
public";
%javamethodmodifiers normalize(mpz_t x) "
/**
*/
public";
%javamethodmodifiers mpz_add(mpz_t z, mpz_t x, mpz_t y) "
/**
*/
public";
%javamethodmodifiers mpz_sub(mpz_t z, mpz_t x, mpz_t y) "
/**
*/
public";
%javamethodmodifiers mpz_mul(mpz_t z, mpz_t x, mpz_t y) "
/**
*/
public";
%javamethodmodifiers mpz_neg(mpz_t z, mpz_t x) "
/**
*/
public";
%javamethodmodifiers mpz_abs(mpz_t z, mpz_t x) "
/**
*/
public";
%javamethodmodifiers mpz_div(mpz_t q, mpz_t r, mpz_t x, mpz_t y) "
/**
*/
public";
%javamethodmodifiers mpz_gcd(mpz_t z, mpz_t x, mpz_t y) "
/**
*/
public";
%javamethodmodifiers mpz_cmp(mpz_t x, mpz_t y) "
/**
*/
public";
%javamethodmodifiers mpz_sgn(mpz_t x) "
/**
*/
public";
%javamethodmodifiers mpz_out_str(void *_fp, int base, mpz_t x) "
/**
*/
public";
%javamethodmodifiers _mpq_init(void) "
/**
*/
public";
%javamethodmodifiers mpq_clear(mpq_t x) "
/**
*/
public";
%javamethodmodifiers mpq_canonicalize(mpq_t x) "
/**
*/
public";
%javamethodmodifiers mpq_set(mpq_t z, mpq_t x) "
/**
*/
public";
%javamethodmodifiers mpq_set_si(mpq_t x, int p, unsigned int q) "
/**
*/
public";
%javamethodmodifiers mpq_get_d(mpq_t x) "
/**
*/
public";
%javamethodmodifiers mpq_set_d(mpq_t x, double val) "
/**
*/
public";
%javamethodmodifiers mpq_add(mpq_t z, mpq_t x, mpq_t y) "
/**
*/
public";
%javamethodmodifiers mpq_sub(mpq_t z, mpq_t x, mpq_t y) "
/**
*/
public";
%javamethodmodifiers mpq_mul(mpq_t z, mpq_t x, mpq_t y) "
/**
*/
public";
%javamethodmodifiers mpq_div(mpq_t z, mpq_t x, mpq_t y) "
/**
*/
public";
%javamethodmodifiers mpq_neg(mpq_t z, mpq_t x) "
/**
*/
public";
%javamethodmodifiers mpq_abs(mpq_t z, mpq_t x) "
/**
*/
public";
%javamethodmodifiers mpq_cmp(mpq_t x, mpq_t y) "
/**
*/
public";
%javamethodmodifiers mpq_sgn(mpq_t x) "
/**
*/
public";
%javamethodmodifiers mpq_out_str(void *_fp, int base, mpq_t x) "
/**
*/
public";
%javamethodmodifiers trivial_lp(glp_prob *P, const glp_smcp *parm) "
/**
* glp_simplex - solve LP problem with the simplex method .
* SYNOPSIS
* int glp_simplex(glp_prob *P, const glp_smcp *parm);
* DESCRIPTION
* The routine glp_simplex is a driver to the LP solver based on the simplex method. This routine retrieves problem data from the specified problem object, calls the solver to solve the problem instance, and stores results of computations back into the problem object.
* The simplex solver has a set of control parameters. Values of the control parameters can be passed in a structure glp_smcp, which the parameter parm points to.
* The parameter parm can be specified as NULL, in which case the LP solver uses default settings.
* RETURNS
* 0 The LP problem instance has been successfully solved. This code does not necessarily mean that the solver has found optimal solution. It only means that the solution process was successful.
* GLP_EBADB Unable to start the search, because the initial basis specified in the problem object is invalidthe number of basic (auxiliary and structural) variables is not the same as the number of rows in the problem object.
* GLP_ESING Unable to start the search, because the basis matrix correspodning to the initial basis is singular within the working precision.
* GLP_ECOND Unable to start the search, because the basis matrix correspodning to the initial basis is ill-conditioned, i.e. its condition number is too large.
* GLP_EBOUND Unable to start the search, because some double-bounded variables have incorrect bounds.
* GLP_EFAIL The search was prematurely terminated due to the solver failure.
* GLP_EOBJLL The search was prematurely terminated, because the objective function being maximized has reached its lower limit and continues decreasing (dual simplex only).
* GLP_EOBJUL The search was prematurely terminated, because the objective function being minimized has reached its upper limit and continues increasing (dual simplex only).
* GLP_EITLIM The search was prematurely terminated, because the simplex iteration limit has been exceeded.
* GLP_ETMLIM The search was prematurely terminated, because the time limit has been exceeded.
* GLP_ENOPFS The LP problem instance has no primal feasible solution (only if the LP presolver is used).
* GLP_ENODFS The LP problem instance has no dual feasible solution (only if the LP presolver is used).
*/
public";
%javamethodmodifiers solve_lp(glp_prob *P, const glp_smcp *parm) "
/**
*/
public";
%javamethodmodifiers preprocess_and_solve_lp(glp_prob *P, const glp_smcp *parm) "
/**
*/
public";
%javamethodmodifiers glp_simplex(glp_prob *P, const glp_smcp *parm) "
/**
*/
public";
%javamethodmodifiers glp_init_smcp(glp_smcp *parm) "
/**
* glp_init_smcp - initialize simplex method control parameters .
* SYNOPSIS
* void glp_init_smcp(glp_smcp *parm);
* DESCRIPTION
* The routine glp_init_smcp initializes control parameters, which are used by the simplex solver, with default values.
* Default values of the control parameters are stored in a glp_smcp structure, which the parameter parm points to.
*/
public";
%javamethodmodifiers glp_get_status(glp_prob *lp) "
/**
* glp_get_status - retrieve generic status of basic solution .
* SYNOPSIS
* int glp_get_status(glp_prob *lp);
* RETURNS
* The routine glp_get_status reports the generic status of the basic solution for the specified problem object as follows:
* GLP_OPT - solution is optimal; GLP_FEAS - solution is feasible; GLP_INFEAS - solution is infeasible; GLP_NOFEAS - problem has no feasible solution; GLP_UNBND - problem has unbounded solution; GLP_UNDEF - solution is undefined.
*/
public";
%javamethodmodifiers glp_get_prim_stat(glp_prob *lp) "
/**
* glp_get_prim_stat - retrieve status of primal basic solution .
* SYNOPSIS
* int glp_get_prim_stat(glp_prob *lp);
* RETURNS
* The routine glp_get_prim_stat reports the status of the primal basic solution for the specified problem object as follows:
* GLP_UNDEF - primal solution is undefined; GLP_FEAS - primal solution is feasible; GLP_INFEAS - primal solution is infeasible; GLP_NOFEAS - no primal feasible solution exists.
*/
public";
%javamethodmodifiers glp_get_dual_stat(glp_prob *lp) "
/**
* glp_get_dual_stat - retrieve status of dual basic solution .
* SYNOPSIS
* int glp_get_dual_stat(glp_prob *lp);
* RETURNS
* The routine glp_get_dual_stat reports the status of the dual basic solution for the specified problem object as follows:
* GLP_UNDEF - dual solution is undefined; GLP_FEAS - dual solution is feasible; GLP_INFEAS - dual solution is infeasible; GLP_NOFEAS - no dual feasible solution exists.
*/
public";
%javamethodmodifiers glp_get_obj_val(glp_prob *lp) "
/**
* glp_get_obj_val - retrieve objective value (basic solution) .
* SYNOPSIS
* double glp_get_obj_val(glp_prob *lp);
* RETURNS
* The routine glp_get_obj_val returns value of the objective function for basic solution.
*/
public";
%javamethodmodifiers glp_get_row_stat(glp_prob *lp, int i) "
/**
* glp_get_row_stat - retrieve row status .
* SYNOPSIS
* int glp_get_row_stat(glp_prob *lp, int i);
* RETURNS
* The routine glp_get_row_stat returns current status assigned to the auxiliary variable associated with i-th row as follows:
* GLP_BS - basic variable; GLP_NL - non-basic variable on its lower bound; GLP_NU - non-basic variable on its upper bound; GLP_NF - non-basic free (unbounded) variable; GLP_NS - non-basic fixed variable.
*/
public";
%javamethodmodifiers glp_get_row_prim(glp_prob *lp, int i) "
/**
* glp_get_row_prim - retrieve row primal value (basic solution) .
* SYNOPSIS
* double glp_get_row_prim(glp_prob *lp, int i);
* RETURNS
* The routine glp_get_row_prim returns primal value of the auxiliary variable associated with i-th row.
*/
public";
%javamethodmodifiers glp_get_row_dual(glp_prob *lp, int i) "
/**
* glp_get_row_dual - retrieve row dual value (basic solution) .
* SYNOPSIS
* double glp_get_row_dual(glp_prob *lp, int i);
* RETURNS
* The routine glp_get_row_dual returns dual value (i.e. reduced cost) of the auxiliary variable associated with i-th row.
*/
public";
%javamethodmodifiers glp_get_col_stat(glp_prob *lp, int j) "
/**
* glp_get_col_stat - retrieve column status .
* SYNOPSIS
* int glp_get_col_stat(glp_prob *lp, int j);
* RETURNS
* The routine glp_get_col_stat returns current status assigned to the structural variable associated with j-th column as follows:
* GLP_BS - basic variable; GLP_NL - non-basic variable on its lower bound; GLP_NU - non-basic variable on its upper bound; GLP_NF - non-basic free (unbounded) variable; GLP_NS - non-basic fixed variable.
*/
public";
%javamethodmodifiers glp_get_col_prim(glp_prob *lp, int j) "
/**
* glp_get_col_prim - retrieve column primal value (basic solution) .
* SYNOPSIS
* double glp_get_col_prim(glp_prob *lp, int j);
* RETURNS
* The routine glp_get_col_prim returns primal value of the structural variable associated with j-th column.
*/
public";
%javamethodmodifiers glp_get_col_dual(glp_prob *lp, int j) "
/**
* glp_get_col_dual - retrieve column dual value (basic solution) .
* SYNOPSIS
* double glp_get_col_dual(glp_prob *lp, int j);
* RETURNS
* The routine glp_get_col_dual returns dual value (i.e. reduced cost) of the structural variable associated with j-th column.
*/
public";
%javamethodmodifiers glp_get_unbnd_ray(glp_prob *lp) "
/**
* glp_get_unbnd_ray - determine variable causing unboundedness .
* SYNOPSIS
* int glp_get_unbnd_ray(glp_prob *lp);
* RETURNS
* The routine glp_get_unbnd_ray returns the number k of a variable, which causes primal or dual unboundedness. If 1 <= k <= m, it is k-th auxiliary variable, and if m+1 <= k <= m+n, it is (k-m)-th structural variable, where m is the number of rows, n is the number of columns in the problem object. If such variable is not defined, the routine returns 0.
* COMMENTS
* If it is not exactly known which version of the simplex solver detected unboundedness, i.e. whether the unboundedness is primal or dual, it is sufficient to check the status of the variable reported with the routine glp_get_row_stat or glp_get_col_stat. If the variable is non-basic, the unboundedness is primal, otherwise, if the variable is basic, the unboundedness is dual (the latter case means that the problem has no primal feasible dolution).
*/
public";
%javamethodmodifiers glp_get_it_cnt(glp_prob *P) "
/**
*/
public";
%javamethodmodifiers glp_set_it_cnt(glp_prob *P, int it_cnt) "
/**
*/
public";
%javamethodmodifiers ssx_create(int m, int n, int nnz) "
/**
*/
public";
%javamethodmodifiers basis_col(void *info, int j, int ind[], mpq_t val[]) "
/**
*/
public";
%javamethodmodifiers ssx_factorize(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_get_xNj(SSX *ssx, int j, mpq_t x) "
/**
*/
public";
%javamethodmodifiers ssx_eval_bbar(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_eval_pi(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_eval_dj(SSX *ssx, int j, mpq_t dj) "
/**
*/
public";
%javamethodmodifiers ssx_eval_cbar(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_eval_rho(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_eval_row(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_eval_col(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_chuzc(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_chuzr(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_update_bbar(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_update_pi(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_update_cbar(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_change_basis(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers ssx_delete(SSX *ssx) "
/**
*/
public";
%javamethodmodifiers transform(NPP *npp) "
/**
* glp_interior - solve LP problem with the interior-point method .
* SYNOPSIS
* int glp_interior(glp_prob *P, const glp_iptcp *parm);
* The routine glp_interior is a driver to the LP solver based on the interior-point method.
* The interior-point solver has a set of control parameters. Values of the control parameters can be passed in a structure glp_iptcp, which the parameter parm points to.
* Currently this routine implements an easy variant of the primal-dual interior-point method based on Mehrotra's technique.
* This routine transforms the original LP problem to an equivalent LP problem in the standard formulation (all constraints are equalities, all variables are non-negative), calls the routine ipm_main to solve the transformed problem, and then transforms an obtained solution to the solution of the original problem.
* RETURNS
* 0 The LP problem instance has been successfully solved. This code does not necessarily mean that the solver has found optimal solution. It only means that the solution process was successful.
* GLP_EFAIL The problem has no rows/columns.
* GLP_ENOCVG Very slow convergence or divergence.
* GLP_EITLIM Iteration limit exceeded.
* GLP_EINSTAB Numerical instability on solving Newtonian system.
*/
public";
%javamethodmodifiers glp_interior(glp_prob *P, const glp_iptcp *parm) "
/**
*/
public";
%javamethodmodifiers glp_init_iptcp(glp_iptcp *parm) "
/**
* glp_init_iptcp - initialize interior-point solver control parameters .
* SYNOPSIS
* void glp_init_iptcp(glp_iptcp *parm);
* DESCRIPTION
* The routine glp_init_iptcp initializes control parameters, which are used by the interior-point solver, with default values.
* Default values of the control parameters are stored in the glp_iptcp structure, which the parameter parm points to.
*/
public";
%javamethodmodifiers glp_ipt_status(glp_prob *lp) "
/**
* glp_ipt_status - retrieve status of interior-point solution .
* SYNOPSIS
* int glp_ipt_status(glp_prob *lp);
* RETURNS
* The routine glp_ipt_status reports the status of solution found by the interior-point solver as follows:
* GLP_UNDEF - interior-point solution is undefined; GLP_OPT - interior-point solution is optimal; GLP_INFEAS - interior-point solution is infeasible; GLP_NOFEAS - no feasible solution exists.
*/
public";
%javamethodmodifiers glp_ipt_obj_val(glp_prob *lp) "
/**
* glp_ipt_obj_val - retrieve objective value (interior point) .
* SYNOPSIS
* double glp_ipt_obj_val(glp_prob *lp);
* RETURNS
* The routine glp_ipt_obj_val returns value of the objective function for interior-point solution.
*/
public";
%javamethodmodifiers glp_ipt_row_prim(glp_prob *lp, int i) "
/**
* glp_ipt_row_prim - retrieve row primal value (interior point) .
* SYNOPSIS
* double glp_ipt_row_prim(glp_prob *lp, int i);
* RETURNS
* The routine glp_ipt_row_prim returns primal value of the auxiliary variable associated with i-th row.
*/
public";
%javamethodmodifiers glp_ipt_row_dual(glp_prob *lp, int i) "
/**
* glp_ipt_row_dual - retrieve row dual value (interior point) .
* SYNOPSIS
* double glp_ipt_row_dual(glp_prob *lp, int i);
* RETURNS
* The routine glp_ipt_row_dual returns dual value (i.e. reduced cost) of the auxiliary variable associated with i-th row.
*/
public";
%javamethodmodifiers glp_ipt_col_prim(glp_prob *lp, int j) "
/**
* glp_ipt_col_prim - retrieve column primal value (interior point) .
* SYNOPSIS
* double glp_ipt_col_prim(glp_prob *lp, int j);
* RETURNS
* The routine glp_ipt_col_prim returns primal value of the structural variable associated with j-th column.
*/
public";
%javamethodmodifiers glp_ipt_col_dual(glp_prob *lp, int j) "
/**
* glp_ipt_col_dual - retrieve column dual value (interior point) .
* SYNOPSIS
* double glp_ipt_col_dual(glp_prob *lp, int j);
* RETURNS
* The routine glp_ipt_col_dual returns dual value (i.e. reduced cost) of the structural variable associated with j-th column.
*/
public";
%javamethodmodifiers fhv_ft_update(FHV *fhv, int q, int aq_len, const int aq_ind[], const double aq_val[], int ind[], double val[], double work[]) "
/**
*/
public";
%javamethodmodifiers fhv_h_solve(FHV *fhv, double x[]) "
/**
*/
public";
%javamethodmodifiers fhv_ht_solve(FHV *fhv, double x[]) "
/**
*/
public";
%javamethodmodifiers cresup(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers chain(struct csa *csa, int lpick, int lsorc) "
/**
*/
public";
%javamethodmodifiers chnarc(struct csa *csa, int lsorc) "
/**
*/
public";
%javamethodmodifiers sort(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers pickj(struct csa *csa, int it) "
/**
*/
public";
%javamethodmodifiers assign(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers setran(struct csa *csa, int iseed) "
/**
*/
public";
%javamethodmodifiers iran(struct csa *csa, int ilow, int ihigh) "
/**
*/
public";
%javamethodmodifiers glp_netgen(glp_graph *G_, int _v_rhs, int _a_cap, int _a_cost, const int parm[1+15]) "
/**
*/
public";
%javamethodmodifiers glp_netgen_prob(int nprob, int parm[1+15]) "
/**
*/
public";
%javamethodmodifiers fp_add(MPL *mpl, double x, double y) "
/**
*/
public";
%javamethodmodifiers fp_sub(MPL *mpl, double x, double y) "
/**
*/
public";
%javamethodmodifiers fp_less(MPL *mpl, double x, double y) "
/**
*/
public";
%javamethodmodifiers fp_mul(MPL *mpl, double x, double y) "
/**
*/
public";
%javamethodmodifiers fp_div(MPL *mpl, double x, double y) "
/**
*/
public";
%javamethodmodifiers fp_idiv(MPL *mpl, double x, double y) "
/**
*/
public";
%javamethodmodifiers fp_mod(MPL *mpl, double x, double y) "
/**
*/
public";
%javamethodmodifiers fp_power(MPL *mpl, double x, double y) "
/**
*/
public";
%javamethodmodifiers fp_exp(MPL *mpl, double x) "
/**
*/
public";
%javamethodmodifiers fp_log(MPL *mpl, double x) "
/**
*/
public";
%javamethodmodifiers fp_log10(MPL *mpl, double x) "
/**
*/
public";
%javamethodmodifiers fp_sqrt(MPL *mpl, double x) "
/**
*/
public";
%javamethodmodifiers fp_sin(MPL *mpl, double x) "
/**
*/
public";
%javamethodmodifiers fp_cos(MPL *mpl, double x) "
/**
*/
public";
%javamethodmodifiers fp_atan(MPL *mpl, double x) "
/**
*/
public";
%javamethodmodifiers fp_atan2(MPL *mpl, double y, double x) "
/**
*/
public";
%javamethodmodifiers fp_round(MPL *mpl, double x, double n) "
/**
*/
public";
%javamethodmodifiers fp_trunc(MPL *mpl, double x, double n) "
/**
*/
public";
%javamethodmodifiers fp_irand224(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers fp_uniform01(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers fp_uniform(MPL *mpl, double a, double b) "
/**
*/
public";
%javamethodmodifiers fp_normal01(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers fp_normal(MPL *mpl, double mu, double sigma) "
/**
*/
public";
%javamethodmodifiers create_string(MPL *mpl, char buf[MAX_LENGTH+1]) "
/**
*/
public";
%javamethodmodifiers copy_string(MPL *mpl, STRING *str) "
/**
*/
public";
%javamethodmodifiers compare_strings(MPL *mpl, STRING *str1, STRING *str2) "
/**
*/
public";
%javamethodmodifiers fetch_string(MPL *mpl, STRING *str, char buf[MAX_LENGTH+1]) "
/**
*/
public";
%javamethodmodifiers delete_string(MPL *mpl, STRING *str) "
/**
*/
public";
%javamethodmodifiers create_symbol_num(MPL *mpl, double num) "
/**
*/
public";
%javamethodmodifiers create_symbol_str(MPL *mpl, STRING *str) "
/**
*/
public";
%javamethodmodifiers copy_symbol(MPL *mpl, SYMBOL *sym) "
/**
*/
public";
%javamethodmodifiers compare_symbols(MPL *mpl, SYMBOL *sym1, SYMBOL *sym2) "
/**
*/
public";
%javamethodmodifiers delete_symbol(MPL *mpl, SYMBOL *sym) "
/**
*/
public";
%javamethodmodifiers format_symbol(MPL *mpl, SYMBOL *sym) "
/**
*/
public";
%javamethodmodifiers concat_symbols(MPL *mpl, SYMBOL *sym1, SYMBOL *sym2) "
/**
*/
public";
%javamethodmodifiers create_tuple(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expand_tuple(MPL *mpl, TUPLE *tuple, SYMBOL *sym) "
/**
*/
public";
%javamethodmodifiers tuple_dimen(MPL *mpl, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers copy_tuple(MPL *mpl, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers compare_tuples(MPL *mpl, TUPLE *tuple1, TUPLE *tuple2) "
/**
*/
public";
%javamethodmodifiers build_subtuple(MPL *mpl, TUPLE *tuple, int dim) "
/**
*/
public";
%javamethodmodifiers delete_tuple(MPL *mpl, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers format_tuple(MPL *mpl, int c, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers create_elemset(MPL *mpl, int dim) "
/**
*/
public";
%javamethodmodifiers find_tuple(MPL *mpl, ELEMSET *set, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers add_tuple(MPL *mpl, ELEMSET *set, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers check_then_add(MPL *mpl, ELEMSET *set, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers copy_elemset(MPL *mpl, ELEMSET *set) "
/**
*/
public";
%javamethodmodifiers delete_elemset(MPL *mpl, ELEMSET *set) "
/**
*/
public";
%javamethodmodifiers arelset_size(MPL *mpl, double t0, double tf, double dt) "
/**
*/
public";
%javamethodmodifiers arelset_member(MPL *mpl, double t0, double tf, double dt, int j) "
/**
*/
public";
%javamethodmodifiers create_arelset(MPL *mpl, double t0, double tf, double dt) "
/**
*/
public";
%javamethodmodifiers set_union(MPL *mpl, ELEMSET *X, ELEMSET *Y) "
/**
*/
public";
%javamethodmodifiers set_diff(MPL *mpl, ELEMSET *X, ELEMSET *Y) "
/**
*/
public";
%javamethodmodifiers set_symdiff(MPL *mpl, ELEMSET *X, ELEMSET *Y) "
/**
*/
public";
%javamethodmodifiers set_inter(MPL *mpl, ELEMSET *X, ELEMSET *Y) "
/**
*/
public";
%javamethodmodifiers set_cross(MPL *mpl, ELEMSET *X, ELEMSET *Y) "
/**
*/
public";
%javamethodmodifiers constant_term(MPL *mpl, double coef) "
/**
*/
public";
%javamethodmodifiers single_variable(MPL *mpl, ELEMVAR *var) "
/**
*/
public";
%javamethodmodifiers copy_formula(MPL *mpl, FORMULA *form) "
/**
*/
public";
%javamethodmodifiers delete_formula(MPL *mpl, FORMULA *form) "
/**
*/
public";
%javamethodmodifiers linear_comb(MPL *mpl, double a, FORMULA *fx, double b, FORMULA *fy) "
/**
*/
public";
%javamethodmodifiers remove_constant(MPL *mpl, FORMULA *form, double *coef) "
/**
*/
public";
%javamethodmodifiers reduce_terms(MPL *mpl, FORMULA *form) "
/**
*/
public";
%javamethodmodifiers delete_value(MPL *mpl, int type, VALUE *value) "
/**
*/
public";
%javamethodmodifiers create_array(MPL *mpl, int type, int dim) "
/**
*/
public";
%javamethodmodifiers compare_member_tuples(void *info, const void *key1, const void *key2) "
/**
*/
public";
%javamethodmodifiers find_member(MPL *mpl, ARRAY *array, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers add_member(MPL *mpl, ARRAY *array, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers delete_array(MPL *mpl, ARRAY *array) "
/**
*/
public";
%javamethodmodifiers assign_dummy_index(MPL *mpl, DOMAIN_SLOT *slot, SYMBOL *value) "
/**
*/
public";
%javamethodmodifiers update_dummy_indices(MPL *mpl, DOMAIN_BLOCK *block) "
/**
*/
public";
%javamethodmodifiers enter_domain_block(MPL *mpl, DOMAIN_BLOCK *block, TUPLE *tuple, void *info, void(*func)(MPL *mpl, void *info)) "
/**
*/
public";
%javamethodmodifiers eval_domain_func(MPL *mpl, void *_my_info) "
/**
*/
public";
%javamethodmodifiers eval_within_domain(MPL *mpl, DOMAIN *domain, TUPLE *tuple, void *info, void(*func)(MPL *mpl, void *info)) "
/**
*/
public";
%javamethodmodifiers loop_domain_func(MPL *mpl, void *_my_info) "
/**
*/
public";
%javamethodmodifiers loop_within_domain(MPL *mpl, DOMAIN *domain, void *info, int(*func)(MPL *mpl, void *info)) "
/**
*/
public";
%javamethodmodifiers out_of_domain(MPL *mpl, char *name, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers get_domain_tuple(MPL *mpl, DOMAIN *domain) "
/**
*/
public";
%javamethodmodifiers clean_domain(MPL *mpl, DOMAIN *domain) "
/**
*/
public";
%javamethodmodifiers check_elem_set(MPL *mpl, SET *set, TUPLE *tuple, ELEMSET *refer) "
/**
*/
public";
%javamethodmodifiers take_member_set(MPL *mpl, SET *set, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers eval_set_func(MPL *mpl, void *_info) "
/**
*/
public";
%javamethodmodifiers saturate_set(MPL *mpl, SET *set) "
/**
*/
public";
%javamethodmodifiers eval_member_set(MPL *mpl, SET *set, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers whole_set_func(MPL *mpl, void *info) "
/**
*/
public";
%javamethodmodifiers eval_whole_set(MPL *mpl, SET *set) "
/**
*/
public";
%javamethodmodifiers clean_set(MPL *mpl, SET *set) "
/**
*/
public";
%javamethodmodifiers check_value_num(MPL *mpl, PARAMETER *par, TUPLE *tuple, double value) "
/**
*/
public";
%javamethodmodifiers take_member_num(MPL *mpl, PARAMETER *par, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers eval_num_func(MPL *mpl, void *_info) "
/**
*/
public";
%javamethodmodifiers eval_member_num(MPL *mpl, PARAMETER *par, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers check_value_sym(MPL *mpl, PARAMETER *par, TUPLE *tuple, SYMBOL *value) "
/**
*/
public";
%javamethodmodifiers take_member_sym(MPL *mpl, PARAMETER *par, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers eval_sym_func(MPL *mpl, void *_info) "
/**
*/
public";
%javamethodmodifiers eval_member_sym(MPL *mpl, PARAMETER *par, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers whole_par_func(MPL *mpl, void *info) "
/**
*/
public";
%javamethodmodifiers eval_whole_par(MPL *mpl, PARAMETER *par) "
/**
*/
public";
%javamethodmodifiers clean_parameter(MPL *mpl, PARAMETER *par) "
/**
*/
public";
%javamethodmodifiers take_member_var(MPL *mpl, VARIABLE *var, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers eval_var_func(MPL *mpl, void *_info) "
/**
*/
public";
%javamethodmodifiers eval_member_var(MPL *mpl, VARIABLE *var, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers whole_var_func(MPL *mpl, void *info) "
/**
*/
public";
%javamethodmodifiers eval_whole_var(MPL *mpl, VARIABLE *var) "
/**
*/
public";
%javamethodmodifiers clean_variable(MPL *mpl, VARIABLE *var) "
/**
*/
public";
%javamethodmodifiers take_member_con(MPL *mpl, CONSTRAINT *con, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers eval_con_func(MPL *mpl, void *_info) "
/**
*/
public";
%javamethodmodifiers eval_member_con(MPL *mpl, CONSTRAINT *con, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers whole_con_func(MPL *mpl, void *info) "
/**
*/
public";
%javamethodmodifiers eval_whole_con(MPL *mpl, CONSTRAINT *con) "
/**
*/
public";
%javamethodmodifiers clean_constraint(MPL *mpl, CONSTRAINT *con) "
/**
*/
public";
%javamethodmodifiers iter_num_func(MPL *mpl, void *_info) "
/**
*/
public";
%javamethodmodifiers eval_numeric(MPL *mpl, CODE *code) "
/**
*/
public";
%javamethodmodifiers eval_symbolic(MPL *mpl, CODE *code) "
/**
*/
public";
%javamethodmodifiers iter_log_func(MPL *mpl, void *_info) "
/**
*/
public";
%javamethodmodifiers eval_logical(MPL *mpl, CODE *code) "
/**
*/
public";
%javamethodmodifiers eval_tuple(MPL *mpl, CODE *code) "
/**
*/
public";
%javamethodmodifiers iter_set_func(MPL *mpl, void *_info) "
/**
*/
public";
%javamethodmodifiers eval_elemset(MPL *mpl, CODE *code) "
/**
*/
public";
%javamethodmodifiers null_func(MPL *mpl, void *info) "
/**
*/
public";
%javamethodmodifiers is_member(MPL *mpl, CODE *code, TUPLE *tuple) "
/**
*/
public";
%javamethodmodifiers iter_form_func(MPL *mpl, void *_info) "
/**
*/
public";
%javamethodmodifiers eval_formula(MPL *mpl, CODE *code) "
/**
*/
public";
%javamethodmodifiers clean_code(MPL *mpl, CODE *code) "
/**
*/
public";
%javamethodmodifiers mpl_tab_num_args(TABDCA *dca) "
/**
*/
public";
%javamethodmodifiers mpl_tab_get_arg(TABDCA *dca, int k) "
/**
*/
public";
%javamethodmodifiers mpl_tab_num_flds(TABDCA *dca) "
/**
*/
public";
%javamethodmodifiers mpl_tab_get_name(TABDCA *dca, int k) "
/**
*/
public";
%javamethodmodifiers mpl_tab_get_type(TABDCA *dca, int k) "
/**
*/
public";
%javamethodmodifiers mpl_tab_get_num(TABDCA *dca, int k) "
/**
*/
public";
%javamethodmodifiers mpl_tab_get_str(TABDCA *dca, int k) "
/**
*/
public";
%javamethodmodifiers mpl_tab_set_num(TABDCA *dca, int k, double num) "
/**
*/
public";
%javamethodmodifiers mpl_tab_set_str(TABDCA *dca, int k, const char *str) "
/**
*/
public";
%javamethodmodifiers write_func(MPL *mpl, void *info) "
/**
*/
public";
%javamethodmodifiers execute_table(MPL *mpl, TABLE *tab) "
/**
*/
public";
%javamethodmodifiers free_dca(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers clean_table(MPL *mpl, TABLE *tab) "
/**
*/
public";
%javamethodmodifiers check_func(MPL *mpl, void *info) "
/**
*/
public";
%javamethodmodifiers execute_check(MPL *mpl, CHECK *chk) "
/**
*/
public";
%javamethodmodifiers clean_check(MPL *mpl, CHECK *chk) "
/**
*/
public";
%javamethodmodifiers display_set(MPL *mpl, SET *set, MEMBER *memb) "
/**
*/
public";
%javamethodmodifiers display_par(MPL *mpl, PARAMETER *par, MEMBER *memb) "
/**
*/
public";
%javamethodmodifiers display_var(MPL *mpl, VARIABLE *var, MEMBER *memb, int suff) "
/**
*/
public";
%javamethodmodifiers display_con(MPL *mpl, CONSTRAINT *con, MEMBER *memb, int suff) "
/**
*/
public";
%javamethodmodifiers display_memb(MPL *mpl, CODE *code) "
/**
*/
public";
%javamethodmodifiers display_code(MPL *mpl, CODE *code) "
/**
*/
public";
%javamethodmodifiers display_func(MPL *mpl, void *info) "
/**
*/
public";
%javamethodmodifiers execute_display(MPL *mpl, DISPLAY *dpy) "
/**
*/
public";
%javamethodmodifiers clean_display(MPL *mpl, DISPLAY *dpy) "
/**
*/
public";
%javamethodmodifiers print_char(MPL *mpl, int c) "
/**
*/
public";
%javamethodmodifiers print_text(MPL *mpl, char *fmt,...) "
/**
*/
public";
%javamethodmodifiers printf_func(MPL *mpl, void *info) "
/**
*/
public";
%javamethodmodifiers execute_printf(MPL *mpl, PRINTF *prt) "
/**
*/
public";
%javamethodmodifiers clean_printf(MPL *mpl, PRINTF *prt) "
/**
*/
public";
%javamethodmodifiers for_func(MPL *mpl, void *info) "
/**
*/
public";
%javamethodmodifiers execute_for(MPL *mpl, FOR *fur) "
/**
*/
public";
%javamethodmodifiers clean_for(MPL *mpl, FOR *fur) "
/**
*/
public";
%javamethodmodifiers execute_statement(MPL *mpl, STATEMENT *stmt) "
/**
*/
public";
%javamethodmodifiers clean_statement(MPL *mpl, STATEMENT *stmt) "
/**
*/
public";
%javamethodmodifiers fcmp(const void *e1, const void *e2) "
/**
*/
public";
%javamethodmodifiers analyze_ineq(glp_prob *P, CFG *G, int len, int ind[], double val[], double rhs, struct term t[]) "
/**
*/
public";
%javamethodmodifiers cfg_build_graph(void *P_) "
/**
*/
public";
%javamethodmodifiers build_subgraph(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers sub_adjacent(struct csa *csa, int i, int adj[]) "
/**
*/
public";
%javamethodmodifiers find_clique(struct csa *csa, int c_ind[]) "
/**
*/
public";
%javamethodmodifiers func(void *info, int i, int ind[]) "
/**
*/
public";
%javamethodmodifiers find_clique1(struct csa *csa, int c_ind[]) "
/**
*/
public";
%javamethodmodifiers cfg_find_clique(void *P, CFG *G, int ind[], double *sum_) "
/**
*/
public";
%javamethodmodifiers gcd(int x, int y) "
/**
* gcd - find greatest common divisor of two integers .
* SYNOPSIS
* #include \"misc.h\" int gcd(int x, int y);
* RETURNS
* The routine gcd returns gcd(x, y), the greatest common divisor of the two positive integers given.
* ALGORITHM
* The routine gcd is based on Euclid's algorithm.
* REFERENCES
* Don Knuth, The Art of Computer Programming, Vol.2: Seminumerical Algorithms, 3rd Edition, Addison-Wesley, 1997. Section 4.5.2: The Greatest Common Divisor, pp. 333-56.
*/
public";
%javamethodmodifiers gcdn(int n, int x[]) "
/**
* gcdn - find greatest common divisor of n integers .
* SYNOPSIS
* #include \"misc.h\" int gcdn(int n, int x[]);
* RETURNS
* The routine gcdn returns gcd(x[1], x[2], ..., x[n]), the greatest common divisor of n positive integers given, n > 0.
* BACKGROUND
* The routine gcdn is based on the following identity:
* gcd(x, y, z) = gcd(gcd(x, y), z).
* REFERENCES
* Don Knuth, The Art of Computer Programming, Vol.2: Seminumerical Algorithms, 3rd Edition, Addison-Wesley, 1997. Section 4.5.2: The Greatest Common Divisor, pp. 333-56.
*/
public";
%javamethodmodifiers enter_context(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers print_context(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers get_char(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers append_char(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers get_token(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers unget_token(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers is_keyword(MPL *mpl, char *keyword) "
/**
*/
public";
%javamethodmodifiers is_reserved(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers make_code(MPL *mpl, int op, OPERANDS *arg, int type, int dim) "
/**
*/
public";
%javamethodmodifiers make_unary(MPL *mpl, int op, CODE *x, int type, int dim) "
/**
*/
public";
%javamethodmodifiers make_binary(MPL *mpl, int op, CODE *x, CODE *y, int type, int dim) "
/**
*/
public";
%javamethodmodifiers make_ternary(MPL *mpl, int op, CODE *x, CODE *y, CODE *z, int type, int dim) "
/**
*/
public";
%javamethodmodifiers numeric_literal(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers string_literal(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers create_arg_list(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expand_arg_list(MPL *mpl, ARG_LIST *list, CODE *x) "
/**
*/
public";
%javamethodmodifiers arg_list_len(MPL *mpl, ARG_LIST *list) "
/**
*/
public";
%javamethodmodifiers subscript_list(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers object_reference(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers numeric_argument(MPL *mpl, char *func) "
/**
*/
public";
%javamethodmodifiers symbolic_argument(MPL *mpl, char *func) "
/**
*/
public";
%javamethodmodifiers elemset_argument(MPL *mpl, char *func) "
/**
*/
public";
%javamethodmodifiers function_reference(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers create_domain(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers create_block(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers append_block(MPL *mpl, DOMAIN *domain, DOMAIN_BLOCK *block) "
/**
*/
public";
%javamethodmodifiers append_slot(MPL *mpl, DOMAIN_BLOCK *block, char *name, CODE *code) "
/**
*/
public";
%javamethodmodifiers expression_list(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers literal_set(MPL *mpl, CODE *code) "
/**
*/
public";
%javamethodmodifiers indexing_expression(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers close_scope(MPL *mpl, DOMAIN *domain) "
/**
*/
public";
%javamethodmodifiers link_up(CODE *code) "
/**
*/
public";
%javamethodmodifiers iterated_expression(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers domain_arity(MPL *mpl, DOMAIN *domain) "
/**
*/
public";
%javamethodmodifiers set_expression(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers branched_expression(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers primary_expression(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers error_preceding(MPL *mpl, char *opstr) "
/**
*/
public";
%javamethodmodifiers error_following(MPL *mpl, char *opstr) "
/**
*/
public";
%javamethodmodifiers error_dimension(MPL *mpl, char *opstr, int dim1, int dim2) "
/**
*/
public";
%javamethodmodifiers expression_0(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_1(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_2(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_3(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_4(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_5(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_6(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_7(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_8(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_9(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_10(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_11(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_12(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers expression_13(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers set_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers parameter_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers variable_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers constraint_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers objective_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers table_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers solve_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers check_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers display_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers printf_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers for_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers end_statement(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers simple_statement(MPL *mpl, int spec) "
/**
*/
public";
%javamethodmodifiers model_section(MPL *mpl) "
/**
*/
public";
%javamethodmodifiers ffalg(int nv, int na, const int tail[], const int head[], int s, int t, const int cap[], int x[], char cut[]) "
/**
* ffalg - Ford-Fulkerson algorithm .
* SYNOPSIS
* #include \"ffalg.h\" void ffalg(int nv, int na, const int tail[], const int head[], int s, int t, const int cap[], int x[], char cut[]);
* DESCRIPTION
* The routine ffalg implements the Ford-Fulkerson algorithm to find a maximal flow in the specified flow network.
* INPUT PARAMETERS
* nv is the number of nodes, nv >= 2.
* na is the number of arcs, na >= 0.
* tail[a], a = 1,...,na, is the index of tail node of arc a.
* head[a], a = 1,...,na, is the index of head node of arc a.
* s is the source node index, 1 <= s <= nv.
* t is the sink node index, 1 <= t <= nv, t != s.
* cap[a], a = 1,...,na, is the capacity of arc a, cap[a] >= 0.
* NOTE: Multiple arcs are allowed, but self-loops are not allowed.
* OUTPUT PARAMETERS
* x[a], a = 1,...,na, is optimal value of the flow through arc a.
* cut[i], i = 1,...,nv, is 1 if node i is labelled, and 0 otherwise. The set of arcs, whose one endpoint is labelled and other is not, defines the minimal cut corresponding to the maximal flow found. If the parameter cut is NULL, the cut information are not stored.
* REFERENCES
* L.R.Ford, Jr., and D.R.Fulkerson, \"Flows in Networks,\" The RAND Corp., Report R-375-PR (August 1962), Chap. I \"Static Maximal Flow,\" pp.30-33.
*/
public";
%javamethodmodifiers AMD_postorder(Int nn, Int Parent[], Int Nv[], Int Fsize[], Int Order[], Int Child[], Int Sibling[], Int Stack[]) "
/**
*/
public";
%javamethodmodifiers bfx_create_binv(void) "
/**
*/
public";
%javamethodmodifiers bfx_factorize(BFX *binv, int m, int(*col)(void *info, int j, int ind[], mpq_t val[]), void *info) "
/**
*/
public";
%javamethodmodifiers bfx_ftran(BFX *binv, mpq_t x[], int save) "
/**
*/
public";
%javamethodmodifiers bfx_btran(BFX *binv, mpq_t x[]) "
/**
*/
public";
%javamethodmodifiers bfx_update(BFX *binv, int j) "
/**
*/
public";
%javamethodmodifiers bfx_delete_binv(BFX *binv) "
/**
*/
public";
%javamethodmodifiers glp_weak_comp(glp_graph *G, int v_num) "
/**
* glp_weak_comp - find all weakly connected components of graph .
* SYNOPSIS
* int glp_weak_comp(glp_graph *G, int v_num);
* DESCRIPTION
* The routine glp_weak_comp finds all weakly connected components of the specified graph.
* The parameter v_num specifies an offset of the field of type int in the vertex data block, to which the routine stores the number of a (weakly) connected component containing that vertex. If v_num < 0, no component numbers are stored.
* The components are numbered in arbitrary order from 1 to nc, where nc is the total number of components found, 0 <= nc <= |V|.
* RETURNS
* The routine returns nc, the total number of components found.
*/
public";
%javamethodmodifiers glp_strong_comp(glp_graph *G, int v_num) "
/**
* glp_strong_comp - find all strongly connected components of graph .
* SYNOPSIS
* int glp_strong_comp(glp_graph *G, int v_num);
* DESCRIPTION
* The routine glp_strong_comp finds all strongly connected components of the specified graph.
* The parameter v_num specifies an offset of the field of type int in the vertex data block, to which the routine stores the number of a strongly connected component containing that vertex. If v_num < 0, no component numbers are stored.
* The components are numbered in arbitrary order from 1 to nc, where nc is the total number of components found, 0 <= nc <= |V|. However, the component numbering has the property that for every arc (i->j) in the graph the condition num(i) >= num(j) holds.
* RETURNS
* The routine returns nc, the total number of components found.
*/
public";
%javamethodmodifiers top_sort(glp_graph *G, int num[]) "
/**
* glp_top_sort - topological sorting of acyclic digraph .
* SYNOPSIS
* int glp_top_sort(glp_graph *G, int v_num);
* DESCRIPTION
* The routine glp_top_sort performs topological sorting of vertices of the specified acyclic digraph.
* The parameter v_num specifies an offset of the field of type int in the vertex data block, to which the routine stores the vertex number assigned. If v_num < 0, vertex numbers are not stored.
* The vertices are numbered from 1 to n, where n is the total number of vertices in the graph. The vertex numbering has the property that for every arc (i->j) in the graph the condition num(i) < num(j) holds. Special case num(i) = 0 means that vertex i is not assigned a number, because the graph is not acyclic.
* RETURNS
* If the graph is acyclic and therefore all the vertices have been assigned numbers, the routine glp_top_sort returns zero. Otherwise, if the graph is not acyclic, the routine returns the number of vertices which have not been numbered, i.e. for which num(i) = 0.
*/
public";
%javamethodmodifiers glp_top_sort(glp_graph *G, int v_num) "
/**
*/
public";
%javamethodmodifiers sgf_reduce_nuc(LUF *luf, int *k1_, int *k2_, int cnt[], int list[]) "
/**
*/
public";
%javamethodmodifiers sgf_singl_phase(LUF *luf, int k1, int k2, int updat, int ind[], double val[]) "
/**
*/
public";
%javamethodmodifiers sgf_choose_pivot(SGF *sgf, int *p_, int *q_) "
/**
*/
public";
%javamethodmodifiers sgf_eliminate(SGF *sgf, int p, int q) "
/**
*/
public";
%javamethodmodifiers sgf_dense_lu(int n, double a_[], int r[], int c[], double eps) "
/**
*/
public";
%javamethodmodifiers sgf_dense_phase(LUF *luf, int k, int updat) "
/**
*/
public";
%javamethodmodifiers sgf_factorize(SGF *sgf, int singl) "
/**
*/
public";
%javamethodmodifiers uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen) "
/**
*/
public";
%javamethodmodifiers fcmp(const void *xx, const void *yy) "
/**
*/
public";
%javamethodmodifiers wclique1(int n, const double w[], int(*func)(void *info, int i, int ind[]), void *info, int c[]) "
/**
*/
public";
%javamethodmodifiers glp_set_rii(glp_prob *lp, int i, double rii) "
/**
* glp_set_rii - set (change) row scale factor .
* SYNOPSIS
* void glp_set_rii(glp_prob *lp, int i, double rii);
* DESCRIPTION
* The routine glp_set_rii sets (changes) the scale factor r[i,i] for i-th row of the specified problem object.
*/
public";
%javamethodmodifiers glp_set_sjj(glp_prob *lp, int j, double sjj) "
/**
* glp_set sjj - set (change) column scale factor .
* SYNOPSIS
* void glp_set_sjj(glp_prob *lp, int j, double sjj);
* DESCRIPTION
* The routine glp_set_sjj sets (changes) the scale factor s[j,j] for j-th column of the specified problem object.
*/
public";
%javamethodmodifiers glp_get_rii(glp_prob *lp, int i) "
/**
* glp_get_rii - retrieve row scale factor .
* SYNOPSIS
* double glp_get_rii(glp_prob *lp, int i);
* RETURNS
* The routine glp_get_rii returns current scale factor r[i,i] for i-th row of the specified problem object.
*/
public";
%javamethodmodifiers glp_get_sjj(glp_prob *lp, int j) "
/**
* glp_get_sjj - retrieve column scale factor .
* SYNOPSIS
* double glp_get_sjj(glp_prob *lp, int j);
* RETURNS
* The routine glp_get_sjj returns current scale factor s[j,j] for j-th column of the specified problem object.
*/
public";
%javamethodmodifiers glp_unscale_prob(glp_prob *lp) "
/**
* glp_unscale_prob - unscale problem data .
* SYNOPSIS
* void glp_unscale_prob(glp_prob *lp);
* DESCRIPTION
* The routine glp_unscale_prob performs unscaling of problem data for the specified problem object.
* \"Unscaling\" means replacing the current scaling matrices R and S by unity matrices that cancels the scaling effect.
*/
public";
%javamethodmodifiers cover2(int n, double a[], double b, double u, double x[], double y, int cov[], double *_alfa, double *_beta) "
/**
*/
public";
%javamethodmodifiers cover3(int n, double a[], double b, double u, double x[], double y, int cov[], double *_alfa, double *_beta) "
/**
*/
public";
%javamethodmodifiers cover4(int n, double a[], double b, double u, double x[], double y, int cov[], double *_alfa, double *_beta) "
/**
*/
public";
%javamethodmodifiers cover(int n, double a[], double b, double u, double x[], double y, int cov[], double *alfa, double *beta) "
/**
*/
public";
%javamethodmodifiers lpx_cover_cut(glp_prob *lp, int len, int ind[], double val[], double work[]) "
/**
*/
public";
%javamethodmodifiers lpx_eval_row(glp_prob *lp, int len, int ind[], double val[]) "
/**
*/
public";
%javamethodmodifiers ios_cov_gen(glp_tree *tree) "
/**
* ios_cov_gen - generate mixed cover cuts .
* SYNOPSIS
* #include \"glpios.h\" void ios_cov_gen(glp_tree *tree);
* DESCRIPTION
* The routine ios_cov_gen generates mixed cover cuts for the current point and adds them to the cut pool.
*/
public";
%javamethodmodifiers AMD_preprocess(Int n, const Int Ap[], const Int Ai[], Int Rp[], Int Ri[], Int W[], Int Flag[]) "
/**
*/
public";
%javamethodmodifiers fcmp(const void *x, const void *y) "
/**
*/
public";
%javamethodmodifiers ios_feas_pump(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers npp_create_wksp(void) "
/**
*/
public";
%javamethodmodifiers npp_insert_row(NPP *npp, NPPROW *row, int where) "
/**
*/
public";
%javamethodmodifiers npp_remove_row(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_activate_row(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_deactivate_row(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_insert_col(NPP *npp, NPPCOL *col, int where) "
/**
*/
public";
%javamethodmodifiers npp_remove_col(NPP *npp, NPPCOL *col) "
/**
*/
public";
%javamethodmodifiers npp_activate_col(NPP *npp, NPPCOL *col) "
/**
*/
public";
%javamethodmodifiers npp_deactivate_col(NPP *npp, NPPCOL *col) "
/**
*/
public";
%javamethodmodifiers npp_add_row(NPP *npp) "
/**
*/
public";
%javamethodmodifiers npp_add_col(NPP *npp) "
/**
*/
public";
%javamethodmodifiers npp_add_aij(NPP *npp, NPPROW *row, NPPCOL *col, double val) "
/**
*/
public";
%javamethodmodifiers npp_row_nnz(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_col_nnz(NPP *npp, NPPCOL *col) "
/**
*/
public";
%javamethodmodifiers npp_push_tse(NPP *npp, int(*func)(NPP *npp, void *info), int size) "
/**
*/
public";
%javamethodmodifiers npp_erase_row(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_del_row(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_del_col(NPP *npp, NPPCOL *col) "
/**
*/
public";
%javamethodmodifiers npp_del_aij(NPP *npp, NPPAIJ *aij) "
/**
*/
public";
%javamethodmodifiers npp_load_prob(NPP *npp, glp_prob *orig, int names, int sol, int scaling) "
/**
*/
public";
%javamethodmodifiers npp_build_prob(NPP *npp, glp_prob *prob) "
/**
*/
public";
%javamethodmodifiers npp_postprocess(NPP *npp, glp_prob *prob) "
/**
*/
public";
%javamethodmodifiers npp_unload_sol(NPP *npp, glp_prob *orig) "
/**
*/
public";
%javamethodmodifiers npp_delete_wksp(NPP *npp) "
/**
*/
public";
%javamethodmodifiers crc32_combine_(uLong crc1, uLong crc2, z_off64_t len2) "
/**
*/
public";
%javamethodmodifiers get_crc_table() "
/**
*/
public";
%javamethodmodifiers gf2_matrix_times(unsigned long *mat, unsigned long vec) "
/**
*/
public";
%javamethodmodifiers gf2_matrix_square(unsigned long *square, unsigned long *mat) "
/**
*/
public";
%javamethodmodifiers crc32_combine(uLong crc1, uLong crc2, z_off_t len2) "
/**
*/
public";
%javamethodmodifiers crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) "
/**
*/
public";
%javamethodmodifiers rcv_free_row(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_free_row(NPP *npp, NPPROW *p) "
/**
*/
public";
%javamethodmodifiers rcv_geq_row(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_geq_row(NPP *npp, NPPROW *p) "
/**
*/
public";
%javamethodmodifiers rcv_leq_row(NPP *npp, void *info) "
/**
* npp_leq_row - process row of 'not greater than' type .
* SYNOPSIS
* #include \"glpnpp.h\" void npp_leq_row(NPP *npp, NPPROW *p);
* DESCRIPTION
* The routine npp_leq_row processes row p, which is 'not greater than' inequality constraint:
* (L[p] <=) sum a[p,j] x[j] <= U[p], (1) j
* where L[p] < U[p], and lower bound may not exist (L[p] = +oo).
* PROBLEM TRANSFORMATION
* Constraint (1) can be replaced by equality constraint:
* sum a[p,j] x[j] + s = L[p], (2) j
* where
* 0 <= s (<= U[p] - L[p]) (3)
* is a non-negative slack variable.
* Since in the primal system there appears column s having the only non-zero coefficient in row p, in the dual system there appears a new row:
* (+1) pi[p] + lambda = 0, (4)
* where (+1) is coefficient of column s in row p, pi[p] is multiplier of row p, lambda is multiplier of column q, 0 is coefficient of column s in the objective row.
* RECOVERING BASIC SOLUTION
* Status of row p in solution to the original problem is determined by its status and status of column q in solution to the transformed problem as follows:
* +-----------------------------------+---------------+ | Transformed problem | Original problem | +--------------+-----------------+---------------+ | Status of row p | Status of column s | Status of row p | +--------------+-----------------+---------------+ | GLP_BS | GLP_BS | N/A | | GLP_BS | GLP_NL | GLP_BS | | GLP_BS | GLP_NU | GLP_BS | | GLP_NS | GLP_BS | GLP_BS | | GLP_NS | GLP_NL | GLP_NU | | GLP_NS | GLP_NU | GLP_NL | +--------------+-----------------+---------------+
* Value of row multiplier pi[p] in solution to the original problem is the same as in solution to the transformed problem.
*
In solution to the transformed problem row p and column q cannot be basic at the same time; otherwise the basis matrix would have two linear dependent columns: unity column of auxiliary variable of row p and unity column of variable s.Though in the transformed problem row p is equality constraint, it may be basic due to primal degeneracy.
* RECOVERING INTERIOR-POINT SOLUTION
* Value of row multiplier pi[p] in solution to the original problem is the same as in solution to the transformed problem.
* RECOVERING MIP SOLUTION
* None needed.
*/
public";
%javamethodmodifiers npp_leq_row(NPP *npp, NPPROW *p) "
/**
*/
public";
%javamethodmodifiers rcv_free_col(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_free_col(NPP *npp, NPPCOL *q) "
/**
*/
public";
%javamethodmodifiers rcv_lbnd_col(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_lbnd_col(NPP *npp, NPPCOL *q) "
/**
*/
public";
%javamethodmodifiers rcv_ubnd_col(NPP *npp, void *info) "
/**
* npp_ubnd_col - process column with upper bound .
* SYNOPSIS
* #include \"glpnpp.h\" void npp_ubnd_col(NPP *npp, NPPCOL *q);
* DESCRIPTION
* The routine npp_ubnd_col processes column q, which has upper bound:
* (l[q] <=) x[q] <= u[q], (1)
* where l[q] < u[q], and lower bound may not exist (l[q] = -oo).
* PROBLEM TRANSFORMATION
* Column q can be replaced as follows:
* x[q] = u[q] - s, (2)
* where
* 0 <= s (<= u[q] - l[q]) (3)
* is a non-negative variable.
* Substituting x[q] from (2) into the objective row, we have:
* z = sum c[j] x[j] + c0 = j
* = sum c[j] x[j] + c[q] x[q] + c0 = j!=q
* = sum c[j] x[j] + c[q] (u[q] - s) + c0 = j!=q
* = sum c[j] x[j] - c[q] s + c~0,
* where
* c~0 = c0 + c[q] u[q] (4)
* is the constant term of the objective in the transformed problem. Similarly, substituting x[q] into constraint row i, we have:
* L[i] <= sum a[i,j] x[j] <= U[i] ==> j
* L[i] <= sum a[i,j] x[j] + a[i,q] x[q] <= U[i] ==> j!=q
* L[i] <= sum a[i,j] x[j] + a[i,q] (u[q] - s) <= U[i] ==> j!=q
* L~[i] <= sum a[i,j] x[j] - a[i,q] s <= U~[i], j!=q
* where
* L~[i] = L[i] - a[i,q] u[q], U~[i] = U[i] - a[i,q] u[q] (5)
* are lower and upper bounds of row i in the transformed problem, resp.
* Note that in the transformed problem coefficients c[q] and a[i,q] change their sign. Thus, the row of the dual system corresponding to column q:
* sum a[i,q] pi[i] + lambda[q] = c[q] (6) i
* in the transformed problem becomes the following:
* sum (-a[i,q]) pi[i] + lambda[s] = -c[q]. (7) i
* Therefore:
* lambda[q] = - lambda[s], (8)
* where lambda[q] is multiplier for column q, lambda[s] is multiplier for column s.
* RECOVERING BASIC SOLUTION
* With respect to (8) status of column q in solution to the original problem is determined by status of column s in solution to the transformed problem as follows:
* +--------------------+-----------------+ | Status of column s | Status of column q | | (transformed problem) | (original problem) | +--------------------+-----------------+ | GLP_BS | GLP_BS | | GLP_NL | GLP_NU | | GLP_NU | GLP_NL | +--------------------+-----------------+
* Value of column q is computed with formula (2).
* RECOVERING INTERIOR-POINT SOLUTION
* Value of column q is computed with formula (2).
* RECOVERING MIP SOLUTION
* Value of column q is computed with formula (2).
*/
public";
%javamethodmodifiers npp_ubnd_col(NPP *npp, NPPCOL *q) "
/**
*/
public";
%javamethodmodifiers rcv_dbnd_col(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_dbnd_col(NPP *npp, NPPCOL *q) "
/**
*/
public";
%javamethodmodifiers rcv_fixed_col(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_fixed_col(NPP *npp, NPPCOL *q) "
/**
*/
public";
%javamethodmodifiers rcv_make_equality(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_make_equality(NPP *npp, NPPROW *p) "
/**
*/
public";
%javamethodmodifiers rcv_make_fixed(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_make_fixed(NPP *npp, NPPCOL *q) "
/**
*/
public";
%javamethodmodifiers glp_set_col_kind(glp_prob *mip, int j, int kind) "
/**
* glp_set_col_kind - set (change) column kind .
* SYNOPSIS
* void glp_set_col_kind(glp_prob *mip, int j, int kind);
* DESCRIPTION
* The routine glp_set_col_kind sets (changes) the kind of j-th column (structural variable) as specified by the parameter kind:
* GLP_CV - continuous variable; GLP_IV - integer variable; GLP_BV - binary variable.
*/
public";
%javamethodmodifiers glp_get_col_kind(glp_prob *mip, int j) "
/**
* glp_get_col_kind - retrieve column kind .
* SYNOPSIS
* int glp_get_col_kind(glp_prob *mip, int j);
* RETURNS
* The routine glp_get_col_kind returns the kind of j-th column, i.e. the kind of corresponding structural variable, as follows:
* GLP_CV - continuous variable; GLP_IV - integer variable; GLP_BV - binary variable
*/
public";
%javamethodmodifiers glp_get_num_int(glp_prob *mip) "
/**
* glp_get_num_int - retrieve number of integer columns .
* SYNOPSIS
* int glp_get_num_int(glp_prob *mip);
* RETURNS
* The routine glp_get_num_int returns the current number of columns, which are marked as integer.
*/
public";
%javamethodmodifiers glp_get_num_bin(glp_prob *mip) "
/**
* glp_get_num_bin - retrieve number of binary columns .
* SYNOPSIS
* int glp_get_num_bin(glp_prob *mip);
* RETURNS
* The routine glp_get_num_bin returns the current number of columns, which are marked as binary.
*/
public";
%javamethodmodifiers solve_mip(glp_prob *P, const glp_iocp *parm, glp_prob *P0, NPP *npp) "
/**
* glp_intopt - solve MIP problem with the branch-and-bound method .
* SYNOPSIS
* int glp_intopt(glp_prob *P, const glp_iocp *parm);
* DESCRIPTION
* The routine glp_intopt is a driver to the MIP solver based on the branch-and-bound method.
* On entry the problem object should contain optimal solution to LP relaxation (which can be obtained with the routine glp_simplex).
* The MIP solver has a set of control parameters. Values of the control parameters can be passed in a structure glp_iocp, which the parameter parm points to.
* The parameter parm can be specified as NULL, in which case the MIP solver uses default settings.
* RETURNS
* 0 The MIP problem instance has been successfully solved. This code does not necessarily mean that the solver has found optimal solution. It only means that the solution process was successful.
* GLP_EBOUND Unable to start the search, because some double-bounded variables have incorrect bounds or some integer variables have non-integer (fractional) bounds.
* GLP_EROOT Unable to start the search, because optimal basis for initial LP relaxation is not provided.
* GLP_EFAIL The search was prematurely terminated due to the solver failure.
* GLP_EMIPGAP The search was prematurely terminated, because the relative mip gap tolerance has been reached.
* GLP_ETMLIM The search was prematurely terminated, because the time limit has been exceeded.
* GLP_ENOPFS The MIP problem instance has no primal feasible solution (only if the MIP presolver is used).
* GLP_ENODFS LP relaxation of the MIP problem instance has no dual feasible solution (only if the MIP presolver is used).
* GLP_ESTOP The search was prematurely terminated by application.
*/
public";
%javamethodmodifiers preprocess_and_solve_mip(glp_prob *P, const glp_iocp *parm) "
/**
*/
public";
%javamethodmodifiers _glp_intopt1(glp_prob *P, const glp_iocp *parm) "
/**
*/
public";
%javamethodmodifiers glp_intopt(glp_prob *P, const glp_iocp *parm) "
/**
*/
public";
%javamethodmodifiers glp_init_iocp(glp_iocp *parm) "
/**
* glp_init_iocp - initialize integer optimizer control parameters .
* SYNOPSIS
* void glp_init_iocp(glp_iocp *parm);
* DESCRIPTION
* The routine glp_init_iocp initializes control parameters, which are used by the integer optimizer, with default values.
* Default values of the control parameters are stored in a glp_iocp structure, which the parameter parm points to.
*/
public";
%javamethodmodifiers glp_mip_status(glp_prob *mip) "
/**
* glp_mip_status - retrieve status of MIP solution .
* SYNOPSIS
* int glp_mip_status(glp_prob *mip);
* RETURNS
* The routine lpx_mip_status reports the status of MIP solution found by the branch-and-bound solver as follows:
* GLP_UNDEF - MIP solution is undefined; GLP_OPT - MIP solution is integer optimal; GLP_FEAS - MIP solution is integer feasible but its optimality (or non-optimality) has not been proven, perhaps due to premature termination of the search; GLP_NOFEAS - problem has no integer feasible solution (proven by the solver).
*/
public";
%javamethodmodifiers glp_mip_obj_val(glp_prob *mip) "
/**
* glp_mip_obj_val - retrieve objective value (MIP solution) .
* SYNOPSIS
* double glp_mip_obj_val(glp_prob *mip);
* RETURNS
* The routine glp_mip_obj_val returns value of the objective function for MIP solution.
*/
public";
%javamethodmodifiers glp_mip_row_val(glp_prob *mip, int i) "
/**
* glp_mip_row_val - retrieve row value (MIP solution) .
* SYNOPSIS
* double glp_mip_row_val(glp_prob *mip, int i);
* RETURNS
* The routine glp_mip_row_val returns value of the auxiliary variable associated with i-th row.
*/
public";
%javamethodmodifiers glp_mip_col_val(glp_prob *mip, int j) "
/**
* glp_mip_col_val - retrieve column value (MIP solution) .
* SYNOPSIS
* double glp_mip_col_val(glp_prob *mip, int j);
* RETURNS
* The routine glp_mip_col_val returns value of the structural variable associated with j-th column.
*/
public";
%javamethodmodifiers glp_open(const char *name, const char *mode) "
/**
* glp_open - open stream .
* SYNOPSIS
* glp_file *glp_open(const char *name, const char *mode);
* DESCRIPTION
* The routine glp_open opens a file whose name is a string pointed to by name and associates a stream with it.
* The following special filenames are recognized by the routine (this feature is platform independent):
* \"/dev/null\" empty (null) file; \"/dev/stdin\" standard input stream; \"/dev/stdout\" standard output stream; \"/dev/stderr\" standard error stream.
* If the specified filename is ended with \".gz\", it is assumed that the file is in gzipped format. In this case the file is compressed or decompressed by the I/O routines \"on the fly\".
* The parameter mode points to a string, which indicates the open mode and should be one of the following:
* \"r\" open text file for reading; \"w\" truncate to zero length or create text file for writing; \"a\" append, open or create text file for writing at end-of-file; \"rb\" open binary file for reading; \"wb\" truncate to zero length or create binary file for writing; \"ab\" append, open or create binary file for writing at end-of-file.
* RETURNS
* The routine glp_open returns a pointer to the object controlling the stream. If the operation fails, the routine returns NULL.
*/
public";
%javamethodmodifiers glp_eof(glp_file *f) "
/**
* glp_eof - test end-of-file indicator .
* SYNOPSIS
* int glp_eof(glp_file *f);
* DESCRIPTION
* The routine glp_eof tests the end-of-file indicator for the stream pointed to by f.
* RETURNS
* The routine glp_eof returns non-zero if and only if the end-of-file indicator is set for the specified stream.
*/
public";
%javamethodmodifiers glp_ioerr(glp_file *f) "
/**
* glp_ioerr - test I/O error indicator .
* SYNOPSIS
* int glp_ioerr(glp_file *f);
* DESCRIPTION
* The routine glp_ioerr tests the I/O error indicator for the stream pointed to by f.
* RETURNS
* The routine glp_ioerr returns non-zero if and only if the I/O error indicator is set for the specified stream.
*/
public";
%javamethodmodifiers glp_read(glp_file *f, void *buf, int nnn) "
/**
* glp_read - read data from stream .
* SYNOPSIS
* int glp_read(glp_file *f, void *buf, int nnn);
* DESCRIPTION
* The routine glp_read reads, into the buffer pointed to by buf, up to nnn bytes, from the stream pointed to by f.
* RETURNS
* The routine glp_read returns the number of bytes successfully read (which may be less than nnn). If an end-of-file is encountered, the end-of-file indicator for the stream is set and glp_read returns zero. If a read error occurs, the error indicator for the stream is set and glp_read returns a negative value.
*/
public";
%javamethodmodifiers glp_getc(glp_file *f) "
/**
* glp_getc - read character from stream .
* SYNOPSIS
* int glp_getc(glp_file *f);
* DESCRIPTION
* The routine glp_getc obtains a next character as an unsigned char converted to an int from the input stream pointed to by f.
* RETURNS
* The routine glp_getc returns the next character obtained. However, if an end-of-file is encountered or a read error occurs, the routine returns EOF. (An end-of-file and a read error can be distinguished by use of the routines glp_eof and glp_ioerr.)
*/
public";
%javamethodmodifiers do_flush(glp_file *f) "
/**
*/
public";
%javamethodmodifiers glp_write(glp_file *f, const void *buf, int nnn) "
/**
* glp_write - write data to stream .
* SYNOPSIS
* int glp_write(glp_file *f, const void *buf, int nnn);
* DESCRIPTION
* The routine glp_write writes, from the buffer pointed to by buf, up to nnn bytes, to the stream pointed to by f.
* RETURNS
* The routine glp_write returns the number of bytes successfully written (which is equal to nnn). If a write error occurs, the error indicator for the stream is set and glp_write returns a negative value.
*/
public";
%javamethodmodifiers glp_format(glp_file *f, const char *fmt,...) "
/**
* glp_format - write formatted data to stream .
* SYNOPSIS
* int glp_format(glp_file *f, const char *fmt, ...);
* DESCRIPTION
* The routine glp_format writes formatted data to the stream pointed to by f. The format control string pointed to by fmt specifies how subsequent arguments are converted for output.
* RETURNS
* The routine glp_format returns the number of characters written, or a negative value if an output error occurs.
*/
public";
%javamethodmodifiers glp_close(glp_file *f) "
/**
* glp_close - close stream .
* SYNOPSIS
* int glp_close(glp_file *f);
* DESCRIPTION
* The routine glp_close closes the stream pointed to by f.
* RETURNS
* If the operation was successful, the routine returns zero, otherwise non-zero.
*/
public";
%javamethodmodifiers dma(const char *func, void *ptr, size_t size) "
/**
*/
public";
%javamethodmodifiers glp_alloc(int n, int size) "
/**
* glp_alloc - allocate memory block .
* SYNOPSIS
* void *glp_alloc(int n, int size);
* DESCRIPTION
* The routine glp_alloc allocates a memory block of n * size bytes long.
* Note that being allocated the memory block contains arbitrary data (not binary zeros!).
* RETURNS
* The routine glp_alloc returns a pointer to the block allocated. To free this block the routine glp_free (not free!) must be used.
*/
public";
%javamethodmodifiers glp_realloc(void *ptr, int n, int size) "
/**
*/
public";
%javamethodmodifiers glp_free(void *ptr) "
/**
* glp_free - free (deallocate) memory block .
* SYNOPSIS
* void glp_free(void *ptr);
* DESCRIPTION
* The routine glp_free frees (deallocates) a memory block pointed to by ptr, which was previuosly allocated by the routine glp_alloc or reallocated by the routine glp_realloc.
*/
public";
%javamethodmodifiers glp_mem_limit(int limit) "
/**
* glp_mem_limit - set memory usage limit .
* SYNOPSIS
* void glp_mem_limit(int limit);
* DESCRIPTION
* The routine glp_mem_limit limits the amount of memory available for dynamic allocation (in GLPK routines) to limit megabytes.
*/
public";
%javamethodmodifiers glp_mem_usage(int *count, int *cpeak, size_t *total, size_t *tpeak) "
/**
* glp_mem_usage - get memory usage information .
* SYNOPSIS
* void glp_mem_usage(int *count, int *cpeak, size_t *total, size_t *tpeak);
* DESCRIPTION
* The routine glp_mem_usage reports some information about utilization of the memory by GLPK routines. Information is stored to locations specified by corresponding parameters (see below). Any parameter can be specified as NULL, in which case its value is not stored.
* *count is the number of the memory blocks currently allocated by the routines glp_malloc and glp_calloc (one call to glp_malloc or glp_calloc results in allocating one memory block).
* *cpeak is the peak value of *count reached since the initialization of the GLPK library environment.
* *total is the total amount, in bytes, of the memory blocks currently allocated by the routines glp_malloc and glp_calloc.
* *tpeak is the peak value of *total reached since the initialization of the GLPK library envirionment.
*/
public";
%javamethodmodifiers str2int(const char *str, int *val_) "
/**
* str2int - convert character string to value of int type .
* SYNOPSIS
* #include \"misc.h\" int str2int(const char *str, int *val);
* DESCRIPTION
* The routine str2int converts the character string str to a value of integer type and stores the value into location, which the parameter val points to (in the case of error content of this location is not changed).
* RETURNS
* The routine returns one of the following error codes:
* 0 - no error; 1 - value out of range; 2 - character string is syntactically incorrect.
*/
public";
%javamethodmodifiers glp_create_index(glp_prob *lp) "
/**
* glp_create_index - create the name index .
* SYNOPSIS
* void glp_create_index(glp_prob *lp);
* DESCRIPTION
* The routine glp_create_index creates the name index for the specified problem object. The name index is an auxiliary data structure, which is intended to quickly (i.e. for logarithmic time) find rows and columns by their names.
* This routine can be called at any time. If the name index already exists, the routine does nothing.
*/
public";
%javamethodmodifiers glp_find_row(glp_prob *lp, const char *name) "
/**
* glp_find_row - find row by its name .
* SYNOPSIS
* int glp_find_row(glp_prob *lp, const char *name);
* RETURNS
* The routine glp_find_row returns the ordinal number of a row, which is assigned (by the routine glp_set_row_name) the specified symbolic name. If no such row exists, the routine returns 0.
*/
public";
%javamethodmodifiers glp_find_col(glp_prob *lp, const char *name) "
/**
* glp_find_col - find column by its name .
* SYNOPSIS
* int glp_find_col(glp_prob *lp, const char *name);
* RETURNS
* The routine glp_find_col returns the ordinal number of a column, which is assigned (by the routine glp_set_col_name) the specified symbolic name. If no such column exists, the routine returns 0.
*/
public";
%javamethodmodifiers glp_delete_index(glp_prob *lp) "
/**
* glp_delete_index - delete the name index .
* SYNOPSIS
* void glp_delete_index(glp_prob *lp);
* DESCRIPTION
* The routine glp_delete_index deletes the name index previously created by the routine glp_create_index and frees the memory allocated to this auxiliary data structure.
* This routine can be called at any time. If the name index does not exist, the routine does nothing.
*/
public";
%javamethodmodifiers glp_minisat1(glp_prob *P) "
/**
*/
public";
%javamethodmodifiers sva_create_area(int n_max, int size) "
/**
*/
public";
%javamethodmodifiers sva_alloc_vecs(SVA *sva, int nnn) "
/**
*/
public";
%javamethodmodifiers sva_resize_area(SVA *sva, int delta) "
/**
*/
public";
%javamethodmodifiers sva_defrag_area(SVA *sva) "
/**
*/
public";
%javamethodmodifiers sva_more_space(SVA *sva, int m_size) "
/**
*/
public";
%javamethodmodifiers sva_enlarge_cap(SVA *sva, int k, int new_cap, int skip) "
/**
*/
public";
%javamethodmodifiers sva_reserve_cap(SVA *sva, int k, int new_cap) "
/**
*/
public";
%javamethodmodifiers sva_make_static(SVA *sva, int k) "
/**
*/
public";
%javamethodmodifiers sva_check_area(SVA *sva) "
/**
*/
public";
%javamethodmodifiers sva_delete_area(SVA *sva) "
/**
*/
public";
%javamethodmodifiers deflateInit_(z_streamp strm, int level, const char *version, int stream_size) "
/**
*/
public";
%javamethodmodifiers deflateInit2_(z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size) "
/**
*/
public";
%javamethodmodifiers deflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength) "
/**
*/
public";
%javamethodmodifiers deflateReset(z_streamp strm) "
/**
*/
public";
%javamethodmodifiers deflateSetHeader(z_streamp strm, gz_headerp head) "
/**
*/
public";
%javamethodmodifiers deflatePrime(z_streamp strm, int bits, int value) "
/**
*/
public";
%javamethodmodifiers deflateParams(z_streamp strm, int level, int strategy) "
/**
*/
public";
%javamethodmodifiers deflateTune(z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain) "
/**
*/
public";
%javamethodmodifiers deflateBound(z_streamp strm, uLong sourceLen) "
/**
*/
public";
%javamethodmodifiers putShortMSB(deflate_state *s, uInt b) "
/**
*/
public";
%javamethodmodifiers flush_pending(z_streamp strm) "
/**
*/
public";
%javamethodmodifiers deflate(z_streamp strm, int flush) "
/**
*/
public";
%javamethodmodifiers deflateEnd(z_streamp strm) "
/**
*/
public";
%javamethodmodifiers deflateCopy(z_streamp dest, z_streamp source) "
/**
*/
public";
%javamethodmodifiers read_buf(z_streamp strm, Bytef *buf, unsigned size) "
/**
*/
public";
%javamethodmodifiers lm_init(deflate_state *s) "
/**
*/
public";
%javamethodmodifiers longest_match(deflate_state *s, IPos cur_match) "
/**
*/
public";
%javamethodmodifiers fill_window(deflate_state *s) "
/**
*/
public";
%javamethodmodifiers deflate_stored(deflate_state *s, int flush) "
/**
*/
public";
%javamethodmodifiers deflate_fast(deflate_state *s, int flush) "
/**
*/
public";
%javamethodmodifiers deflate_slow(deflate_state *s, int flush) "
/**
*/
public";
%javamethodmodifiers deflate_rle(deflate_state *s, int flush) "
/**
*/
public";
%javamethodmodifiers deflate_huff(deflate_state *s, int flush) "
/**
*/
public";
%javamethodmodifiers adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) "
/**
*/
public";
%javamethodmodifiers adler32(uLong adler, const Bytef *buf, uInt len) "
/**
*/
public";
%javamethodmodifiers adler32_combine(uLong adler1, uLong adler2, z_off_t len2) "
/**
*/
public";
%javamethodmodifiers adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) "
/**
*/
public";
%javamethodmodifiers tr_static_init() "
/**
*/
public";
%javamethodmodifiers _tr_init(deflate_state *s) "
/**
*/
public";
%javamethodmodifiers init_block(deflate_state *s) "
/**
*/
public";
%javamethodmodifiers pqdownheap(deflate_state *s, ct_data *tree, int k) "
/**
*/
public";
%javamethodmodifiers gen_bitlen(deflate_state *s, tree_desc *desc) "
/**
*/
public";
%javamethodmodifiers gen_codes(ct_data *tree, int max_code, ushf *bl_count) "
/**
*/
public";
%javamethodmodifiers build_tree(deflate_state *s, tree_desc *desc) "
/**
*/
public";
%javamethodmodifiers scan_tree(deflate_state *s, ct_data *tree, int max_code) "
/**
*/
public";
%javamethodmodifiers send_tree(deflate_state *s, ct_data *tree, int max_code) "
/**
*/
public";
%javamethodmodifiers build_bl_tree(deflate_state *s) "
/**
*/
public";
%javamethodmodifiers send_all_trees(deflate_state *s, int lcodes, int dcodes, int blcodes) "
/**
*/
public";
%javamethodmodifiers _tr_stored_block(deflate_state *s, charf *buf, ulg stored_len, int last) "
/**
*/
public";
%javamethodmodifiers _tr_align(deflate_state *s) "
/**
*/
public";
%javamethodmodifiers _tr_flush_block(deflate_state *s, charf *buf, ulg stored_len, int last) "
/**
*/
public";
%javamethodmodifiers _tr_tally(deflate_state *s, unsigned dist, unsigned lc) "
/**
*/
public";
%javamethodmodifiers compress_block(deflate_state *s, ct_data *ltree, ct_data *dtree) "
/**
*/
public";
%javamethodmodifiers detect_data_type(deflate_state *s) "
/**
*/
public";
%javamethodmodifiers bi_reverse(unsigned code, int len) "
/**
*/
public";
%javamethodmodifiers bi_flush(deflate_state *s) "
/**
*/
public";
%javamethodmodifiers bi_windup(deflate_state *s) "
/**
*/
public";
%javamethodmodifiers copy_block(deflate_state *s, charf *buf, unsigned len, int header) "
/**
*/
public";
%javamethodmodifiers flip_cycle(RNG *rand) "
/**
*/
public";
%javamethodmodifiers rng_create_rand(void) "
/**
* rng_create_rand - create pseudo-random number generator .
* SYNOPSIS
* #include \"rng.h\" RNG *rng_create_rand(void);
* DESCRIPTION
* The routine rng_create_rand creates and initializes a pseudo-random number generator.
* RETURNS
* The routine returns a pointer to the generator created.
*/
public";
%javamethodmodifiers rng_init_rand(RNG *rand, int seed) "
/**
* rng_init_rand - initialize pseudo-random number generator .
* SYNOPSIS
* #include \"rng.h\" void rng_init_rand(RNG *rand, int seed);
* DESCRIPTION
* The routine rng_init_rand initializes the pseudo-random number generator. The parameter seed may be any integer number. Note that on creating the generator this routine is called with the parameter seed equal to 1.
*/
public";
%javamethodmodifiers rng_next_rand(RNG *rand) "
/**
* rng_next_rand - obtain pseudo-random integer in the range [0, 2^31-1] .
* SYNOPSIS
* #include \"rng.h\" int rng_next_rand(RNG *rand);
* RETURNS
* The routine rng_next_rand returns a next pseudo-random integer which is uniformly distributed between 0 and 2^31-1, inclusive. The period length of the generated numbers is 2^85 - 2^30. The low order bits of the generated numbers are just as random as the high-order bits.
*/
public";
%javamethodmodifiers rng_unif_rand(RNG *rand, int m) "
/**
*/
public";
%javamethodmodifiers rng_delete_rand(RNG *rand) "
/**
* rng_delete_rand - delete pseudo-random number generator .
* SYNOPSIS
* #include \"rng.h\" void rng_delete_rand(RNG *rand);
* DESCRIPTION
* The routine rng_delete_rand frees all the memory allocated to the specified pseudo-random number generator.
*/
public";
%javamethodmodifiers tls_set_ptr(void *ptr) "
/**
* tls_set_ptr - store global pointer in TLS .
* SYNOPSIS
* #include \"env.h\" void tls_set_ptr(void *ptr);
* DESCRIPTION
* The routine tls_set_ptr stores a pointer specified by the parameter ptr in the Thread Local Storage (TLS).
*/
public";
%javamethodmodifiers tls_get_ptr(void) "
/**
* tls_get_ptr - retrieve global pointer from TLS .
* SYNOPSIS
* #include \"env.h\" void *tls_get_ptr(void);
* RETURNS
* The routine tls_get_ptr returns a pointer previously stored by the routine tls_set_ptr. If the latter has not been called yet, NULL is returned.
*/
public";
%javamethodmodifiers npp_clean_prob(NPP *npp) "
/**
* npp_clean_prob - perform initial LP/MIP processing .
* SYNOPSIS
* #include \"glpnpp.h\" void npp_clean_prob(NPP *npp);
* DESCRIPTION
* The routine npp_clean_prob performs initial LP/MIP processing that currently includes:
* 1) removing free rows;
* 2) replacing double-sided constraint rows with almost identical bounds, by equality constraint rows;
* 3) removing fixed columns;
* 4) replacing double-bounded columns with almost identical bounds by fixed columns and removing those columns;
* 5) initial processing constraint coefficients (not implemented);
* 6) initial processing objective coefficients (not implemented).
*/
public";
%javamethodmodifiers npp_process_row(NPP *npp, NPPROW *row, int hard) "
/**
* npp_process_row - perform basic row processing .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_process_row(NPP *npp, NPPROW *row, int hard);
* DESCRIPTION
* The routine npp_process_row performs basic row processing that currently includes:
* 1) removing empty row;
* 2) removing equality constraint row singleton and corresponding column;
* 3) removing inequality constraint row singleton and corresponding column if it was fixed;
* 4) performing general row analysis;
* 5) removing redundant row bounds;
* 6) removing forcing row and corresponding columns;
* 7) removing row which becomes free due to redundant bounds;
* 8) computing implied bounds for all columns in the row and using them to strengthen current column bounds (MIP only, optional, performed if the flag hard is on).
* Additionally the routine may activate affected rows and/or columns for further processing.
* RETURNS
* 0 success;
* GLP_ENOPFS primal/integer infeasibility detected;
* GLP_ENODFS dual infeasibility detected.
*/
public";
%javamethodmodifiers npp_improve_bounds(NPP *npp, NPPROW *row, int flag) "
/**
* npp_improve_bounds - improve current column bounds .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_improve_bounds(NPP *npp, NPPROW *row, int flag);
* DESCRIPTION
* The routine npp_improve_bounds analyzes specified row (inequality or equality constraint) to determine implied column bounds and then uses these bounds to improve (strengthen) current column bounds.
* If the flag is on and current column bounds changed significantly or the column was fixed, the routine activate rows affected by the column for further processing. (This feature is intended to be used in the main loop of the routine npp_process_row.)
* NOTE: This operation can be used for MIP problem only.
* RETURNS
* The routine npp_improve_bounds returns the number of significantly changed bounds plus the number of column having been fixed due to bound improvements. However, if the routine detects primal/integer infeasibility, it returns a negative value.
*/
public";
%javamethodmodifiers npp_process_col(NPP *npp, NPPCOL *col) "
/**
* npp_process_col - perform basic column processing .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_process_col(NPP *npp, NPPCOL *col);
* DESCRIPTION
* The routine npp_process_col performs basic column processing that currently includes:
* 1) fixing and removing empty column;
* 2) removing column singleton, which is implied slack variable, and corresponding row if it becomes free;
* 3) removing bounds of column, which is implied free variable, and replacing corresponding row by equality constraint.
* Additionally the routine may activate affected rows and/or columns for further processing.
* RETURNS
* 0 success;
* GLP_ENOPFS primal/integer infeasibility detected;
* GLP_ENODFS dual infeasibility detected.
*/
public";
%javamethodmodifiers npp_process_prob(NPP *npp, int hard) "
/**
* npp_process_prob - perform basic LP/MIP processing .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_process_prob(NPP *npp, int hard);
* DESCRIPTION
* The routine npp_process_prob performs basic LP/MIP processing that currently includes:
* 1) initial LP/MIP processing (see the routine npp_clean_prob),
* 2) basic row processing (see the routine npp_process_row), and
* 3) basic column processing (see the routine npp_process_col).
* If the flag hard is on, the routine attempts to improve current column bounds multiple times within the main processing loop, in which case this feature may take a time. Otherwise, if the flag hard is off, improving column bounds is performed only once at the end of the main loop. (Note that this feature is used for MIP only.)
* The routine uses two sets: the set of active rows and the set of active columns. Rows/columns are marked by a flag (the field temp in NPPROW/NPPCOL). If the flag is non-zero, the row/column is active, in which case it is placed in the beginning of the row/column list; otherwise, if the flag is zero, the row/column is inactive, in which case it is placed in the end of the row/column list. If a row/column being currently processed may affect other rows/columns, the latters are activated for further processing.
* RETURNS
* 0 success;
* GLP_ENOPFS primal/integer infeasibility detected;
* GLP_ENODFS dual infeasibility detected.
*/
public";
%javamethodmodifiers npp_simplex(NPP *npp, const glp_smcp *parm) "
/**
*/
public";
%javamethodmodifiers npp_integer(NPP *npp, const glp_iocp *parm) "
/**
*/
public";
%javamethodmodifiers lux_create(int n) "
/**
*/
public";
%javamethodmodifiers initialize(LUX *lux, int(*col)(void *info, int j, int ind[], mpq_t val[]), void *info, LUXWKA *wka) "
/**
*/
public";
%javamethodmodifiers find_pivot(LUX *lux, LUXWKA *wka) "
/**
*/
public";
%javamethodmodifiers eliminate(LUX *lux, LUXWKA *wka, LUXELM *piv, int flag[], mpq_t work[]) "
/**
*/
public";
%javamethodmodifiers lux_decomp(LUX *lux, int(*col)(void *info, int j, int ind[], mpq_t val[]), void *info) "
/**
*/
public";
%javamethodmodifiers lux_f_solve(LUX *lux, int tr, mpq_t x[]) "
/**
*/
public";
%javamethodmodifiers lux_v_solve(LUX *lux, int tr, mpq_t x[]) "
/**
*/
public";
%javamethodmodifiers lux_solve(LUX *lux, int tr, mpq_t x[]) "
/**
*/
public";
%javamethodmodifiers lux_delete(LUX *lux) "
/**
*/
public";
%javamethodmodifiers glp_mpl_alloc_wksp(void) "
/**
*/
public";
%javamethodmodifiers _glp_mpl_init_rand(glp_tran *tran, int seed) "
/**
*/
public";
%javamethodmodifiers glp_mpl_read_model(glp_tran *tran, const char *fname, int skip) "
/**
*/
public";
%javamethodmodifiers glp_mpl_read_data(glp_tran *tran, const char *fname) "
/**
*/
public";
%javamethodmodifiers glp_mpl_generate(glp_tran *tran, const char *fname) "
/**
*/
public";
%javamethodmodifiers glp_mpl_build_prob(glp_tran *tran, glp_prob *prob) "
/**
*/
public";
%javamethodmodifiers glp_mpl_postsolve(glp_tran *tran, glp_prob *prob, int sol) "
/**
*/
public";
%javamethodmodifiers glp_mpl_free_wksp(glp_tran *tran) "
/**
*/
public";
%javamethodmodifiers glp_init_env(void) "
/**
* glp_init_env - initialize GLPK environment .
* SYNOPSIS
* int glp_init_env(void);
* DESCRIPTION
* The routine glp_init_env initializes the GLPK environment. Normally the application program does not need to call this routine, because it is called automatically on the first call to any API routine.
* RETURNS
* The routine glp_init_env returns one of the following codes:
* 0 - initialization successful; 1 - environment has been already initialized; 2 - initialization failed (insufficient memory); 3 - initialization failed (unsupported programming model).
*/
public";
%javamethodmodifiers get_env_ptr(void) "
/**
* get_env_ptr - retrieve pointer to environment block .
* SYNOPSIS
* #include \"env.h\" ENV *get_env_ptr(void);
* DESCRIPTION
* The routine get_env_ptr retrieves and returns a pointer to the GLPK environment block.
* If the GLPK environment has not been initialized yet, the routine performs initialization. If initialization fails, the routine prints an error message to stderr and terminates the program.
* RETURNS
* The routine returns a pointer to the environment block.
*/
public";
%javamethodmodifiers glp_version(void) "
/**
* glp_version - determine library version .
* SYNOPSIS
* const char *glp_version(void);
* RETURNS
* The routine glp_version returns a pointer to a null-terminated character string, which specifies the version of the GLPK library in the form \"X.Y\", where X is the major version number, and Y is the minor version number, for example, \"4.16\".
*/
public";
%javamethodmodifiers glp_free_env(void) "
/**
* glp_free_env - free GLPK environment .
* SYNOPSIS
* int glp_free_env(void);
* DESCRIPTION
* The routine glp_free_env frees all resources used by GLPK routines (memory blocks, etc.) which are currently still in use.
* Normally the application program does not need to call this routine, because GLPK routines always free all unused resources. However, if the application program even has deleted all problem objects, there will be several memory blocks still allocated for the library needs. For some reasons the application program may want GLPK to free this memory, in which case it should call glp_free_env.
* Note that a call to glp_free_env invalidates all problem objects as if no GLPK routine were called.
* RETURNS
* 0 - termination successful; 1 - environment is inactive (was not initialized).
*/
public";
%javamethodmodifiers ascnt1(struct relax4_csa *csa, int dm, int *delx, int *nlabel, int *feasbl, int *svitch, int nscan, int curnode, int *prevnode) "
/**
* RELAX-IV (version of October 1994) .
* ascnt1 - multi-node price adjustment for positive deficit case
* PURPOSE
* This routine implements the relaxation method of Bertsekas and Tseng (see [1], [2]) for linear cost ordinary network flow problems.
* [1] Bertsekas, D. P., \"A Unified Framework for Primal-Dual Methods\" Mathematical Programming, Vol. 32, 1985, pp. 125-145. [2] Bertsekas, D. P., and Tseng, P., \"Relaxation Methods for
Minimum Cost\" Operations Research, Vol. 26, 1988, pp. 93-114.
* The relaxation method is also described in the books:
* [3] Bertsekas, D. P., \"Linear Network Optimization: Algorithms and
Codes\" MIT Press, 1991. [4] Bertsekas, D. P. and Tsitsiklis, J. N., \"Parallel and Distributed
Computation: Numerical Methods\", Prentice-Hall, 1989. [5] Bertsekas, D. P., \"Network Optimization: Continuous and Discrete
Models\", Athena Scientific, 1998.
* RELEASE NOTE
* This version of relaxation code has option for a special crash procedure for the initial price-flow pair. This is recommended for difficult problems where the default initialization results in long running times. crash = 1 corresponds to an auction/shortest path method
* These initializations are recommended in the absence of any prior information on a favorable initial flow-price vector pair that satisfies complementary slackness.
* The relaxation portion of the code differs from the code RELAXT-III and other earlier relaxation codes in that it maintains the set of nodes with nonzero deficit in a fifo queue. Like its predecessor RELAXT-III, this code maintains a linked list of balanced (i.e., of zero reduced cost) arcs so to reduce the work in labeling and scanning. Unlike RELAXT-III, it does not use selectively shortest path iterations for initialization.
* SOURCE
* The original Fortran code was written by Dimitri P. Bertsekas and Paul Tseng, with a contribution by Jonathan Eckstein in the phase II initialization. The original Fortran routine AUCTION was written by Dimitri P. Bertsekas and is based on the method described in the paper:
* [6] Bertsekas, D. P., \"An Auction/Sequential Shortest Path Algorithm
for the Minimum Cost Flow Problem\", LIDS Report P-2146, MIT, Nov. 1992.
* For inquiries about the original Fortran code, please contact:
* Dimitri P. Bertsekas Laboratory for information and decision systems Massachusetts Institute of Technology Cambridge, MA 02139 (617) 253-7267, dimitrib@mit.edu
* This code is the result of translation of the original Fortran code. The translation was made by Andrew Makhorin mao@gnu.org.
* USER GUIDELINES
* This routine is in the public domain to be used only for research purposes. It cannot be used as part of a commercial product, or to satisfy in any part commercial delivery requirements to government or industry, without prior agreement with the authors. Users are requested to acknowledge the authorship of the code, and the relaxation method.
* No modification should be made to this code other than the minimal necessary to make it compatible with specific platforms.
* INPUT PARAMETERS (see notes 1, 2, 4)
* n = number of nodes na = number of arcs large = a very large integer to represent infinity (see note 3) repeat = true if initialization is to be skipped (false otherwise) crash = 0 if default initialization is used 1 if auction initialization is used startn[j] = starting node for arc j, j = 1,...,na endn[j] = ending node for arc j, j = 1,...,na fou[i] = first arc out of node i, i = 1,...,n nxtou[j] = next arc out of the starting node of arc j, j = 1,...,na fin[i] = first arc into node i, i = 1,...,n nxtin[j] = next arc into the ending node of arc j, j = 1,...,na
* UPDATED PARAMETERS (see notes 1, 3, 4)
* rc[j] = reduced cost of arc j, j = 1,...,na u[j] = capacity of arc j on input and (capacity of arc j) - x[j] on output, j = 1,...,na dfct[i] = demand at node i on input and zero on output, i = 1,...,n
* OUTPUT PARAMETERS (see notes 1, 3, 4)
* x[j] = flow on arc j, j = 1,...,na nmultinode = number of multinode relaxation iterations in RELAX4 iter = number of relaxation iterations in RELAX4 num_augm = number of flow augmentation steps in RELAX4 num_ascnt = number of multinode ascent steps in RELAX4 nsp = number of auction/shortest path iterations
* WORKING PARAMETERS (see notes 1, 4, 5)
* label[1+n], prdcsr[1+n], save[1+na], tfstou[1+n], tnxtou[1+na], tfstin[1+n], tnxtin[1+na], nxtqueue[1+n], scan[1+n], mark[1+n], extend_arc[1+n], sb_level[1+n], sb_arc[1+n]
* RETURNS
* 0 = normal return 1,...,8 = problem is found to be infeasible
* NOTE 1
* To run in limited memory systems, declare the arrays startn, endn, nxtin, nxtou, fin, fou, label, prdcsr, save, tfstou, tnxtou, tfstin, tnxtin, ddpos, ddneg, nxtqueue as short instead.
* NOTE 2
* This routine makes no effort to initialize with a favorable x from amongst those flow vectors that satisfy complementary slackness with the initial reduced cost vector rc. If a favorable x is known, then it can be passed, together with the corresponding arrays u and dfct, to this routine directly. This, however, requires that the capacity tightening portion and the flow initialization portion of this routine (up to line labeled 90) be skipped.
* NOTE 3
* All problem data should be less than large in magnitude, and large should be less than, say, 1/4 the largest int of the machine used. This will guard primarily against overflow in uncapacitated problems where the arc capacities are taken finite but very large. Note, however, that as in all codes operating with integers, overflow may occur if some of the problem data takes very large values.
* NOTE 4
* [This note being specific to Fortran was removed.-A.M.]
* NOTE 5
* ddpos and ddneg are arrays that give the directional derivatives for all positive and negative single-node price changes. These are used only in phase II of the initialization procedure, before the linked list of balanced arcs comes to play. Therefore, to reduce storage, they are equivalence to tfstou and tfstin, which are of the same size (number of nodes) and are used only after the tree comes into use.
* PURPOSE
* This subroutine performs the multi-node price adjustment step for the case where the scanned nodes have positive deficit. It first checks if decreasing the price of the scanned nodes increases the dual cost. If yes, then it decreases the price of all scanned nodes. There are two possibilities for price decrease: if switch = true, then the set of scanned nodes corresponds to an elementary direction of maximal rate of ascent, in which case the price of all scanned nodes are decreased until the next breakpoint in the dual cost is encountered. At this point, some arc becomes balanced and more node(s) are added to the labeled set and the subroutine is exited. If switch = false, then the price of all scanned nodes are decreased until the rate of ascent becomes negative (this corresponds to the price adjustment step in which both the line search and the degenerate ascent iteration are implemented).
* INPUT PARAMETERS
* dm = total deficit of scanned nodes switch = true if labeling is to continue after price change nscan = number of scanned nodes curnode = most recently scanned node n = number of nodes na = number of arcs large = a very large integer to represent infinity (see note 3) startn[i] = starting node for the i-th arc, i = 1,...,na endn[i] = ending node for the i-th arc, i = 1,...,na fou[i] = first arc leaving i-th node, i = 1,...,n nxtou[i] = next arc leaving the starting node of j-th arc, i = 1,...,na fin[i] = first arc entering i-th node, i = 1,...,n nxtin[i] = next arc entering the ending node of j-th arc, i = 1,...,na
* UPDATED PARAMETERS
* delx = a lower estimate of the total flow on balanced arcs in the scanned-nodes cut nlabel = number of labeled nodes feasbl = false if problem is found to be infeasible prevnode = the node before curnode in queue rc[j] = reduced cost of arc j, j = 1,...,na u[j] = residual capacity of arc j, j = 1,...,na x[j] = flow on arc j, j = 1,...,na dfct[i] = deficit at node i, i = 1,...,n label[k] = k-th node labeled, k = 1,...,nlabel prdcsr[i] = predecessor of node i in tree of labeled nodes (0 if i is unlabeled), i = 1,...,n tfstou[i] = first balanced arc out of node i, i = 1,...,n tnxtou[j] = next balanced arc out of the starting node of arc j, j = 1,...,na tfstin[i] = first balanced arc into node i, i = 1,...,n tnxtin[j] = next balanced arc into the ending node of arc j, j = 1,...,na nxtqueue[i] = node following node i in the fifo queue (0 if node is not in the queue), i = 1,...,n scan[i] = true if node i is scanned, i = 1,...,n mark[i] = true if node i is labeled, i = 1,...,n
* WORKING PARAMETERS
* save[1+na]
*/
public";
%javamethodmodifiers ascnt2(struct relax4_csa *csa, int dm, int *delx, int *nlabel, int *feasbl, int *svitch, int nscan, int curnode, int *prevnode) "
/**
* ascnt2 - multi-node price adjustment for negative deficit case .
* PURPOSE
* This routine is analogous to ascnt1 but for the case where the scanned nodes have negative deficit.
*/
public";
%javamethodmodifiers auction(struct relax4_csa *csa) "
/**
* auction - compute good initial flow and prices .
* PURPOSE
* This subroutine uses a version of the auction algorithm for min cost network flow to compute a good initial flow and prices for the problem.
* INPUT PARAMETERS
* n = number of nodes na = number of arcs large = a very large integer to represent infinity (see note 3) startn[i] = starting node for the i-th arc, i = 1,...,na endn[i] = ending node for the i-th arc, i = 1,...,na fou[i] = first arc leaving i-th node, i = 1,...,n nxtou[i] = next arc leaving the starting node of j-th arc, i = 1,...,na fin[i] = first arc entering i-th node, i = 1,...,n nxtin[i] = next arc entering the ending node of j-th arc, i = 1,...,na
* UPDATED PARAMETERS
* rc[j] = reduced cost of arc j, j = 1,...,na u[j] = residual capacity of arc j, j = 1,...,na x[j] = flow on arc j, j = 1,...,na dfct[i] = deficit at node i, i = 1,...,n
* OUTPUT PARAMETERS
* nsp = number of auction/shortest path iterations
* WORKING PARAMETERS
* p[1+n], prdcsr[1+n], save[1+na], fpushf[1+n], nxtpushf[1+na], fpushb[1+n], nxtpushb[1+na], nxtqueue[1+n], extend_arc[1+n], sb_level[1+n], sb_arc[1+n], path_id[1+n]
* RETURNS
* 0 = normal return 1 = problem is found to be infeasible
*/
public";
%javamethodmodifiers relax4(struct relax4_csa *csa) "
/**
*/
public";
%javamethodmodifiers relax4_inidat(struct relax4_csa *csa) "
/**
* relax4_inidat - construct linked lists for network topology .
* PURPOSE
* This routine constructs two linked lists for the network topology: one list (given by fou, nxtou) for the outgoing arcs of nodes and one list (given by fin, nxtin) for the incoming arcs of nodes. These two lists are required by RELAX4.
* INPUT PARAMETERS
* n = number of nodes na = number of arcs startn[j] = starting node for arc j, j = 1,...,na endn[j] = ending node for arc j, j = 1,...,na
* OUTPUT PARAMETERS
* fou[i] = first arc out of node i, i = 1,...,n nxtou[j] = next arc out of the starting node of arc j, j = 1,...,na fin[i] = first arc into node i, i = 1,...,n nxtin[j] = next arc into the ending node of arc j, j = 1,...,na
* WORKING PARAMETERS
* tempin[1+n], tempou[1+n]
*/
public";
%javamethodmodifiers inflateReset(z_streamp strm) "
/**
*/
public";
%javamethodmodifiers inflateReset2(z_streamp strm, int windowBits) "
/**
*/
public";
%javamethodmodifiers inflateInit2_(z_streamp strm, int windowBits, const char *version, int stream_size) "
/**
*/
public";
%javamethodmodifiers inflateInit_(z_streamp strm, const char *version, int stream_size) "
/**
*/
public";
%javamethodmodifiers inflatePrime(z_streamp strm, int bits, int value) "
/**
*/
public";
%javamethodmodifiers updatewindow(z_streamp strm, unsigned out) "
/**
*/
public";
%javamethodmodifiers inflate(z_streamp strm, int flush) "
/**
*/
public";
%javamethodmodifiers inflateEnd(z_streamp strm) "
/**
*/
public";
%javamethodmodifiers inflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength) "
/**
*/
public";
%javamethodmodifiers inflateGetHeader(z_streamp strm, gz_headerp head) "
/**
*/
public";
%javamethodmodifiers inflateSync(z_streamp strm) "
/**
*/
public";
%javamethodmodifiers inflateSyncPoint(z_streamp strm) "
/**
*/
public";
%javamethodmodifiers inflateCopy(z_streamp dest, z_streamp source) "
/**
*/
public";
%javamethodmodifiers inflateUndermine(z_streamp strm, int subvert) "
/**
*/
public";
%javamethodmodifiers inflateMark(z_streamp strm) "
/**
*/
public";
%javamethodmodifiers scf_r0_solve(SCF *scf, int tr, double x[]) "
/**
*/
public";
%javamethodmodifiers scf_s0_solve(SCF *scf, int tr, double x[], double w1[], double w2[], double w3[]) "
/**
*/
public";
%javamethodmodifiers scf_r_prod(SCF *scf, double y[], double a, const double x[]) "
/**
*/
public";
%javamethodmodifiers scf_rt_prod(SCF *scf, double y[], double a, const double x[]) "
/**
*/
public";
%javamethodmodifiers scf_s_prod(SCF *scf, double y[], double a, const double x[]) "
/**
*/
public";
%javamethodmodifiers scf_st_prod(SCF *scf, double y[], double a, const double x[]) "
/**
*/
public";
%javamethodmodifiers scf_a_solve(SCF *scf, double x[], double w[], double work1[], double work2[], double work3[]) "
/**
*/
public";
%javamethodmodifiers scf_at_solve(SCF *scf, double x[], double w[], double work1[], double work2[], double work3[]) "
/**
*/
public";
%javamethodmodifiers scf_add_r_row(SCF *scf, const double w[]) "
/**
*/
public";
%javamethodmodifiers scf_add_s_col(SCF *scf, const double v[]) "
/**
*/
public";
%javamethodmodifiers scf_update_aug(SCF *scf, double b[], double d[], double f[], double g[], double h, int upd, double w1[], double w2[], double w3[]) "
/**
*/
public";
%javamethodmodifiers inflate_fast(z_streamp strm, unsigned start) "
/**
*/
public";
%javamethodmodifiers put_byte(FILE *fp, int c) "
/**
* rgr_write_bmp16 - write 16-color raster image in BMP file format .
* SYNOPSIS
* #include \"glprgr.h\" int rgr_write_bmp16(const char *fname, int m, int n, const char map[]);
* DESCRIPTION
* The routine rgr_write_bmp16 writes 16-color raster image in uncompressed BMP file format (Windows bitmap) to a binary file whose name is specified by the character string fname.
* The parameters m and n specify, respectively, the number of rows and the numbers of columns (i.e. height and width) of the raster image.
* The character array map has m*n elements. Elements map[0, ..., n-1] correspond to the first (top) scanline, elements map[n, ..., 2*n-1] correspond to the second scanline, etc.
* Each element of the array map specifies a color of the corresponding pixel as 8-bit binary number XXXXIRGB, where four high-order bits (X) are ignored, I is high intensity bit, R is red color bit, G is green color bit, and B is blue color bit. Thus, all 16 possible colors are coded as following hexadecimal numbers:
* 0x00 = black 0x08 = dark gray 0x01 = blue 0x09 = bright blue 0x02 = green 0x0A = bright green 0x03 = cyan 0x0B = bright cyan 0x04 = red 0x0C = bright red 0x05 = magenta 0x0D = bright magenta 0x06 = brown 0x0E = yellow 0x07 = light gray 0x0F = white
* RETURNS
* If no error occured, the routine returns zero; otherwise, it prints an appropriate error message and returns non-zero.
*/
public";
%javamethodmodifiers put_word(FILE *fp, int w) "
/**
*/
public";
%javamethodmodifiers put_dword(FILE *fp, int d) "
/**
*/
public";
%javamethodmodifiers rgr_write_bmp16(const char *fname, int m, int n, const char map[]) "
/**
*/
public";
%javamethodmodifiers overflow(int u, int v) "
/**
* okalg - out-of-kilter algorithm .
* SYNOPSIS
* #include \"okalg.h\" int okalg(int nv, int na, const int tail[], const int head[], const int low[], const int cap[], const int cost[], int x[], int pi[]);
* DESCRIPTION
* The routine okalg implements the out-of-kilter algorithm to find a minimal-cost circulation in the specified flow network.
* INPUT PARAMETERS
* nv is the number of nodes, nv >= 0.
* na is the number of arcs, na >= 0.
* tail[a], a = 1,...,na, is the index of tail node of arc a.
* head[a], a = 1,...,na, is the index of head node of arc a.
* low[a], a = 1,...,na, is an lower bound to the flow through arc a.
* cap[a], a = 1,...,na, is an upper bound to the flow through arc a, which is the capacity of the arc.
* cost[a], a = 1,...,na, is a per-unit cost of the flow through arc a.
* NOTES
*
Multiple arcs are allowed, but self-loops are not allowed.It is required that 0 <= low[a] <= cap[a] for all arcs.Arc costs may have any sign.
* OUTPUT PARAMETERS
* x[a], a = 1,...,na, is optimal value of the flow through arc a.
* pi[i], i = 1,...,nv, is Lagrange multiplier for flow conservation equality constraint corresponding to node i (the node potential).
* RETURNS
* 0 optimal circulation found;
* 1 there is no feasible circulation;
* 2 integer overflow occured;
* 3 optimality test failed (logic error).
* REFERENCES
* L.R.Ford, Jr., and D.R.Fulkerson, \"Flows in Networks,\" The RAND Corp., Report R-375-PR (August 1962), Chap. III \"Minimal Cost Flow
Problems,\" pp.113-26.
*/
public";
%javamethodmodifiers okalg(int nv, int na, const int tail[], const int head[], const int low[], const int cap[], const int cost[], int x[], int pi[]) "
/**
*/
public";
%javamethodmodifiers spx_alloc_nt(SPXLP *lp, SPXNT *nt) "
/**
*/
public";
%javamethodmodifiers spx_init_nt(SPXLP *lp, SPXNT *nt) "
/**
*/
public";
%javamethodmodifiers spx_nt_add_col(SPXLP *lp, SPXNT *nt, int j, int k) "
/**
*/
public";
%javamethodmodifiers spx_build_nt(SPXLP *lp, SPXNT *nt) "
/**
*/
public";
%javamethodmodifiers spx_nt_del_col(SPXLP *lp, SPXNT *nt, int j, int k) "
/**
*/
public";
%javamethodmodifiers spx_update_nt(SPXLP *lp, SPXNT *nt, int p, int q) "
/**
*/
public";
%javamethodmodifiers spx_nt_prod(SPXLP *lp, SPXNT *nt, double y[], int ign, double s, const double x[]) "
/**
*/
public";
%javamethodmodifiers spx_free_nt(SPXLP *lp, SPXNT *nt) "
/**
*/
public";
%javamethodmodifiers btf_store_a_cols(BTF *btf, int(*col)(void *info, int j, int ind[], double val[]), void *info, int ind[], double val[]) "
/**
*/
public";
%javamethodmodifiers btf_make_blocks(BTF *btf) "
/**
*/
public";
%javamethodmodifiers btf_check_blocks(BTF *btf) "
/**
*/
public";
%javamethodmodifiers btf_build_a_rows(BTF *btf, int len[]) "
/**
*/
public";
%javamethodmodifiers btf_a_solve(BTF *btf, double b[], double x[], double w1[], double w2[]) "
/**
*/
public";
%javamethodmodifiers btf_at_solve(BTF *btf, double b[], double x[], double w1[], double w2[]) "
/**
*/
public";
%javamethodmodifiers btf_at_solve1(BTF *btf, double e[], double y[], double w1[], double w2[]) "
/**
*/
public";
%javamethodmodifiers btf_estimate_norm(BTF *btf, double w1[], double w2[], double w3[], double w4[]) "
/**
*/
public";
%javamethodmodifiers glp_bf_exists(glp_prob *lp) "
/**
* glp_bf_exists - check if the basis factorization exists .
* SYNOPSIS
* int glp_bf_exists(glp_prob *lp);
* RETURNS
* If the basis factorization for the current basis associated with the specified problem object exists and therefore is available for computations, the routine glp_bf_exists returns non-zero. Otherwise the routine returns zero.
*/
public";
%javamethodmodifiers b_col(void *info, int j, int ind[], double val[]) "
/**
* glp_factorize - compute the basis factorization .
* SYNOPSIS
* int glp_factorize(glp_prob *lp);
* DESCRIPTION
* The routine glp_factorize computes the basis factorization for the current basis associated with the specified problem object.
* RETURNS
* 0 The basis factorization has been successfully computed.
* GLP_EBADB The basis matrix is invalid, i.e. the number of basic (auxiliary and structural) variables differs from the number of rows in the problem object.
* GLP_ESING The basis matrix is singular within the working precision.
* GLP_ECOND The basis matrix is ill-conditioned.
*/
public";
%javamethodmodifiers glp_factorize(glp_prob *lp) "
/**
*/
public";
%javamethodmodifiers glp_bf_updated(glp_prob *lp) "
/**
* glp_bf_updated - check if the basis factorization has been updated .
* SYNOPSIS
* int glp_bf_updated(glp_prob *lp);
* RETURNS
* If the basis factorization has been just computed from scratch, the routine glp_bf_updated returns zero. Otherwise, if the factorization has been updated one or more times, the routine returns non-zero.
*/
public";
%javamethodmodifiers glp_get_bfcp(glp_prob *P, glp_bfcp *parm) "
/**
* glp_get_bfcp - retrieve basis factorization control parameters .
* SYNOPSIS
* void glp_get_bfcp(glp_prob *lp, glp_bfcp *parm);
* DESCRIPTION
* The routine glp_get_bfcp retrieves control parameters, which are used on computing and updating the basis factorization associated with the specified problem object.
* Current values of control parameters are stored by the routine in a glp_bfcp structure, which the parameter parm points to.
*/
public";
%javamethodmodifiers glp_set_bfcp(glp_prob *P, const glp_bfcp *parm) "
/**
* glp_set_bfcp - change basis factorization control parameters .
* SYNOPSIS
* void glp_set_bfcp(glp_prob *lp, const glp_bfcp *parm);
* DESCRIPTION
* The routine glp_set_bfcp changes control parameters, which are used by internal GLPK routines in computing and updating the basis factorization associated with the specified problem object.
* New values of the control parameters should be passed in a structure glp_bfcp, which the parameter parm points to.
* The parameter parm can be specified as NULL, in which case all control parameters are reset to their default values.
*/
public";
%javamethodmodifiers glp_get_bhead(glp_prob *lp, int k) "
/**
* glp_get_bhead - retrieve the basis header information .
* SYNOPSIS
* int glp_get_bhead(glp_prob *lp, int k);
* DESCRIPTION
* The routine glp_get_bhead returns the basis header information for the current basis associated with the specified problem object.
* RETURNS
* If xB[k], 1 <= k <= m, is i-th auxiliary variable (1 <= i <= m), the routine returns i. Otherwise, if xB[k] is j-th structural variable (1 <= j <= n), the routine returns m+j. Here m is the number of rows and n is the number of columns in the problem object.
*/
public";
%javamethodmodifiers glp_get_row_bind(glp_prob *lp, int i) "
/**
* glp_get_row_bind - retrieve row index in the basis header .
* SYNOPSIS
* int glp_get_row_bind(glp_prob *lp, int i);
* RETURNS
* The routine glp_get_row_bind returns the index k of basic variable xB[k], 1 <= k <= m, which is i-th auxiliary variable, 1 <= i <= m, in the current basis associated with the specified problem object, where m is the number of rows. However, if i-th auxiliary variable is non-basic, the routine returns zero.
*/
public";
%javamethodmodifiers glp_get_col_bind(glp_prob *lp, int j) "
/**
* glp_get_col_bind - retrieve column index in the basis header .
* SYNOPSIS
* int glp_get_col_bind(glp_prob *lp, int j);
* RETURNS
* The routine glp_get_col_bind returns the index k of basic variable xB[k], 1 <= k <= m, which is j-th structural variable, 1 <= j <= n, in the current basis associated with the specified problem object, where m is the number of rows, n is the number of columns. However, if j-th structural variable is non-basic, the routine returns zero.
*/
public";
%javamethodmodifiers glp_ftran(glp_prob *lp, double x[]) "
/**
* glp_ftran - perform forward transformation (solve system B*x = b) .
* SYNOPSIS
* void glp_ftran(glp_prob *lp, double x[]);
* DESCRIPTION
* The routine glp_ftran performs forward transformation, i.e. solves the system B*x = b, where B is the basis matrix corresponding to the current basis for the specified problem object, x is the vector of unknowns to be computed, b is the vector of right-hand sides.
* On entry elements of the vector b should be stored in dense format in locations x[1], ..., x[m], where m is the number of rows. On exit the routine stores elements of the vector x in the same locations.
* SCALING/UNSCALING
* Let A~ = (I | -A) is the augmented constraint matrix of the original (unscaled) problem. In the scaled LP problem instead the matrix A the scaled matrix A\" = R*A*S is actually used, so
* A~\" = (I | A\") = (I | R*A*S) = (R*I*inv(R) | R*A*S) = (1) = R*(I | A)*S~ = R*A~*S~,
* is the scaled augmented constraint matrix, where R and S are diagonal scaling matrices used to scale rows and columns of the matrix A, and
* S~ = diag(inv(R) | S) (2)
* is an augmented diagonal scaling matrix.
* By definition:
* A~ = (B | N), (3)
* where B is the basic matrix, which consists of basic columns of the augmented constraint matrix A~, and N is a matrix, which consists of non-basic columns of A~. From (1) it follows that:
* A~\" = (B\" | N\") = (R*B*SB | R*N*SN), (4)
* where SB and SN are parts of the augmented scaling matrix S~, which correspond to basic and non-basic variables, respectively. Therefore
* B\" = R*B*SB, (5)
* which is the scaled basis matrix.
*/
public";
%javamethodmodifiers glp_btran(glp_prob *lp, double x[]) "
/**
* glp_btran - perform backward transformation (solve system B'*x = b) .
* SYNOPSIS
* void glp_btran(glp_prob *lp, double x[]);
* DESCRIPTION
* The routine glp_btran performs backward transformation, i.e. solves the system B'*x = b, where B' is a matrix transposed to the basis matrix corresponding to the current basis for the specified problem problem object, x is the vector of unknowns to be computed, b is the vector of right-hand sides.
* On entry elements of the vector b should be stored in dense format in locations x[1], ..., x[m], where m is the number of rows. On exit the routine stores elements of the vector x in the same locations.
* SCALING/UNSCALING
* See comments to the routine glp_ftran.
*/
public";
%javamethodmodifiers glp_warm_up(glp_prob *P) "
/**
* glp_warm_up - \"warm up\" LP basis .
* SYNOPSIS
* int glp_warm_up(glp_prob *P);
* DESCRIPTION
* The routine glp_warm_up \"warms up\" the LP basis for the specified problem object using current statuses assigned to rows and columns (that is, to auxiliary and structural variables).
* This operation includes computing factorization of the basis matrix (if it does not exist), computing primal and dual components of basic solution, and determining the solution status.
* RETURNS
* 0 The operation has been successfully performed.
* GLP_EBADB The basis matrix is invalid, i.e. the number of basic (auxiliary and structural) variables differs from the number of rows in the problem object.
* GLP_ESING The basis matrix is singular within the working precision.
* GLP_ECOND The basis matrix is ill-conditioned.
*/
public";
%javamethodmodifiers glp_eval_tab_row(glp_prob *lp, int k, int ind[], double val[]) "
/**
* glp_eval_tab_row - compute row of the simplex tableau .
* SYNOPSIS
* int glp_eval_tab_row(glp_prob *lp, int k, int ind[], double val[]);
* DESCRIPTION
* The routine glp_eval_tab_row computes a row of the current simplex tableau for the basic variable, which is specified by the number k: if 1 <= k <= m, x[k] is k-th auxiliary variable; if m+1 <= k <= m+n, x[k] is (k-m)-th structural variable, where m is number of rows, and n is number of columns. The current basis must be available.
* The routine stores column indices and numerical values of non-zero elements of the computed row using sparse format to the locations ind[1], ..., ind[len] and val[1], ..., val[len], respectively, where 0 <= len <= n is number of non-zeros returned on exit.
* Element indices stored in the array ind have the same sense as the index k, i.e. indices 1 to m denote auxiliary variables and indices m+1 to m+n denote structural ones (all these variables are obviously non-basic by definition).
* The computed row shows how the specified basic variable x[k] = xB[i] depends on non-basic variables:
* xB[i] = alfa[i,1]*xN[1] + alfa[i,2]*xN[2] + ... + alfa[i,n]*xN[n],
* where alfa[i,j] are elements of the simplex table row, xN[j] are non-basic (auxiliary and structural) variables.
* RETURNS
* The routine returns number of non-zero elements in the simplex table row stored in the arrays ind and val.
* BACKGROUND
* The system of equality constraints of the LP problem is:
* xR = A * xS, (1)
* where xR is the vector of auxliary variables, xS is the vector of structural variables, A is the matrix of constraint coefficients.
* The system (1) can be written in homogenous form as follows:
* A~ * x = 0, (2)
* where A~ = (I | -A) is the augmented constraint matrix (has m rows and m+n columns), x = (xR | xS) is the vector of all (auxiliary and structural) variables.
* By definition for the current basis we have:
* A~ = (B | N), (3)
* where B is the basis matrix. Thus, the system (2) can be written as:
* B * xB + N * xN = 0. (4)
* From (4) it follows that:
* xB = A^ * xN, (5)
* where the matrix
* A^ = - inv(B) * N (6)
* is called the simplex table.
* It is understood that i-th row of the simplex table is:
* e * A^ = - e * inv(B) * N, (7)
* where e is a unity vector with e[i] = 1.
* To compute i-th row of the simplex table the routine first computes i-th row of the inverse:
* rho = inv(B') * e, (8)
* where B' is a matrix transposed to B, and then computes elements of i-th row of the simplex table as scalar products:
* alfa[i,j] = - rho * N[j] for all j, (9)
* where N[j] is a column of the augmented constraint matrix A~, which corresponds to some non-basic auxiliary or structural variable.
*/
public";
%javamethodmodifiers glp_eval_tab_col(glp_prob *lp, int k, int ind[], double val[]) "
/**
* glp_eval_tab_col - compute column of the simplex tableau .
* SYNOPSIS
* int glp_eval_tab_col(glp_prob *lp, int k, int ind[], double val[]);
* DESCRIPTION
* The routine glp_eval_tab_col computes a column of the current simplex table for the non-basic variable, which is specified by the number k: if 1 <= k <= m, x[k] is k-th auxiliary variable; if m+1 <= k <= m+n, x[k] is (k-m)-th structural variable, where m is number of rows, and n is number of columns. The current basis must be available.
* The routine stores row indices and numerical values of non-zero elements of the computed column using sparse format to the locations ind[1], ..., ind[len] and val[1], ..., val[len] respectively, where 0 <= len <= m is number of non-zeros returned on exit.
* Element indices stored in the array ind have the same sense as the index k, i.e. indices 1 to m denote auxiliary variables and indices m+1 to m+n denote structural ones (all these variables are obviously basic by the definition).
* The computed column shows how basic variables depend on the specified non-basic variable x[k] = xN[j]:
* xB[1] = ... + alfa[1,j]*xN[j] + ... xB[2] = ... + alfa[2,j]*xN[j] + ... . . . . . . xB[m] = ... + alfa[m,j]*xN[j] + ...
* where alfa[i,j] are elements of the simplex table column, xB[i] are basic (auxiliary and structural) variables.
* RETURNS
* The routine returns number of non-zero elements in the simplex table column stored in the arrays ind and val.
* BACKGROUND
* As it was explained in comments to the routine glp_eval_tab_row (see above) the simplex table is the following matrix:
* A^ = - inv(B) * N. (1)
* Therefore j-th column of the simplex table is:
* A^ * e = - inv(B) * N * e = - inv(B) * N[j], (2)
* where e is a unity vector with e[j] = 1, B is the basis matrix, N[j] is a column of the augmented constraint matrix A~, which corresponds to the given non-basic auxiliary or structural variable.
*/
public";
%javamethodmodifiers glp_transform_row(glp_prob *P, int len, int ind[], double val[]) "
/**
* glp_transform_row - transform explicitly specified row .
* SYNOPSIS
* int glp_transform_row(glp_prob *P, int len, int ind[], double val[]);
* DESCRIPTION
* The routine glp_transform_row performs the same operation as the routine glp_eval_tab_row with exception that the row to be transformed is specified explicitly as a sparse vector.
* The explicitly specified row may be thought as a linear form:
* x = a[1]*x[m+1] + a[2]*x[m+2] + ... + a[n]*x[m+n], (1)
* where x is an auxiliary variable for this row, a[j] are coefficients of the linear form, x[m+j] are structural variables.
* On entry column indices and numerical values of non-zero elements of the row should be stored in locations ind[1], ..., ind[len] and val[1], ..., val[len], where len is the number of non-zero elements.
* This routine uses the system of equality constraints and the current basis in order to express the auxiliary variable x in (1) through the current non-basic variables (as if the transformed row were added to the problem object and its auxiliary variable were basic), i.e. the resultant row has the form:
* x = alfa[1]*xN[1] + alfa[2]*xN[2] + ... + alfa[n]*xN[n], (2)
* where xN[j] are non-basic (auxiliary or structural) variables, n is the number of columns in the LP problem object.
* On exit the routine stores indices and numerical values of non-zero elements of the resultant row (2) in locations ind[1], ..., ind[len'] and val[1], ..., val[len'], where 0 <= len' <= n is the number of non-zero elements in the resultant row returned by the routine. Note that indices (numbers) of non-basic variables stored in the array ind correspond to original ordinal numbers of variables: indices 1 to m mean auxiliary variables and indices m+1 to m+n mean structural ones.
* RETURNS
* The routine returns len', which is the number of non-zero elements in the resultant row stored in the arrays ind and val.
* BACKGROUND
* The explicitly specified row (1) is transformed in the same way as it were the objective function row.
* From (1) it follows that:
* x = aB * xB + aN * xN, (3)
* where xB is the vector of basic variables, xN is the vector of non-basic variables.
* The simplex table, which corresponds to the current basis, is:
* xB = [-inv(B) * N] * xN. (4)
* Therefore substituting xB from (4) to (3) we have:
* x = aB * [-inv(B) * N] * xN + aN * xN = (5) = rho * (-N) * xN + aN * xN = alfa * xN,
* where:
* rho = inv(B') * aB, (6)
* and
* alfa = aN + rho * (-N) (7)
* is the resultant row computed by the routine.
*/
public";
%javamethodmodifiers glp_transform_col(glp_prob *P, int len, int ind[], double val[]) "
/**
* glp_transform_col - transform explicitly specified column .
* SYNOPSIS
* int glp_transform_col(glp_prob *P, int len, int ind[], double val[]);
* DESCRIPTION
* The routine glp_transform_col performs the same operation as the routine glp_eval_tab_col with exception that the column to be transformed is specified explicitly as a sparse vector.
* The explicitly specified column may be thought as if it were added to the original system of equality constraints:
* x[1] = a[1,1]*x[m+1] + ... + a[1,n]*x[m+n] + a[1]*x x[2] = a[2,1]*x[m+1] + ... + a[2,n]*x[m+n] + a[2]*x (1) . . . . . . . . . . . . . . . x[m] = a[m,1]*x[m+1] + ... + a[m,n]*x[m+n] + a[m]*x
* where x[i] are auxiliary variables, x[m+j] are structural variables, x is a structural variable for the explicitly specified column, a[i] are constraint coefficients for x.
* On entry row indices and numerical values of non-zero elements of the column should be stored in locations ind[1], ..., ind[len] and val[1], ..., val[len], where len is the number of non-zero elements.
* This routine uses the system of equality constraints and the current basis in order to express the current basic variables through the structural variable x in (1) (as if the transformed column were added to the problem object and the variable x were non-basic), i.e. the resultant column has the form:
* xB[1] = ... + alfa[1]*x xB[2] = ... + alfa[2]*x (2) . . . . . . xB[m] = ... + alfa[m]*x
* where xB are basic (auxiliary and structural) variables, m is the number of rows in the problem object.
* On exit the routine stores indices and numerical values of non-zero elements of the resultant column (2) in locations ind[1], ..., ind[len'] and val[1], ..., val[len'], where 0 <= len' <= m is the number of non-zero element in the resultant column returned by the routine. Note that indices (numbers) of basic variables stored in the array ind correspond to original ordinal numbers of variables: indices 1 to m mean auxiliary variables and indices m+1 to m+n mean structural ones.
* RETURNS
* The routine returns len', which is the number of non-zero elements in the resultant column stored in the arrays ind and val.
* BACKGROUND
* The explicitly specified column (1) is transformed in the same way as any other column of the constraint matrix using the formula:
* alfa = inv(B) * a, (3)
* where alfa is the resultant column computed by the routine.
*/
public";
%javamethodmodifiers glp_prim_rtest(glp_prob *P, int len, const int ind[], const double val[], int dir, double eps) "
/**
* glp_prim_rtest - perform primal ratio test .
* SYNOPSIS
* int glp_prim_rtest(glp_prob *P, int len, const int ind[], const double val[], int dir, double eps);
* DESCRIPTION
* The routine glp_prim_rtest performs the primal ratio test using an explicitly specified column of the simplex table.
* The current basic solution associated with the LP problem object must be primal feasible.
* The explicitly specified column of the simplex table shows how the basic variables xB depend on some non-basic variable x (which is not necessarily presented in the problem object):
* xB[1] = ... + alfa[1] * x + ... xB[2] = ... + alfa[2] * x + ... (*) . . . . . . . . xB[m] = ... + alfa[m] * x + ...
* The column (*) is specifed on entry to the routine using the sparse format. Ordinal numbers of basic variables xB[i] should be placed in locations ind[1], ..., ind[len], where ordinal number 1 to m denote auxiliary variables, and ordinal numbers m+1 to m+n denote structural variables. The corresponding non-zero coefficients alfa[i] should be placed in locations val[1], ..., val[len]. The arrays ind and val are not changed on exit.
* The parameter dir specifies direction in which the variable x changes on entering the basis: +1 means increasing, -1 means decreasing.
* The parameter eps is an absolute tolerance (small positive number) used by the routine to skip small alfa[j] of the row (*).
* The routine determines which basic variable (among specified in ind[1], ..., ind[len]) should leave the basis in order to keep primal feasibility.
* RETURNS
* The routine glp_prim_rtest returns the index piv in the arrays ind and val corresponding to the pivot element chosen, 1 <= piv <= len. If the adjacent basic solution is primal unbounded and therefore the choice cannot be made, the routine returns zero.
* COMMENTS
* If the non-basic variable x is presented in the LP problem object, the column (*) can be computed with the routine glp_eval_tab_col; otherwise it can be computed with the routine glp_transform_col.
*/
public";
%javamethodmodifiers glp_dual_rtest(glp_prob *P, int len, const int ind[], const double val[], int dir, double eps) "
/**
* glp_dual_rtest - perform dual ratio test .
* SYNOPSIS
* int glp_dual_rtest(glp_prob *P, int len, const int ind[], const double val[], int dir, double eps);
* DESCRIPTION
* The routine glp_dual_rtest performs the dual ratio test using an explicitly specified row of the simplex table.
* The current basic solution associated with the LP problem object must be dual feasible.
* The explicitly specified row of the simplex table is a linear form that shows how some basic variable x (which is not necessarily presented in the problem object) depends on non-basic variables xN:
* x = alfa[1] * xN[1] + alfa[2] * xN[2] + ... + alfa[n] * xN[n]. (*)
* The row (*) is specified on entry to the routine using the sparse format. Ordinal numbers of non-basic variables xN[j] should be placed in locations ind[1], ..., ind[len], where ordinal numbers 1 to m denote auxiliary variables, and ordinal numbers m+1 to m+n denote structural variables. The corresponding non-zero coefficients alfa[j] should be placed in locations val[1], ..., val[len]. The arrays ind and val are not changed on exit.
* The parameter dir specifies direction in which the variable x changes on leaving the basis: +1 means that x goes to its lower bound, and -1 means that x goes to its upper bound.
* The parameter eps is an absolute tolerance (small positive number) used by the routine to skip small alfa[j] of the row (*).
* The routine determines which non-basic variable (among specified in ind[1], ..., ind[len]) should enter the basis in order to keep dual feasibility.
* RETURNS
* The routine glp_dual_rtest returns the index piv in the arrays ind and val corresponding to the pivot element chosen, 1 <= piv <= len. If the adjacent basic solution is dual unbounded and therefore the choice cannot be made, the routine returns zero.
* COMMENTS
* If the basic variable x is presented in the LP problem object, the row (*) can be computed with the routine glp_eval_tab_row; otherwise it can be computed with the routine glp_transform_row.
*/
public";
%javamethodmodifiers _glp_analyze_row(glp_prob *P, int len, const int ind[], const double val[], int type, double rhs, double eps, int *_piv, double *_x, double *_dx, double *_y, double *_dy, double *_dz) "
/**
* glp_analyze_row - simulate one iteration of dual simplex method .
* SYNOPSIS
* int glp_analyze_row(glp_prob *P, int len, const int ind[], const double val[], int type, double rhs, double eps, int *piv, double *x, double *dx, double *y, double *dy, double *dz);
* DESCRIPTION
* Let the current basis be optimal or dual feasible, and there be specified a row (constraint), which is violated by the current basic solution. The routine glp_analyze_row simulates one iteration of the dual simplex method to determine some information on the adjacent basis (see below), where the specified row becomes active constraint (i.e. its auxiliary variable becomes non-basic).
* The current basic solution associated with the problem object passed to the routine must be dual feasible, and its primal components must be defined.
* The row to be analyzed must be previously transformed either with the routine glp_eval_tab_row (if the row is in the problem object) or with the routine glp_transform_row (if the row is external, i.e. not in the problem object). This is needed to express the row only through (auxiliary and structural) variables, which are non-basic in the current basis:
* y = alfa[1] * xN[1] + alfa[2] * xN[2] + ... + alfa[n] * xN[n],
* where y is an auxiliary variable of the row, alfa[j] is an influence coefficient, xN[j] is a non-basic variable.
* The row is passed to the routine in sparse format. Ordinal numbers of non-basic variables are stored in locations ind[1], ..., ind[len], where numbers 1 to m denote auxiliary variables while numbers m+1 to m+n denote structural variables. Corresponding non-zero coefficients alfa[j] are stored in locations val[1], ..., val[len]. The arrays ind and val are ot changed on exit.
* The parameters type and rhs specify the row type and its right-hand side as follows:
* type = GLP_LO: y = sum alfa[j] * xN[j] >= rhs
* type = GLP_UP: y = sum alfa[j] * xN[j] <= rhs
* The parameter eps is an absolute tolerance (small positive number) used by the routine to skip small coefficients alfa[j] on performing the dual ratio test.
* If the operation was successful, the routine stores the following information to corresponding location (if some parameter is NULL, its value is not stored):
* piv index in the array ind and val, 1 <= piv <= len, determining the non-basic variable, which would enter the adjacent basis;
* x value of the non-basic variable in the current basis;
* dx difference between values of the non-basic variable in the adjacent and current bases, dx = x.new - x.old;
* y value of the row (i.e. of its auxiliary variable) in the current basis;
* dy difference between values of the row in the adjacent and current bases, dy = y.new - y.old;
* dz difference between values of the objective function in the adjacent and current bases, dz = z.new - z.old. Note that in case of minimization dz >= 0, and in case of maximization dz <= 0, i.e. in the adjacent basis the objective function always gets worse (degrades).
*/
public";
%javamethodmodifiers glp_analyze_bound(glp_prob *P, int k, double *value1, int *var1, double *value2, int *var2) "
/**
* glp_analyze_bound - analyze active bound of non-basic variable .
* SYNOPSIS
* void glp_analyze_bound(glp_prob *P, int k, double *limit1, int *var1, double *limit2, int *var2);
* DESCRIPTION
* The routine glp_analyze_bound analyzes the effect of varying the active bound of specified non-basic variable.
* The non-basic variable is specified by the parameter k, where 1 <= k <= m means auxiliary variable of corresponding row while m+1 <= k <= m+n means structural variable (column).
* Note that the current basic solution must be optimal, and the basis factorization must exist.
* Results of the analysis have the following meaning.
* value1 is the minimal value of the active bound, at which the basis still remains primal feasible and thus optimal. -DBL_MAX means that the active bound has no lower limit.
* var1 is the ordinal number of an auxiliary (1 to m) or structural (m+1 to n) basic variable, which reaches its bound first and thereby limits further decreasing the active bound being analyzed. if value1 = -DBL_MAX, var1 is set to 0.
* value2 is the maximal value of the active bound, at which the basis still remains primal feasible and thus optimal. +DBL_MAX means that the active bound has no upper limit.
* var2 is the ordinal number of an auxiliary (1 to m) or structural (m+1 to n) basic variable, which reaches its bound first and thereby limits further increasing the active bound being analyzed. if value2 = +DBL_MAX, var2 is set to 0.
*/
public";
%javamethodmodifiers glp_analyze_coef(glp_prob *P, int k, double *coef1, int *var1, double *value1, double *coef2, int *var2, double *value2) "
/**
* glp_analyze_coef - analyze objective coefficient at basic variable .
* SYNOPSIS
* void glp_analyze_coef(glp_prob *P, int k, double *coef1, int *var1, double *value1, double *coef2, int *var2, double *value2);
* DESCRIPTION
* The routine glp_analyze_coef analyzes the effect of varying the objective coefficient at specified basic variable.
* The basic variable is specified by the parameter k, where 1 <= k <= m means auxiliary variable of corresponding row while m+1 <= k <= m+n means structural variable (column).
* Note that the current basic solution must be optimal, and the basis factorization must exist.
* Results of the analysis have the following meaning.
* coef1 is the minimal value of the objective coefficient, at which the basis still remains dual feasible and thus optimal. -DBL_MAX means that the objective coefficient has no lower limit.
* var1 is the ordinal number of an auxiliary (1 to m) or structural (m+1 to n) non-basic variable, whose reduced cost reaches its zero bound first and thereby limits further decreasing the objective coefficient being analyzed. If coef1 = -DBL_MAX, var1 is set to 0.
* value1 is value of the basic variable being analyzed in an adjacent basis, which is defined as follows. Let the objective coefficient reaches its minimal value (coef1) and continues decreasing. Then the reduced cost of the limiting non-basic variable (var1) becomes dual infeasible and the current basis becomes non-optimal that forces the limiting non-basic variable to enter the basis replacing there some basic variable that leaves the basis to keep primal feasibility. Should note that on determining the adjacent basis current bounds of the basic variable being analyzed are ignored as if it were free (unbounded) variable, so it cannot leave the basis. It may happen that no dual feasible adjacent basis exists, in which case value1 is set to -DBL_MAX or +DBL_MAX.
* coef2 is the maximal value of the objective coefficient, at which the basis still remains dual feasible and thus optimal. +DBL_MAX means that the objective coefficient has no upper limit.
* var2 is the ordinal number of an auxiliary (1 to m) or structural (m+1 to n) non-basic variable, whose reduced cost reaches its zero bound first and thereby limits further increasing the objective coefficient being analyzed. If coef2 = +DBL_MAX, var2 is set to 0.
* value2 is value of the basic variable being analyzed in an adjacent basis, which is defined exactly in the same way as value1 above with exception that now the objective coefficient is increasing.
*/
public";
%javamethodmodifiers npp_sat_free_row(NPP *npp, NPPROW *p) "
/**
*/
public";
%javamethodmodifiers rcv_sat_fixed_col(NPP *, void *) "
/**
*/
public";
%javamethodmodifiers npp_sat_fixed_col(NPP *npp, NPPCOL *q) "
/**
*/
public";
%javamethodmodifiers npp_sat_is_bin_comb(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_sat_num_pos_coef(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_sat_num_neg_coef(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_sat_is_cover_ineq(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_sat_is_pack_ineq(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_sat_is_partn_eq(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_sat_reverse_row(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_sat_split_pack(NPP *npp, NPPROW *row, int nlit) "
/**
*/
public";
%javamethodmodifiers npp_sat_encode_pack(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_sat_encode_sum2(NPP *npp, NPPLSE *set, NPPSED *sed) "
/**
*/
public";
%javamethodmodifiers npp_sat_encode_sum3(NPP *npp, NPPLSE *set, NPPSED *sed) "
/**
*/
public";
%javamethodmodifiers remove_lse(NPP *npp, NPPLSE *set, NPPCOL *col) "
/**
*/
public";
%javamethodmodifiers npp_sat_encode_sum_ax(NPP *npp, NPPROW *row, NPPLIT y[]) "
/**
*/
public";
%javamethodmodifiers npp_sat_normalize_clause(NPP *npp, int size, NPPLIT lit[]) "
/**
*/
public";
%javamethodmodifiers npp_sat_encode_clause(NPP *npp, int size, NPPLIT lit[]) "
/**
*/
public";
%javamethodmodifiers npp_sat_encode_geq(NPP *npp, int n, NPPLIT y[], int rhs) "
/**
*/
public";
%javamethodmodifiers npp_sat_encode_leq(NPP *npp, int n, NPPLIT y[], int rhs) "
/**
*/
public";
%javamethodmodifiers npp_sat_encode_row(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_sat_encode_prob(NPP *npp) "
/**
*/
public";
%javamethodmodifiers check_fvs(int n, int nnz, int ind[], double vec[]) "
/**
*/
public";
%javamethodmodifiers check_pattern(int m, int n, int A_ptr[], int A_ind[]) "
/**
*/
public";
%javamethodmodifiers transpose(int m, int n, int A_ptr[], int A_ind[], double A_val[], int AT_ptr[], int AT_ind[], double AT_val[]) "
/**
*/
public";
%javamethodmodifiers adat_symbolic(int m, int n, int P_per[], int A_ptr[], int A_ind[], int S_ptr[]) "
/**
*/
public";
%javamethodmodifiers adat_numeric(int m, int n, int P_per[], int A_ptr[], int A_ind[], double A_val[], double D_diag[], int S_ptr[], int S_ind[], double S_val[], double S_diag[]) "
/**
*/
public";
%javamethodmodifiers min_degree(int n, int A_ptr[], int A_ind[], int P_per[]) "
/**
*/
public";
%javamethodmodifiers amd_order1(int n, int A_ptr[], int A_ind[], int P_per[]) "
/**
*/
public";
%javamethodmodifiers allocate(size_t n, size_t size) "
/**
*/
public";
%javamethodmodifiers release(void *ptr) "
/**
*/
public";
%javamethodmodifiers symamd_ord(int n, int A_ptr[], int A_ind[], int P_per[]) "
/**
*/
public";
%javamethodmodifiers chol_symbolic(int n, int A_ptr[], int A_ind[], int U_ptr[]) "
/**
*/
public";
%javamethodmodifiers chol_numeric(int n, int A_ptr[], int A_ind[], double A_val[], double A_diag[], int U_ptr[], int U_ind[], double U_val[], double U_diag[]) "
/**
*/
public";
%javamethodmodifiers u_solve(int n, int U_ptr[], int U_ind[], double U_val[], double U_diag[], double x[]) "
/**
*/
public";
%javamethodmodifiers ut_solve(int n, int U_ptr[], int U_ind[], double U_val[], double U_diag[], double x[]) "
/**
*/
public";
%javamethodmodifiers next_char(glp_data *data) "
/**
*/
public";
%javamethodmodifiers glp_sdf_open_file(const char *fname) "
/**
*/
public";
%javamethodmodifiers glp_sdf_set_jump(glp_data *data, void *jump) "
/**
*/
public";
%javamethodmodifiers glp_sdf_error(glp_data *data, const char *fmt,...) "
/**
*/
public";
%javamethodmodifiers glp_sdf_warning(glp_data *data, const char *fmt,...) "
/**
*/
public";
%javamethodmodifiers skip_pad(glp_data *data) "
/**
*/
public";
%javamethodmodifiers next_item(glp_data *data) "
/**
*/
public";
%javamethodmodifiers glp_sdf_read_int(glp_data *data) "
/**
*/
public";
%javamethodmodifiers glp_sdf_read_num(glp_data *data) "
/**
*/
public";
%javamethodmodifiers glp_sdf_read_item(glp_data *data) "
/**
*/
public";
%javamethodmodifiers glp_sdf_read_text(glp_data *data) "
/**
*/
public";
%javamethodmodifiers glp_sdf_line(glp_data *data) "
/**
*/
public";
%javamethodmodifiers glp_sdf_close_file(glp_data *data) "
/**
*/
public";
%javamethodmodifiers callback(glp_tree *tree, void *info) "
/**
*/
public";
%javamethodmodifiers get_info(struct csa *csa, glp_prob *lp) "
/**
*/
public";
%javamethodmodifiers is_integer(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers check_integrality(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers check_ref(struct csa *csa, glp_prob *lp, double *xref) "
/**
*/
public";
%javamethodmodifiers second(void) "
/**
*/
public";
%javamethodmodifiers add_cutoff(struct csa *csa, glp_prob *lp) "
/**
*/
public";
%javamethodmodifiers get_sol(struct csa *csa, glp_prob *lp, double *xstar) "
/**
*/
public";
%javamethodmodifiers elapsed_time(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers redefine_obj(glp_prob *lp, double *xtilde, int ncols, int *ckind, double *clb, double *cub) "
/**
*/
public";
%javamethodmodifiers update_cutoff(struct csa *csa, glp_prob *lp, double zstar, int index, double rel_impr) "
/**
*/
public";
%javamethodmodifiers compute_delta(struct csa *csa, double z, double rel_impr) "
/**
*/
public";
%javamethodmodifiers objval(int ncols, double *x, double *true_obj) "
/**
*/
public";
%javamethodmodifiers array_copy(int begin, int end, double *source, double *destination) "
/**
*/
public";
%javamethodmodifiers do_refine(struct csa *csa, glp_prob *lp_ref, int ncols, int *ckind, double *xref, int *tlim, int tref_lim, int verbose) "
/**
*/
public";
%javamethodmodifiers deallocate(struct csa *csa, int refine) "
/**
*/
public";
%javamethodmodifiers proxy(glp_prob *lp, double *zfinal, double *xfinal, const double initsol[], double rel_impr, int tlim, int verbose) "
/**
*/
public";
%javamethodmodifiers AMD_info(double Info[]) "
/**
*/
public";
%javamethodmodifiers reduce_ineq_coef(NPP *npp, struct elem *ptr, double *_b) "
/**
* npp_reduce_ineq_coef - reduce inequality constraint coefficients .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_reduce_ineq_coef(NPP *npp, NPPROW *row);
* DESCRIPTION
* The routine npp_reduce_ineq_coef processes specified inequality constraint attempting to replace it by an equivalent constraint, where magnitude of coefficients at binary variables is smaller than in the original constraint. If the inequality is double-sided, it is replaced by a pair of single-sided inequalities, if necessary.
* RETURNS
* The routine npp_reduce_ineq_coef returns the number of coefficients reduced.
* BACKGROUND
* Consider an inequality constraint:
* sum a[j] x[j] >= b. (1) j in J
* (In case of '<=' inequality it can be transformed to '>=' format by multiplying both its sides by -1.) Let x[k] be a binary variable; other variables can be integer as well as continuous. We can write constraint (1) as follows:
* a[k] x[k] + t[k] >= b, (2)
* where:
* t[k] = sum a[j] x[j]. (3) j in Jk}
* Since x[k] is binary, constraint (2) is equivalent to disjunction of the following two constraints:
* x[k] = 0, t[k] >= b (4)
* OR
* x[k] = 1, t[k] >= b - a[k]. (5)
* Let also that for the partial sum t[k] be known some its implied lower bound inf t[k].
* Case a[k] > 0. Let inf t[k] < b, since otherwise both constraints (4) and (5) and therefore constraint (2) are redundant. If inf t[k] > b - a[k], only constraint (5) is redundant, in which case it can be replaced with the following redundant and therefore equivalent constraint:
* t[k] >= b - a'[k] = inf t[k], (6)
* where:
* a'[k] = b - inf t[k]. (7)
* Thus, the original constraint (2) is equivalent to the following constraint with coefficient at variable x[k] changed:
* a'[k] x[k] + t[k] >= b. (8)
* From inf t[k] < b it follows that a'[k] > 0, i.e. the coefficient at x[k] keeps its sign. And from inf t[k] > b - a[k] it follows that a'[k] < a[k], i.e. the coefficient reduces in magnitude.
* Case a[k] < 0. Let inf t[k] < b - a[k], since otherwise both constraints (4) and (5) and therefore constraint (2) are redundant. If inf t[k] > b, only constraint (4) is redundant, in which case it can be replaced with the following redundant and therefore equivalent constraint:
* t[k] >= b' = inf t[k]. (9)
* Rewriting constraint (5) as follows:
* t[k] >= b - a[k] = b' - a'[k], (10)
* where:
* a'[k] = a[k] + b' - b = a[k] + inf t[k] - b, (11)
* we can see that disjunction of constraint (9) and (10) is equivalent to disjunction of constraint (4) and (5), from which it follows that the original constraint (2) is equivalent to the following constraint with both coefficient at variable x[k] and right-hand side changed:
* a'[k] x[k] + t[k] >= b'. (12)
* From inf t[k] < b - a[k] it follows that a'[k] < 0, i.e. the coefficient at x[k] keeps its sign. And from inf t[k] > b it follows that a'[k] > a[k], i.e. the coefficient reduces in magnitude.
* PROBLEM TRANSFORMATION
* In the routine npp_reduce_ineq_coef the following implied lower bound of the partial sum (3) is used:
* inf t[k] = sum a[j] l[j] + sum a[j] u[j], (13) j in Jpk} k in Jnk}
* where Jp = {j : a[j] > 0}, Jn = {j : a[j] < 0}, l[j] and u[j] are lower and upper bounds, resp., of variable x[j].
* In order to compute inf t[k] more efficiently, the following formula, which is equivalent to (13), is actually used: ( h - a[k] l[k] = h, if a[k] > 0,
inf t[k] = < (14) ( h - a[k] u[k] = h - a[k], if a[k] < 0,
* where:
* h = sum a[j] l[j] + sum a[j] u[j] (15) j in Jp j in Jn
* is the implied lower bound of row (1).
* Reduction of positive coefficient (a[k] > 0) does not change value of h, since l[k] = 0. In case of reduction of negative coefficient (a[k] < 0) from (11) it follows that:
* delta a[k] = a'[k] - a[k] = inf t[k] - b (> 0), (16)
* so new value of h (accounting that u[k] = 1) can be computed as follows:
* h := h + delta a[k] = h + (inf t[k] - b). (17)
* RECOVERING SOLUTION
* None needed.
*/
public";
%javamethodmodifiers npp_reduce_ineq_coef(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers rcv_binarize_prob(NPP *npp, void *info) "
/**
*/
public";
%javamethodmodifiers npp_binarize_prob(NPP *npp) "
/**
*/
public";
%javamethodmodifiers copy_form(NPP *npp, NPPROW *row, double s) "
/**
*/
public";
%javamethodmodifiers drop_form(NPP *npp, struct elem *ptr) "
/**
*/
public";
%javamethodmodifiers npp_is_packing(NPP *npp, NPPROW *row) "
/**
* npp_is_packing - test if constraint is packing inequality .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_is_packing(NPP *npp, NPPROW *row);
* RETURNS
* If the specified row (constraint) is packing inequality (see below), the routine npp_is_packing returns non-zero. Otherwise, it returns zero.
* PACKING INEQUALITIES
* In canonical format the packing inequality is the following:
* sum x[j] <= 1, (1) j in J
* where all variables x[j] are binary. This inequality expresses the condition that in any integer feasible solution at most one variable from set J can take non-zero (unity) value while other variables must be equal to zero. W.l.o.g. it is assumed that |J| >= 2, because if J is empty or |J| = 1, the inequality (1) is redundant.
* In general case the packing inequality may include original variables x[j] as well as their complements x~[j]:
* sum x[j] + sum x~[j] <= 1, (2) j in Jp j in Jn
* where Jp and Jn are not intersected. Therefore, using substitution x~[j] = 1 - x[j] gives the packing inequality in generalized format:
* sum x[j] - sum x[j] <= 1 - |Jn|. (3) j in Jp j in Jn
*/
public";
%javamethodmodifiers hidden_packing(NPP *npp, struct elem *ptr, double *_b) "
/**
* npp_hidden_packing - identify hidden packing inequality .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_hidden_packing(NPP *npp, NPPROW *row);
* DESCRIPTION
* The routine npp_hidden_packing processes specified inequality constraint, which includes only binary variables, and the number of the variables is not less than two. If the original inequality is equivalent to a packing inequality, the routine replaces it by this equivalent inequality. If the original constraint is double-sided inequality, it is replaced by a pair of single-sided inequalities, if necessary.
* RETURNS
* If the original inequality constraint was replaced by equivalent packing inequality, the routine npp_hidden_packing returns non-zero. Otherwise, it returns zero.
* PROBLEM TRANSFORMATION
* Consider an inequality constraint:
* sum a[j] x[j] <= b, (1) j in J
* where all variables x[j] are binary, and |J| >= 2. (In case of '>=' inequality it can be transformed to '<=' format by multiplying both its sides by -1.)
* Let Jp = {j: a[j] > 0}, Jn = {j: a[j] < 0}. Performing substitution x[j] = 1 - x~[j] for all j in Jn, we have:
* sum a[j] x[j] <= b ==> j in J
* sum a[j] x[j] + sum a[j] x[j] <= b ==> j in Jp j in Jn
* sum a[j] x[j] + sum a[j] (1 - x~[j]) <= b ==> j in Jp j in Jn
* sum a[j] x[j] - sum a[j] x~[j] <= b - sum a[j]. j in Jp j in Jn j in Jn
* Thus, meaning the transformation above, we can assume that in inequality (1) all coefficients a[j] are positive. Moreover, we can assume that a[j] <= b. In fact, let a[j] > b; then the following three cases are possible:
* 1) b < 0. In this case inequality (1) is infeasible, so the problem has no feasible solution (see the routine npp_analyze_row);
* 2) b = 0. In this case inequality (1) is a forcing inequality on its upper bound (see the routine npp_forcing row), from which it follows that all variables x[j] should be fixed at zero;
* 3) b > 0. In this case inequality (1) defines an implied zero upper bound for variable x[j] (see the routine npp_implied_bounds), from which it follows that x[j] should be fixed at zero.
* It is assumed that all three cases listed above have been recognized by the routine npp_process_prob, which performs basic MIP processing prior to a call the routine npp_hidden_packing. So, if one of these cases occurs, we should just skip processing such constraint.
* Thus, let 0 < a[j] <= b. Then it is obvious that constraint (1) is equivalent to packing inquality only if:
* a[j] + a[k] > b + eps (2)
* for all j, k in J, j != k, where eps is an absolute tolerance for row (linear form) value. Checking the condition (2) for all j and k, j != k, requires time O(|J|^2). However, this time can be reduced to O(|J|), if use minimal a[j] and a[k], in which case it is sufficient to check the condition (2) only once.
* Once the original inequality (1) is replaced by equivalent packing inequality, we need to perform back substitution x~[j] = 1 - x[j] for all j in Jn (see above).
* RECOVERING SOLUTION
* None needed.
*/
public";
%javamethodmodifiers npp_hidden_packing(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_implied_packing(NPP *npp, NPPROW *row, int which, NPPCOL *var[], char set[]) "
/**
* npp_implied_packing - identify implied packing inequality .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_implied_packing(NPP *npp, NPPROW *row, int which, NPPCOL *var[], char set[]);
* DESCRIPTION
* The routine npp_implied_packing processes specified row (constraint) of general format:
* L <= sum a[j] x[j] <= U. (1) j
* If which = 0, only lower bound L, which must exist, is considered, while upper bound U is ignored. Similarly, if which = 1, only upper bound U, which must exist, is considered, while lower bound L is ignored. Thus, if the specified row is a double-sided inequality or equality constraint, this routine should be called twice for both lower and upper bounds.
* The routine npp_implied_packing attempts to find a non-trivial (i.e. having not less than two binary variables) packing inequality:
* sum x[j] - sum x[j] <= 1 - |Jn|, (2) j in Jp j in Jn
* which is relaxation of the constraint (1) in the sense that any solution satisfying to that constraint also satisfies to the packing inequality (2). If such relaxation exists, the routine stores pointers to descriptors of corresponding binary variables and their flags, resp., to locations var[1], var[2], ..., var[len] and set[1], set[2], ..., set[len], where set[j] = 0 means that j in Jp and set[j] = 1 means that j in Jn.
* RETURNS
* The routine npp_implied_packing returns len, which is the total number of binary variables in the packing inequality found, len >= 2. However, if the relaxation does not exist, the routine returns zero.
* ALGORITHM
* If which = 0, the constraint coefficients (1) are multiplied by -1 and b is assigned -L; if which = 1, the constraint coefficients (1) are not changed and b is assigned +U. In both cases the specified constraint gets the following format:
* sum a[j] x[j] <= b. (3) j
* (Note that (3) is a relaxation of (1), because one of bounds L or U is ignored.)
* Let J be set of binary variables, Kp be set of non-binary (integer or continuous) variables with a[j] > 0, and Kn be set of non-binary variables with a[j] < 0. Then the inequality (3) can be written as follows:
* sum a[j] x[j] <= b - sum a[j] x[j] - sum a[j] x[j]. (4) j in J j in Kp j in Kn
* To get rid of non-binary variables we can replace the inequality (4) by the following relaxed inequality:
* sum a[j] x[j] <= b~, (5) j in J
* where:
* b~ = sup(b - sum a[j] x[j] - sum a[j] x[j]) = j in Kp j in Kn
* = b - inf sum a[j] x[j] - inf sum a[j] x[j] = (6) j in Kp j in Kn
* = b - sum a[j] l[j] - sum a[j] u[j]. j in Kp j in Kn
* Note that if lower bound l[j] (if j in Kp) or upper bound u[j] (if j in Kn) of some non-binary variable x[j] does not exist, then formally b = +oo, in which case further analysis is not performed.
* Let Bp = {j in J: a[j] > 0}, Bn = {j in J: a[j] < 0}. To make all the inequality coefficients in (5) positive, we replace all x[j] in Bn by their complementaries, substituting x[j] = 1 - x~[j] for all j in Bn, that gives:
* sum a[j] x[j] - sum a[j] x~[j] <= b~ - sum a[j]. (7) j in Bp j in Bn j in Bn
* This inequality is a relaxation of the original constraint (1), and it is a binary knapsack inequality. Writing it in the standard format we have:
* sum alfa[j] z[j] <= beta, (8) j in J
* where: ( + a[j], if j in Bp, alfa[j] = < (9) ( - a[j], if j in Bn,
* ( x[j], if j in Bp, z[j] = < (10) ( 1 - x[j], if j in Bn,
* beta = b~ - sum a[j]. (11) j in Bn
* In the inequality (8) all coefficients are positive, therefore, the packing relaxation to be found for this inequality is the following:
* sum z[j] <= 1. (12) j in P
* It is obvious that set P within J, which we would like to find, must satisfy to the following condition:
* alfa[j] + alfa[k] > beta + eps for all j, k in P, j != k, (13)
* where eps is an absolute tolerance for value of the linear form. Thus, it is natural to take P = {j: alpha[j] > (beta + eps) / 2}. Moreover, if in the equality (8) there exist coefficients alfa[k], for which alfa[k] <= (beta + eps) / 2, but which, nevertheless, satisfies to the condition (13) for all j in P, one corresponding variable z[k] (having, for example, maximal coefficient alfa[k]) can be included in set P, that allows increasing the number of binary variables in (12) by one.
* Once the set P has been built, for the inequality (12) we need to perform back substitution according to (10) in order to express it through the original binary variables. As the result of such back substitution the relaxed packing inequality get its final format (2), where Jp = J intersect Bp, and Jn = J intersect Bn.
*/
public";
%javamethodmodifiers npp_is_covering(NPP *npp, NPPROW *row) "
/**
* npp_is_covering - test if constraint is covering inequality .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_is_covering(NPP *npp, NPPROW *row);
* RETURNS
* If the specified row (constraint) is covering inequality (see below), the routine npp_is_covering returns non-zero. Otherwise, it returns zero.
* COVERING INEQUALITIES
* In canonical format the covering inequality is the following:
* sum x[j] >= 1, (1) j in J
* where all variables x[j] are binary. This inequality expresses the condition that in any integer feasible solution variables in set J cannot be all equal to zero at the same time, i.e. at least one variable must take non-zero (unity) value. W.l.o.g. it is assumed that |J| >= 2, because if J is empty, the inequality (1) is infeasible, and if |J| = 1, the inequality (1) is a forcing row.
* In general case the covering inequality may include original variables x[j] as well as their complements x~[j]:
* sum x[j] + sum x~[j] >= 1, (2) j in Jp j in Jn
* where Jp and Jn are not intersected. Therefore, using substitution x~[j] = 1 - x[j] gives the packing inequality in generalized format:
* sum x[j] - sum x[j] >= 1 - |Jn|. (3) j in Jp j in Jn
* (May note that the inequality (3) cuts off infeasible solutions, where x[j] = 0 for all j in Jp and x[j] = 1 for all j in Jn.)
* NOTE: If |J| = 2, the inequality (3) is equivalent to packing inequality (see the routine npp_is_packing).
*/
public";
%javamethodmodifiers hidden_covering(NPP *npp, struct elem *ptr, double *_b) "
/**
* npp_hidden_covering - identify hidden covering inequality .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_hidden_covering(NPP *npp, NPPROW *row);
* DESCRIPTION
* The routine npp_hidden_covering processes specified inequality constraint, which includes only binary variables, and the number of the variables is not less than three. If the original inequality is equivalent to a covering inequality (see below), the routine replaces it by the equivalent inequality. If the original constraint is double-sided inequality, it is replaced by a pair of single-sided inequalities, if necessary.
* RETURNS
* If the original inequality constraint was replaced by equivalent covering inequality, the routine npp_hidden_covering returns non-zero. Otherwise, it returns zero.
* PROBLEM TRANSFORMATION
* Consider an inequality constraint:
* sum a[j] x[j] >= b, (1) j in J
* where all variables x[j] are binary, and |J| >= 3. (In case of '<=' inequality it can be transformed to '>=' format by multiplying both its sides by -1.)
* Let Jp = {j: a[j] > 0}, Jn = {j: a[j] < 0}. Performing substitution x[j] = 1 - x~[j] for all j in Jn, we have:
* sum a[j] x[j] >= b ==> j in J
* sum a[j] x[j] + sum a[j] x[j] >= b ==> j in Jp j in Jn
* sum a[j] x[j] + sum a[j] (1 - x~[j]) >= b ==> j in Jp j in Jn
* sum m a[j] x[j] - sum a[j] x~[j] >= b - sum a[j]. j in Jp j in Jn j in Jn
* Thus, meaning the transformation above, we can assume that in inequality (1) all coefficients a[j] are positive. Moreover, we can assume that b > 0, because otherwise the inequality (1) would be redundant (see the routine npp_analyze_row). It is then obvious that constraint (1) is equivalent to covering inequality only if:
* a[j] >= b, (2)
* for all j in J.
* Once the original inequality (1) is replaced by equivalent covering inequality, we need to perform back substitution x~[j] = 1 - x[j] for all j in Jn (see above).
* RECOVERING SOLUTION
* None needed.
*/
public";
%javamethodmodifiers npp_hidden_covering(NPP *npp, NPPROW *row) "
/**
*/
public";
%javamethodmodifiers npp_is_partitioning(NPP *npp, NPPROW *row) "
/**
* npp_is_partitioning - test if constraint is partitioning equality .
* SYNOPSIS
* #include \"glpnpp.h\" int npp_is_partitioning(NPP *npp, NPPROW *row);
* RETURNS
* If the specified row (constraint) is partitioning equality (see below), the routine npp_is_partitioning returns non-zero. Otherwise, it returns zero.
* PARTITIONING EQUALITIES
* In canonical format the partitioning equality is the following:
* sum x[j] = 1, (1) j in J
* where all variables x[j] are binary. This equality expresses the condition that in any integer feasible solution exactly one variable in set J must take non-zero (unity) value while other variables must be equal to zero. W.l.o.g. it is assumed that |J| >= 2, because if J is empty, the inequality (1) is infeasible, and if |J| = 1, the inequality (1) is a fixing row.
* In general case the partitioning equality may include original variables x[j] as well as their complements x~[j]:
* sum x[j] + sum x~[j] = 1, (2) j in Jp j in Jn
* where Jp and Jn are not intersected. Therefore, using substitution x~[j] = 1 - x[j] leads to the partitioning equality in generalized format:
* sum x[j] - sum x[j] = 1 - |Jn|. (3) j in Jp j in Jn
*/
public";
%javamethodmodifiers gz_load(gz_statep state, unsigned char *buf, unsigned len, unsigned *have) "
/**
*/
public";
%javamethodmodifiers gz_avail(gz_statep state) "
/**
*/
public";
%javamethodmodifiers gz_next4(gz_statep state, unsigned long *ret) "
/**
*/
public";
%javamethodmodifiers gz_head(gz_statep state) "
/**
*/
public";
%javamethodmodifiers gz_decomp(gz_statep state) "
/**
*/
public";
%javamethodmodifiers gz_make(gz_statep state) "
/**
*/
public";
%javamethodmodifiers gz_skip(gz_statep state, z_off64_t len) "
/**
*/
public";
%javamethodmodifiers gzread(gzFile file, voidp buf, unsigned len) "
/**
*/
public";
%javamethodmodifiers gzgetc(gzFile file) "
/**
*/
public";
%javamethodmodifiers gzungetc(int c, gzFile file) "
/**
*/
public";
%javamethodmodifiers gzgets(gzFile file, char *buf, int len) "
/**
*/
public";
%javamethodmodifiers gzdirect(gzFile file) "
/**
*/
public";
%javamethodmodifiers gzclose_r(gzFile file) "
/**
*/
public";
%javamethodmodifiers set_edge(int nv, unsigned char a[], int i, int j) "
/**
*/
public";
%javamethodmodifiers glp_wclique_exact(glp_graph *G, int v_wgt, double *sol, int v_set) "
/**
*/
public";
%javamethodmodifiers initialize(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers A_by_vec(struct csa *csa, double x[], double y[]) "
/**
*/
public";
%javamethodmodifiers AT_by_vec(struct csa *csa, double x[], double y[]) "
/**
*/
public";
%javamethodmodifiers decomp_NE(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers solve_NE(struct csa *csa, double y[]) "
/**
*/
public";
%javamethodmodifiers solve_NS(struct csa *csa, double p[], double q[], double r[], double dx[], double dy[], double dz[]) "
/**
*/
public";
%javamethodmodifiers initial_point(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers basic_info(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers make_step(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers terminate(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers ipm_main(struct csa *csa) "
/**
*/
public";
%javamethodmodifiers ipm_solve(glp_prob *P, const glp_iptcp *parm) "
/**
* ipm_solve - core LP solver based on the interior-point method .
* SYNOPSIS
* #include \"glpipm.h\" int ipm_solve(glp_prob *P, const glp_iptcp *parm);
* DESCRIPTION
* The routine ipm_solve is a core LP solver based on the primal-dual interior-point method.
* The routine assumes the following standard formulation of LP problem to be solved:
* minimize
* F = c[0] + c[1]*x[1] + c[2]*x[2] + ... + c[n]*x[n]
* subject to linear constraints
* a[1,1]*x[1] + a[1,2]*x[2] + ... + a[1,n]*x[n] = b[1]
* a[2,1]*x[1] + a[2,2]*x[2] + ... + a[2,n]*x[n] = b[2] . . . . . .
* a[m,1]*x[1] + a[m,2]*x[2] + ... + a[m,n]*x[n] = b[m]
* and non-negative variables
* x[1] >= 0, x[2] >= 0, ..., x[n] >= 0
* where: F is the objective function; x[1], ..., x[n] are (structural) variables; c[0] is a constant term of the objective function; c[1], ..., c[n] are objective coefficients; a[1,1], ..., a[m,n] are constraint coefficients; b[1], ..., b[n] are right-hand sides.
* The solution is three vectors x, y, and z, which are stored by the routine in the arrays x, y, and z, respectively. These vectors correspond to the best primal-dual point found during optimization. They are approximate solution of the following system (which is the Karush-Kuhn-Tucker optimality conditions):
* A*x = b (primal feasibility condition)
* A'*y + z = c (dual feasibility condition)
* x'*z = 0 (primal-dual complementarity condition)
* x >= 0, z >= 0 (non-negativity condition)
* where: x[1], ..., x[n] are primal (structural) variables; y[1], ..., y[m] are dual variables (Lagrange multipliers) for equality constraints; z[1], ..., z[n] are dual variables (Lagrange multipliers) for non-negativity constraints.
* RETURNS
* 0 LP has been successfully solved.
* GLP_ENOCVG No convergence.
* GLP_EITLIM Iteration limit exceeded.
* GLP_EINSTAB Numeric instability on solving Newtonian system.
* In case of non-zero return code the routine returns the best point, which has been reached during optimization.
*/
public";
%javamethodmodifiers fcmp(const void *arg1, const void *arg2) "
/**
*/
public";
%javamethodmodifiers parallel(IOSCUT *a, IOSCUT *b, double work[]) "
/**
*/
public";
%javamethodmodifiers ios_process_cuts(glp_tree *T) "
/**
*/
public";
%javamethodmodifiers fhvint_create(void) "
/**
*/
public";
%javamethodmodifiers fhvint_factorize(FHVINT *fi, int n, int(*col)(void *info, int j, int ind[], double val[]), void *info) "
/**
*/
public";
%javamethodmodifiers fhvint_update(FHVINT *fi, int j, int len, const int ind[], const double val[]) "
/**
*/
public";
%javamethodmodifiers fhvint_ftran(FHVINT *fi, double x[]) "
/**
*/
public";
%javamethodmodifiers fhvint_btran(FHVINT *fi, double x[]) "
/**
*/
public";
%javamethodmodifiers fhvint_estimate(FHVINT *fi) "
/**
*/
public";
%javamethodmodifiers fhvint_delete(FHVINT *fi) "
/**
*/
public";
%javamethodmodifiers mat(void *info, int k, int ind[], double val[]) "
/**
* glp_adv_basis - construct advanced initial LP basis .
* SYNOPSIS
* void glp_adv_basis(glp_prob *P, int flags);
* DESCRIPTION
* The routine glp_adv_basis constructs an advanced initial LP basis for the specified problem object.
* The parameter flag is reserved for use in the future and should be specified as zero.
* NOTE
* The routine glp_adv_basis should be called after the constraint matrix has been scaled (if scaling is used).
*/
public";
%javamethodmodifiers glp_adv_basis(glp_prob *P, int flags) "
/**
*/
public";
%javamethodmodifiers genqmd(int *_neqns, int xadj[], int adjncy[], int perm[], int invp[], int deg[], int marker[], int rchset[], int nbrhd[], int qsize[], int qlink[], int *_nofsub) "
/**
* genqmd - GENeral Quotient Minimum Degree algorithm .
* SYNOPSIS
* #include \"qmd.h\" void genqmd(int *neqns, int xadj[], int adjncy[], int perm[], int invp[], int deg[], int marker[], int rchset[], int nbrhd[], int qsize[], int qlink[], int *nofsub);
* PURPOSE
* This routine implements the minimum degree algorithm. It makes use of the implicit representation of the elimination graph by quotient graphs, and the notion of indistinguishable nodes.
* CAUTION
* The adjancy vector adjncy will be destroyed.
* INPUT PARAMETERS
* neqns - number of equations; (xadj, adjncy) - the adjancy structure.
* OUTPUT PARAMETERS
* perm - the minimum degree ordering; invp - the inverse of perm.
* WORKING PARAMETERS
* deg - the degree vector. deg[i] is negative means node i has been numbered; marker - a marker vector, where marker[i] is negative means node i has been merged with another nodeand thus can be ignored; rchset - vector used for the reachable set; nbrhd - vector used for neighborhood set; qsize - vector used to store the size of indistinguishable supernodes; qlink - vector used to store indistinguishable nodes, i, qlink[i], qlink[qlink[i]], ... are the members of the supernode represented by i.
* PROGRAM SUBROUTINES
* qmdrch, qmdqt, qmdupd.
*/
public";
%javamethodmodifiers qmdrch(int *_root, int xadj[], int adjncy[], int deg[], int marker[], int *_rchsze, int rchset[], int *_nhdsze, int nbrhd[]) "
/**
* qmdrch - Quotient MD ReaCHable set .
* SYNOPSIS
* #include \"qmd.h\" void qmdrch(int *root, int xadj[], int adjncy[], int deg[], int marker[], int *rchsze, int rchset[], int *nhdsze, int nbrhd[]);
* PURPOSE
* This subroutine determines the reachable set of a node through a given subset. The adjancy structure is assumed to be stored in a quotient graph format.
* INPUT PARAMETERS
* root - the given node not in the subset; (xadj, adjncy) - the adjancy structure pair; deg - the degree vector. deg[i] < 0 means the node belongs to the given subset.
* OUTPUT PARAMETERS
* (rchsze, rchset) - the reachable set; (nhdsze, nbrhd) - the neighborhood set.
* UPDATED PARAMETERS
* marker - the marker vector for reach and nbrhd sets. > 0 means the node is in reach set. < 0 means the node has been merged with others in the quotient or it is in nbrhd set.
*/
public";
%javamethodmodifiers qmdqt(int *_root, int xadj[], int adjncy[], int marker[], int *_rchsze, int rchset[], int nbrhd[]) "
/**
* qmdqt - Quotient MD Quotient graph Transformation .
* SYNOPSIS
* #include \"qmd.h\" void qmdqt(int *root, int xadj[], int adjncy[], int marker[], int *rchsze, int rchset[], int nbrhd[]);
* PURPOSE
* This subroutine performs the quotient graph transformation after a node has been eliminated.
* INPUT PARAMETERS
* root - the node just eliminated. It becomes the representative of the new supernode; (xadj, adjncy) - the adjancy structure; (rchsze, rchset) - the reachable set of root in the old quotient graph; nbrhd - the neighborhood set which will be merged with root to form the new supernode; marker - the marker vector.
* UPDATED PARAMETERS
* adjncy - becomes the adjncy of the quotient graph.
*/
public";
%javamethodmodifiers qmdupd(int xadj[], int adjncy[], int *_nlist, int list[], int deg[], int qsize[], int qlink[], int marker[], int rchset[], int nbrhd[]) "
/**
* qmdupd - Quotient MD UPDate .
* SYNOPSIS
* #include \"qmd.h\" void qmdupd(int xadj[], int adjncy[], int *nlist, int list[], int deg[], int qsize[], int qlink[], int marker[], int rchset[], int nbrhd[]);
* PURPOSE
* This routine performs degree update for a set of nodes in the minimum degree algorithm.
* INPUT PARAMETERS
* (xadj, adjncy) - the adjancy structure; (nlist, list) - the list of nodes whose degree has to be updated.
* UPDATED PARAMETERS
* deg - the degree vector; qsize - size of indistinguishable supernodes; qlink - linked list for indistinguishable nodes; marker - used to mark those nodes in reach/nbrhd sets.
* WORKING PARAMETERS
* rchset - the reachable set; nbrhd - the neighborhood set.
* PROGRAM SUBROUTINES
* qmdmrg.
*/
public";
%javamethodmodifiers qmdmrg(int xadj[], int adjncy[], int deg[], int qsize[], int qlink[], int marker[], int *_deg0, int *_nhdsze, int nbrhd[], int rchset[], int ovrlp[]) "
/**
* qmdmrg - Quotient MD MeRGe .
* SYNOPSIS
* #include \"qmd.h\" void qmdmrg(int xadj[], int adjncy[], int deg[], int qsize[], int qlink[], int marker[], int *deg0, int *nhdsze, int nbrhd[], int rchset[], int ovrlp[]);
* PURPOSE
* This routine merges indistinguishable nodes in the minimum degree ordering algorithm. It also computes the new degrees of these new supernodes.
* INPUT PARAMETERS
* (xadj, adjncy) - the adjancy structure; deg0 - the number of nodes in the given set; (nhdsze, nbrhd) - the set of eliminated supernodes adjacent to some nodes in the set.
* UPDATED PARAMETERS
* deg - the degree vector; qsize - size of indistinguishable nodes; qlink - linked list for indistinguishable nodes; marker - the given set is given by those nodes with marker value set to 1. Those nodes with degree updated will have marker value set to 2.
* WORKING PARAMETERS
* rchset - the reachable set; ovrlp - temp vector to store the intersection of two reachable sets.
*/
public";
%javamethodmodifiers AMD_valid(Int n_row, Int n_col, const Int Ap[], const Int Ai[]) "
/**
*/
public";
%javamethodmodifiers luf_store_v_cols(LUF *luf, int(*col)(void *info, int j, int ind[], double val[]), void *info, int ind[], double val[]) "
/**
*/
public";
%javamethodmodifiers luf_check_all(LUF *luf, int k) "
/**
*/
public";
%javamethodmodifiers luf_build_v_rows(LUF *luf, int len[]) "
/**
*/
public";
%javamethodmodifiers luf_build_f_rows(LUF *luf, int len[]) "
/**
*/
public";
%javamethodmodifiers luf_build_v_cols(LUF *luf, int updat, int len[]) "
/**
*/
public";
%javamethodmodifiers luf_check_f_rc(LUF *luf) "
/**
*/
public";
%javamethodmodifiers luf_check_v_rc(LUF *luf) "
/**
*/
public";
%javamethodmodifiers luf_f_solve(LUF *luf, double x[]) "
/**
*/
public";
%javamethodmodifiers luf_ft_solve(LUF *luf, double x[]) "
/**
*/
public";
%javamethodmodifiers luf_v_solve(LUF *luf, double b[], double x[]) "
/**
*/
public";
%javamethodmodifiers luf_vt_solve(LUF *luf, double b[], double x[]) "
/**
*/
public";
%javamethodmodifiers luf_vt_solve1(LUF *luf, double e[], double y[]) "
/**
*/
public";
%javamethodmodifiers luf_estimate_norm(LUF *luf, double w1[], double w2[]) "
/**
*/
public";
%javamethodmodifiers glp_print_sol(glp_prob *P, const char *fname) "
/**
*/
public";
%javamethodmodifiers glp_read_sol(glp_prob *lp, const char *fname) "
/**
* glp_read_sol - read basic solution from text file .
* SYNOPSIS
* int glp_read_sol(glp_prob *lp, const char *fname);
* DESCRIPTION
* The routine glp_read_sol reads basic solution from a text file whose name is specified by the parameter fname into the problem object.
* For the file format see description of the routine glp_write_sol.
* RETURNS
* On success the routine returns zero, otherwise non-zero.
*/
public";
%javamethodmodifiers glp_write_sol(glp_prob *lp, const char *fname) "
/**
* glp_write_sol - write basic solution to text file .
* SYNOPSIS
* int glp_write_sol(glp_prob *lp, const char *fname);
* DESCRIPTION
* The routine glp_write_sol writes the current basic solution to a text file whose name is specified by the parameter fname. This file can be read back with the routine glp_read_sol.
* RETURNS
* On success the routine returns zero, otherwise non-zero.
* FILE FORMAT
* The file created by the routine glp_write_sol is a plain text file, which contains the following information:
* m n p_stat d_stat obj_val r_stat[1] r_prim[1] r_dual[1] . . . r_stat[m] r_prim[m] r_dual[m] c_stat[1] c_prim[1] c_dual[1] . . . c_stat[n] c_prim[n] c_dual[n]
* where: m is the number of rows (auxiliary variables); n is the number of columns (structural variables); p_stat is the primal status of the basic solution (GLP_UNDEF = 1, GLP_FEAS = 2, GLP_INFEAS = 3, or GLP_NOFEAS = 4); d_stat is the dual status of the basic solution (GLP_UNDEF = 1, GLP_FEAS = 2, GLP_INFEAS = 3, or GLP_NOFEAS = 4); obj_val is the objective value; r_stat[i], i = 1,...,m, is the status of i-th row (GLP_BS = 1, GLP_NL = 2, GLP_NU = 3, GLP_NF = 4, or GLP_NS = 5); r_prim[i], i = 1,...,m, is the primal value of i-th row; r_dual[i], i = 1,...,m, is the dual value of i-th row; c_stat[j], j = 1,...,n, is the status of j-th column (GLP_BS = 1, GLP_NL = 2, GLP_NU = 3, GLP_NF = 4, or GLP_NS = 5); c_prim[j], j = 1,...,n, is the primal value of j-th column; c_dual[j], j = 1,...,n, is the dual value of j-th column.
*/
public";
%javamethodmodifiers format(char buf[13+1], double x) "
/**
*/
public";
%javamethodmodifiers glp_print_ranges(glp_prob *P, int len, const int list[], int flags, const char *fname) "
/**
*/
public";
%javamethodmodifiers glp_print_ipt(glp_prob *P, const char *fname) "
/**
*/
public";
%javamethodmodifiers glp_read_ipt(glp_prob *lp, const char *fname) "
/**
* glp_read_ipt - read interior-point solution from text file .
* SYNOPSIS
* int glp_read_ipt(glp_prob *lp, const char *fname);
* DESCRIPTION
* The routine glp_read_ipt reads interior-point solution from a text file whose name is specified by the parameter fname into the problem object.
* For the file format see description of the routine glp_write_ipt.
* RETURNS
* On success the routine returns zero, otherwise non-zero.
*/
public";
%javamethodmodifiers glp_write_ipt(glp_prob *lp, const char *fname) "
/**
* glp_write_ipt - write interior-point solution to text file .
* SYNOPSIS
* int glp_write_ipt(glp_prob *lp, const char *fname);
* DESCRIPTION
* The routine glp_write_ipt writes the current interior-point solution to a text file whose name is specified by the parameter fname. This file can be read back with the routine glp_read_ipt.
* RETURNS
* On success the routine returns zero, otherwise non-zero.
* FILE FORMAT
* The file created by the routine glp_write_ipt is a plain text file, which contains the following information:
* m n stat obj_val r_prim[1] r_dual[1] . . . r_prim[m] r_dual[m] c_prim[1] c_dual[1] . . . c_prim[n] c_dual[n]
* where: m is the number of rows (auxiliary variables); n is the number of columns (structural variables); stat is the solution status (GLP_UNDEF = 1 or GLP_OPT = 5); obj_val is the objective value; r_prim[i], i = 1,...,m, is the primal value of i-th row; r_dual[i], i = 1,...,m, is the dual value of i-th row; c_prim[j], j = 1,...,n, is the primal value of j-th column; c_dual[j], j = 1,...,n, is the dual value of j-th column.
*/
public";
%javamethodmodifiers glp_print_mip(glp_prob *P, const char *fname) "
/**
*/
public";
%javamethodmodifiers glp_read_mip(glp_prob *mip, const char *fname) "
/**
* glp_read_mip - read MIP solution from text file .
* SYNOPSIS
* int glp_read_mip(glp_prob *mip, const char *fname);
* DESCRIPTION
* The routine glp_read_mip reads MIP solution from a text file whose name is specified by the parameter fname into the problem object.
* For the file format see description of the routine glp_write_mip.
* RETURNS
* On success the routine returns zero, otherwise non-zero.
*/
public";
%javamethodmodifiers glp_write_mip(glp_prob *mip, const char *fname) "
/**
* glp_write_mip - write MIP solution to text file .
* SYNOPSIS
* int glp_write_mip(glp_prob *mip, const char *fname);
* DESCRIPTION
* The routine glp_write_mip writes the current MIP solution to a text file whose name is specified by the parameter fname. This file can be read back with the routine glp_read_mip.
* RETURNS
* On success the routine returns zero, otherwise non-zero.
* FILE FORMAT
* The file created by the routine glp_write_sol is a plain text file, which contains the following information:
* m n stat obj_val r_val[1] . . . r_val[m] c_val[1] . . . c_val[n]
* where: m is the number of rows (auxiliary variables); n is the number of columns (structural variables); stat is the solution status (GLP_UNDEF = 1, GLP_FEAS = 2, GLP_NOFEAS = 4, or GLP_OPT = 5); obj_val is the objective value; r_val[i], i = 1,...,m, is the value of i-th row; c_val[j], j = 1,...,n, is the value of j-th column.
*/
public";
%javamethodmodifiers mc13d(int n, const int icn[], const int ip[], const int lenr[], int ior[], int ib[], int lowl[], int numb[], int prev[]) "
/**
* mc13d - permutations to block triangular form .
* SYNOPSIS
* #include \"mc13d.h\" int mc13d(int n, const int icn[], const int ip[], const int lenr[], int ior[], int ib[], int lowl[], int numb[], int prev[]);
* DESCRIPTION
* Given the column numbers of the nonzeros in each row of the sparse matrix, the routine mc13d finds a symmetric permutation that makes the matrix block lower triangular.
* INPUT PARAMETERS
* n order of the matrix.
* icn array containing the column indices of the non-zeros. Those belonging to a single row must be contiguous but the ordering of column indices within each row is unimportant and wasted space between rows is permitted.
* ip ip[i], i = 1,2,...,n, is the position in array icn of the first column index of a non-zero in row i.
* lenr lenr[i], i = 1,2,...,n, is the number of non-zeros in row i.
* OUTPUT PARAMETERS
* ior ior[i], i = 1,2,...,n, gives the position on the original ordering of the row or column which is in position i in the permuted form.
* ib ib[i], i = 1,2,...,num, is the row number in the permuted matrix of the beginning of block i, 1 <= num <= n.
* WORKING ARRAYS
* arp working array of length [1+n], where arp[0] is not used. arp[i] is one less than the number of unsearched edges leaving node i. At the end of the algorithm it is set to a permutation which puts the matrix in block lower triangular form.
* ib working array of length [1+n], where ib[0] is not used. ib[i] is the position in the ordering of the start of the ith block. ib[n+1-i] holds the node number of the ith node on the stack.
* lowl working array of length [1+n], where lowl[0] is not used. lowl[i] is the smallest stack position of any node to which a path from node i has been found. It is set to n+1 when node i is removed from the stack.
* numb working array of length [1+n], where numb[0] is not used. numb[i] is the position of node i in the stack if it is on it, is the permuted order of node i for those nodes whose final position has been found and is otherwise zero.
* prev working array of length [1+n], where prev[0] is not used. prev[i] is the node at the end of the path when node i was placed on the stack.
* RETURNS
* The routine mc13d returns num, the number of blocks found.
*/
public";
%javamethodmodifiers glp_mincost_lp(glp_prob *lp, glp_graph *G, int names, int v_rhs, int a_low, int a_cap, int a_cost) "
/**
* glp_mincost_lp - convert minimum cost flow problem to LP .
* SYNOPSIS
* void glp_mincost_lp(glp_prob *lp, glp_graph *G, int names, int v_rhs, int a_low, int a_cap, int a_cost);
* DESCRIPTION
* The routine glp_mincost_lp builds an LP problem, which corresponds to the minimum cost flow problem on the specified network G.
*/
public";
%javamethodmodifiers glp_mincost_okalg(glp_graph *G, int v_rhs, int a_low, int a_cap, int a_cost, double *sol, int a_x, int v_pi) "
/**
*/
public";
%javamethodmodifiers overflow(int u, int v) "
/**
*/
public";
%javamethodmodifiers glp_mincost_relax4(glp_graph *G, int v_rhs, int a_low, int a_cap, int a_cost, int crash, double *sol, int a_x, int a_rc) "
/**
*/
public";
%javamethodmodifiers glp_maxflow_lp(glp_prob *lp, glp_graph *G, int names, int s, int t, int a_cap) "
/**
* glp_maxflow_lp - convert maximum flow problem to LP .
* SYNOPSIS
* void glp_maxflow_lp(glp_prob *lp, glp_graph *G, int names, int s, int t, int a_cap);
* DESCRIPTION
* The routine glp_maxflow_lp builds an LP problem, which corresponds to the maximum flow problem on the specified network G.
*/
public";
%javamethodmodifiers glp_maxflow_ffalg(glp_graph *G, int s, int t, int a_cap, double *sol, int a_x, int v_cut) "
/**
*/
public";
%javamethodmodifiers glp_check_asnprob(glp_graph *G, int v_set) "
/**
* glp_check_asnprob - check correctness of assignment problem data .
* SYNOPSIS
* int glp_check_asnprob(glp_graph *G, int v_set);
* RETURNS
* If the specified assignment problem data are correct, the routine glp_check_asnprob returns zero, otherwise, non-zero.
*/
public";
%javamethodmodifiers glp_asnprob_lp(glp_prob *P, int form, glp_graph *G, int names, int v_set, int a_cost) "
/**
* glp_asnprob_lp - convert assignment problem to LP .
* SYNOPSIS
* int glp_asnprob_lp(glp_prob *P, int form, glp_graph *G, int names, int v_set, int a_cost);
* DESCRIPTION
* The routine glp_asnprob_lp builds an LP problem, which corresponds to the assignment problem on the specified graph G.
* RETURNS
* If the LP problem has been successfully built, the routine returns zero, otherwise, non-zero.
*/
public";
%javamethodmodifiers glp_asnprob_okalg(int form, glp_graph *G, int v_set, int a_cost, double *sol, int a_x) "
/**
*/
public";
%javamethodmodifiers glp_asnprob_hall(glp_graph *G, int v_set, int a_x) "
/**
* glp_asnprob_hall - find bipartite matching of maximum cardinality .
* SYNOPSIS
* int glp_asnprob_hall(glp_graph *G, int v_set, int a_x);
* DESCRIPTION
* The routine glp_asnprob_hall finds a matching of maximal cardinality in the specified bipartite graph G. It uses a version of the Fortran routine MC21A developed by I.S.Duff [1], which implements Hall's algorithm [2].
* RETURNS
* The routine glp_asnprob_hall returns the cardinality of the matching found. However, if the specified graph is incorrect (as detected by the routine glp_check_asnprob), the routine returns negative value.
* REFERENCES
*
I.S.Duff, Algorithm 575: Permutations for zero-free diagonal, ACM Trans. on Math. Softw. 7 (1981), 387-390.M.Hall, \"An Algorithm for distinct representatives,\" Amer. Math. Monthly 63 (1956), 716-717.
*/
public";
%javamethodmodifiers sorting(glp_graph *G, int list[]) "
/**
* glp_cpp - solve critical path problem .
* SYNOPSIS
* double glp_cpp(glp_graph *G, int v_t, int v_es, int v_ls);
* DESCRIPTION
* The routine glp_cpp solves the critical path problem represented in the form of the project network.
* The parameter G is a pointer to the graph object, which specifies the project network. This graph must be acyclic. Multiple arcs are allowed being considered as single arcs.
* The parameter v_t specifies an offset of the field of type double in the vertex data block, which contains time t[i] >= 0 needed to perform corresponding job j. If v_t < 0, it is assumed that t[i] = 1 for all jobs.
* The parameter v_es specifies an offset of the field of type double in the vertex data block, to which the routine stores earliest start time for corresponding job. If v_es < 0, this time is not stored.
* The parameter v_ls specifies an offset of the field of type double in the vertex data block, to which the routine stores latest start time for corresponding job. If v_ls < 0, this time is not stored.
* RETURNS
* The routine glp_cpp returns the minimal project duration, that is, minimal time needed to perform all jobs in the project.
*/
public";
%javamethodmodifiers glp_cpp(glp_graph *G, int v_t, int v_es, int v_ls) "
/**
*/
public";
%javamethodmodifiers AMD_order(Int n, const Int Ap[], const Int Ai[], Int P[], double Control[], double Info[]) "
/**
*/
public";
libglpk-java-1.12.0/swig/Makefile.am 0000644 0001750 0001750 00000011122 13241543247 014066 0000000 0000000 EXTRA_DIST = *.i *.h *.java pom.xml src/site
# copy version-info from glpk package: src/Makefile.am
VERSION_INFO = 43:0:3
all:
mkdir -p target/classes
mkdir -p target/apidocs
mkdir -p src/c
mkdir -p src/main/java/org/gnu/glpk
cp ${srcdir}/*.java src/main/java/org/gnu/glpk
$(SWIG) $(SWIGFLAGS) -java -package org.gnu.glpk \
-o src/c/glpk_wrap.c -outdir src/main/java/org/gnu/glpk \
${srcdir}/glpk.i
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c -fPIC \
src/c/glpk_wrap.c
$(LIBTOOL) --mode=link \
$(CC) -version-info $(VERSION_INFO) -revision $(PACKAGE_VERSION) \
-g -O -o libglpk_java.la -rpath ${prefix}/lib/jni glpk_wrap.lo \
$(LDFLAGS) -lglpk
$(JAVADOC) -locale en_US \
-encoding UTF-8 -charset UTF-8 -docencoding UTF-8 \
-sourcepath ./src/main/java org.gnu.glpk -d ./target/apidocs
$(JAR) cf glpk-java-javadoc.jar -C ./target/apidocs .
$(JAR) cf glpk-java-sources.jar -C ./src/main/java .
$(JAVAC) -source 1.8 -target 1.8 -classpath ./src/main/java \
-d ./target/classes *.java
$(JAR) cf glpk-java.jar -C ./target/classes .
if HAVEMVN
$(MVN) clean package site
endif
clean-local:
rm -f -r src/main src/c target .libs
rm -f *.jar *.o *.la *.lo ../examples/java/*.class
rm -rf target
rm -f *~ ../examples/java/*~ ../w32/*~ ../w64/*~
documentation:
install:
mkdir -p -m 755 $(DESTDIR)${libdir}/jni;true
$(LIBTOOL) --mode=install install -c libglpk_java.la \
$(DESTDIR)${libdir}/jni/libglpk_java.la
$(LIBTOOL) --mode=finish $(DESTDIR)${libdir}/jni
mkdir -p -m 755 $(DESTDIR)${datarootdir}/java;true
install -m 644 glpk-java.jar \
$(DESTDIR)${datarootdir}/java/glpk-java-$(PACKAGE_VERSION).jar
cd $(DESTDIR)${prefix}/share/java/; \
$(LN_S) -f glpk-java-$(PACKAGE_VERSION).jar glpk-java.jar
mkdir -p -m 755 $(DESTDIR)${docdir};true
install -m 644 glpk-java-javadoc.jar \
$(DESTDIR)${docdir}/glpk-java-javadoc-$(PACKAGE_VERSION).jar
cd $(DESTDIR)${docdir}; \
$(LN_S) -f glpk-java-javadoc-$(PACKAGE_VERSION).jar \
glpk-java-javadoc.jar
install -m 644 glpk-java-sources.jar \
$(DESTDIR)${docdir}/glpk-java-sources-$(PACKAGE_VERSION).jar
cd $(DESTDIR)${docdir}; \
$(LN_S) -f glpk-java-sources-$(PACKAGE_VERSION).jar \
glpk-java-sources.jar
check:
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar Gmpl.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. Gmpl marbles.mod
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 -classpath \
../../swig/glpk-java.jar Lp.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. Lp
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 -classpath \
../../swig/glpk-java.jar Mip.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. Mip
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar OutOfMemory.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. OutOfMemory
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar ErrorDemo.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. ErrorDemo
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar LinOrd.java
cd ../examples/java && rm -f tiw56r72.sol && \
java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. LinOrd tiw56r72.mat \
tiw56r72.sol && rm tiw56r72.sol
cd ../examples/java; $(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar MinimumCostFlow.java
cd ../examples/java; rm -f mincost.dimacs mincost.lp && \
java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. MinimumCostFlow && \
rm mincost.dimacs mincost.lp
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar Relax4.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. Relax4 sample.min
check-swing:
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar GmplSwing.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. GmplSwing marbles.mod
dist-hook:
rm -rf `find $(distdir) -name '*~'`
rm -rf `find $(distdir) -name .svn`
rm -rf `find $(distdir) -name '*.bak'`
rm -f ../examples/java/mincost.dimacs ../examples/java/mincost.lp
rm -f ../examples/java/tiw56r72.sol
libglpk-java-1.12.0/swig/GlpkTerminal.java 0000644 0001750 0001750 00000005143 13040662427 015273 0000000 0000000 package org.gnu.glpk;
import java.util.LinkedList;
/**
* This class manages terminal output.
* GLPK will call method {@link #callback(String) callback} before producing
* terminal output. A listener can inhibit the terminal output by returning
* false
in the {@link GlpkTerminalListener#output(String) output}
* routine.
*
The list of listeners is thread local. Each thread has to register its
* own listener.
*
If a {@link GlpkException GlpkExeption} has occured it is necessary to
* call
* GLPK.glp_term_hook(null, null);
* to reenable listening to terminal output.
* @see GlpkTerminalListener
* @see GlpkException
* @see GLPK#glp_term_hook(SWIGTYPE_p_f_p_void_p_q_const__char__int,
* SWIGTYPE_p_void)
*/
public final class GlpkTerminal {
/**
* List of listeners.
*/
private static ThreadLocal> listeners
= new ThreadLocal>() {
@Override
protected LinkedList initialValue() {
return new LinkedList();
}
};
static {
GLPK.glp_term_hook(null, null);
}
/**
* Constructor.
*/
private GlpkTerminal() {
}
/**
* Callback function called by native library.
* Output to the console is created if any of the listeners.get() requests it.
* @param str string to be written to console
* @return 0 if output is requested
*/
public static int callback(final String str) {
boolean output = false;
if (listeners.get().size() > 0) {
for (GlpkTerminalListener listener : listeners.get()) {
output |= listener.output(str);
}
if (output) {
return 0;
} else {
return 1;
}
}
return 0;
}
/**
* Add listener.
* @param listener listener for terminal output
*/
public static void addListener(final GlpkTerminalListener listener) {
listeners.get().add(listener);
}
/**
* Removes first occurance of listener.
* @param listener listener for terminal output
* @return true if listener was found
*/
public static boolean removeListener(final GlpkTerminalListener listener) {
return listeners.get().remove(listener);
}
/**
* Remove all listeners.get().
*/
public static void removeAllListeners() {
while (listeners.get().size() > 0) {
listeners.get().removeLast();
}
}
}
libglpk-java-1.12.0/swig/GlpkTerminalListener.java 0000644 0001750 0001750 00000001610 12103016342 016760 0000000 0000000 package org.gnu.glpk;
/**
* Terminal Listener
* GLPK will call method {@link GlpkTerminal#callback(String)
* GlpkTerminal.output} before producing terminal output. A listener can
* inhibit the terminal output by returning false
in the
* {@link #output(String) output} routine.
*
If a {@link GlpkException GlpkExeption} has occured it is necessary to
* call
* GLPK.glp_term_hook(null, null);
* to reenable listening to terminal output.
* @see GlpkTerminal
* @see GlpkException
* @see GLPK#glp_term_hook(SWIGTYPE_p_f_p_void_p_q_const__char__int,
* SWIGTYPE_p_void)
*/
public interface GlpkTerminalListener {
/**
* Receive terminal output.
* The return value controls, if the mesage is displayed in the
* console.
* @param str output string
* @return true if terminal output is requested
*/
boolean output(String str);
}
libglpk-java-1.12.0/swig/GlpkCallback.java 0000644 0001750 0001750 00000003640 13040662355 015214 0000000 0000000 package org.gnu.glpk;
import java.util.LinkedList;
/**
* This class manages callbacks from the MIP solver.
*
The GLPK MIP solver calls method {@link #callback(long) callback} in
* the branch-and-cut algorithm. A listener to the callback can be used to
* influence the sequence in which nodes of the search tree are evaluated, or
* to supply a heuristic solution. To find out why the callback is issued
* use method {@link GLPK#glp_ios_reason(glp_tree) GLPK.glp_ios_reason}.
*
The list of listeners is thread local. Each thread has to register its
* own listener.
*/
public final class GlpkCallback {
/**
* List of callback listeners.
*/
private static ThreadLocal> listeners
= new ThreadLocal>() {
@Override
protected LinkedList initialValue() {
return new LinkedList();
}
};
/**
* Constructor.
*/
private GlpkCallback() {
}
/**
* Callback method called by native library.
* @param cPtr pointer to search tree
*/
public static void callback(final long cPtr) {
glp_tree tree;
tree = new glp_tree(cPtr, false);
for (GlpkCallbackListener listener : listeners.get()) {
listener.callback(tree);
}
}
/**
* Adds a listener for callbacks.
* @param listener listener for callbacks
*/
public static void addListener(final GlpkCallbackListener listener) {
listeners.get().add(listener);
}
/**
* Removes first occurance of a listener for callbacks.
* @param listener listener for callbacks
* @return true if the listener was found
*/
public static boolean removeListener(final GlpkCallbackListener listener) {
return listeners.get().remove(listener);
}
}
libglpk-java-1.12.0/swig/glpk_java_arrays.i 0000644 0001750 0001750 00000003771 12600043411 015520 0000000 0000000 /* File glpk_java_arrays.i
*
* Handling of arrays.
*/
%define %glp_array_functions(TYPE,NAME)
%typemap (out) TYPE* new_##NAME {
if ($1 == NULL) {
glp_java_throw_outofmemory(jenv, "$name: calloc failed, "
"C-runtime heap is full.");
}
*(TYPE **)&$result = $1;
}
%{
static TYPE *new_##NAME(int nelements) {
return (TYPE *) calloc(nelements,sizeof(TYPE));
}
static void delete_##NAME(TYPE *ary) {
if (ary != NULL) {
free(ary);
}
}
static TYPE NAME##_getitem(TYPE *ary, int index) {
if (ary != NULL) {
return ary[index];
} else {
return (TYPE) 0;
}
}
static void NAME##_setitem(TYPE *ary, int index, TYPE value) {
if (ary != NULL) {
ary[index] = value;
}
}
%}
%javamethodmodifiers new_##NAME(int nelements) "
/**
* Creates a new array of TYPE.
* The memory is allocated with calloc(). To free the memory you will have
* to call delete_NAME.
*
* An OutOfMemoryError error indicates that the C-runtime heap of the process
* (not the Java object heap) is full.
*
* @param nelements number of elements
* @return array
*/
public";
TYPE *new_##NAME(int nelements);
%javamethodmodifiers delete_##NAME(TYPE *ary) "
/**
* Deletes an array of TYPE.
*
The memory is deallocated with free().
*
* @param ary array
*/
public";
void delete_##NAME(TYPE *ary);
%javamethodmodifiers NAME##_getitem(TYPE *ary, int index) "
/**
* Retrieves an element of an array of TYPE.
*
BEWARE: The validity of the index is not checked.
*
* @param ary array
* @param index index of the element
* @return array element
*/
public";
TYPE NAME##_getitem(TYPE *ary, int index);
%javamethodmodifiers NAME##_setitem(TYPE* ary, int index, TYPE value) "
/**
* Sets the value of an element of an array of TYPE.
*
BEWARE: The validity of the index is not checked.
*
* @param ary array
* @param index index of the element
* @param value new value
*/
public";
void NAME##_setitem(TYPE *ary, int index, TYPE value);
%enddef
/* Old Swig versions require a LF after enddef */
libglpk-java-1.12.0/swig/GlpkException.java 0000644 0001750 0001750 00000001232 12103016342 015435 0000000 0000000 package org.gnu.glpk;
/**
* Exception thrown, when the GLPK native library call fails.
*
If an error occurs GLPK will release all internal memory. Hence all
* object references to the library will be invalid.
*
To reenable listening to terminal output call
*
* GLPK.glp_term_hook(null, null);
*
*/
public class GlpkException extends RuntimeException {
/**
* Constructs a new GLPK exception.
*/
public GlpkException() {
super();
}
/**
* Constructs a new GLPK exception.
* @param message detail message
*/
public GlpkException(final String message) {
super(message);
}
}
libglpk-java-1.12.0/swig/Makefile.in 0000644 0001750 0001750 00000040664 13241544157 014115 0000000 0000000 # Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = swig
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAR = @JAR@
JAVAC = @JAVAC@
JAVADOC = @JAVADOC@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MVN = @MVN@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
SWIG = @SWIG@
SWIGFLAGS = @SWIGFLAGS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_cc = @have_cc@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = *.i *.h *.java pom.xml src/site
# copy version-info from glpk package: src/Makefile.am
VERSION_INFO = 43:0:3
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu swig/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu swig/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
clean-local cscopelist-am ctags-am dist-hook distclean \
distclean-generic distclean-libtool distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile
all:
mkdir -p target/classes
mkdir -p target/apidocs
mkdir -p src/c
mkdir -p src/main/java/org/gnu/glpk
cp ${srcdir}/*.java src/main/java/org/gnu/glpk
$(SWIG) $(SWIGFLAGS) -java -package org.gnu.glpk \
-o src/c/glpk_wrap.c -outdir src/main/java/org/gnu/glpk \
${srcdir}/glpk.i
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c -fPIC \
src/c/glpk_wrap.c
$(LIBTOOL) --mode=link \
$(CC) -version-info $(VERSION_INFO) -revision $(PACKAGE_VERSION) \
-g -O -o libglpk_java.la -rpath ${prefix}/lib/jni glpk_wrap.lo \
$(LDFLAGS) -lglpk
$(JAVADOC) -locale en_US \
-encoding UTF-8 -charset UTF-8 -docencoding UTF-8 \
-sourcepath ./src/main/java org.gnu.glpk -d ./target/apidocs
$(JAR) cf glpk-java-javadoc.jar -C ./target/apidocs .
$(JAR) cf glpk-java-sources.jar -C ./src/main/java .
$(JAVAC) -source 1.8 -target 1.8 -classpath ./src/main/java \
-d ./target/classes *.java
$(JAR) cf glpk-java.jar -C ./target/classes .
@HAVEMVN_TRUE@ $(MVN) clean package site
clean-local:
rm -f -r src/main src/c target .libs
rm -f *.jar *.o *.la *.lo ../examples/java/*.class
rm -rf target
rm -f *~ ../examples/java/*~ ../w32/*~ ../w64/*~
documentation:
install:
mkdir -p -m 755 $(DESTDIR)${libdir}/jni;true
$(LIBTOOL) --mode=install install -c libglpk_java.la \
$(DESTDIR)${libdir}/jni/libglpk_java.la
$(LIBTOOL) --mode=finish $(DESTDIR)${libdir}/jni
mkdir -p -m 755 $(DESTDIR)${datarootdir}/java;true
install -m 644 glpk-java.jar \
$(DESTDIR)${datarootdir}/java/glpk-java-$(PACKAGE_VERSION).jar
cd $(DESTDIR)${prefix}/share/java/; \
$(LN_S) -f glpk-java-$(PACKAGE_VERSION).jar glpk-java.jar
mkdir -p -m 755 $(DESTDIR)${docdir};true
install -m 644 glpk-java-javadoc.jar \
$(DESTDIR)${docdir}/glpk-java-javadoc-$(PACKAGE_VERSION).jar
cd $(DESTDIR)${docdir}; \
$(LN_S) -f glpk-java-javadoc-$(PACKAGE_VERSION).jar \
glpk-java-javadoc.jar
install -m 644 glpk-java-sources.jar \
$(DESTDIR)${docdir}/glpk-java-sources-$(PACKAGE_VERSION).jar
cd $(DESTDIR)${docdir}; \
$(LN_S) -f glpk-java-sources-$(PACKAGE_VERSION).jar \
glpk-java-sources.jar
check:
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar Gmpl.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. Gmpl marbles.mod
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 -classpath \
../../swig/glpk-java.jar Lp.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. Lp
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 -classpath \
../../swig/glpk-java.jar Mip.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. Mip
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar OutOfMemory.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. OutOfMemory
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar ErrorDemo.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. ErrorDemo
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar LinOrd.java
cd ../examples/java && rm -f tiw56r72.sol && \
java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. LinOrd tiw56r72.mat \
tiw56r72.sol && rm tiw56r72.sol
cd ../examples/java; $(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar MinimumCostFlow.java
cd ../examples/java; rm -f mincost.dimacs mincost.lp && \
java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. MinimumCostFlow && \
rm mincost.dimacs mincost.lp
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar Relax4.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. Relax4 sample.min
check-swing:
cd ../examples/java;$(JAVAC) -source 1.8 -target 1.8 \
-classpath ../../swig/glpk-java.jar GmplSwing.java
cd ../examples/java;java -Djava.library.path=../../swig/.libs \
-classpath ../../swig/glpk-java.jar:. GmplSwing marbles.mod
dist-hook:
rm -rf `find $(distdir) -name '*~'`
rm -rf `find $(distdir) -name .svn`
rm -rf `find $(distdir) -name '*.bak'`
rm -f ../examples/java/mincost.dimacs ../examples/java/mincost.lp
rm -f ../examples/java/tiw56r72.sol
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
libglpk-java-1.12.0/swig/pom.xml 0000644 0001750 0001750 00000023355 13241543751 013362 0000000 0000000
4.0.0
org.gnu.glpk
glpk-java
1.12.0
3.0
GLPK for Java
Java language binding for GLPK.
http://glpk-java.sourceforge.net
2009
xypron
Heinrich Schuchardt
xypron.glpk@gmx.de
https://www.xypron.de
Java Developer
+1
ISO-8859-1
gpl30
4
65
GNU General Public License, Version 3
http://www.gnu.org/licenses/gpl-3.0.html
scm:svn:http://svn.code.sf.net/p/glpk-java/code
https://sourceforge.net/p/glpk-java/code
org.apache.maven.plugins
maven-compiler-plugin
3.6.1
1.8
1.8
ISO-8859-1
org.apache.maven.plugins
maven-jar-plugin
3.0.2
development
${project.url}
true
org.apache.maven.plugins
maven-javadoc-plugin
2.10.4
<a target="_top" href="${project.url}">${project.name}</a>, ${project.version}
<p>This documentation is part of project <a target="_top" href="${project.url}">${project.name}</a>.</p><table BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><tr><td>Group-ID</td><td>${project.groupId}</td></tr><tr><td>Artifact-ID</td><td>${project.artifactId}</td></tr><tr><td>Version</td><td>${project.version}</td></tr></table>
attach-javadocs
jar
org.apache.maven.plugins
maven-source-plugin
3.0.1
attach-sources
jar-no-fork
org.apache.maven.plugins
maven-site-plugin
3.6
true
org.apache.maven.plugins
maven-project-info-reports-plugin
2.9
org.apache.maven.plugins
maven-clean-plugin
3.0.0
org.apache.maven.plugins
maven-deploy-plugin
2.8.2
org.apache.maven.plugins
maven-install-plugin
2.5.2
org.apache.maven.plugins
maven-resources-plugin
3.0.2
org.apache.maven.plugins
maven-surefire-plugin
2.20
jar
org.apache.maven.plugins
maven-javadoc-plugin
2.8
<a target="_top" href="${project.url}">${project.name}</a>, ${project.version}
<p>This documentation is part of project <a target="_top" href="${project.url}">${project.name}</a>.</p><table BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><tr><td>Group-ID</td><td>${project.groupId}</td></tr><tr><td>Artifact-ID</td><td>${project.artifactId}</td></tr><tr><td>Version</td><td>${project.version}</td></tr></table>
<p><a target="_top" href="http://sourceforge.net/projects/glpk-java"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=264534&type=9" width="80" height="15" border="0" alt="Get GLPK for Java at SourceForge.net."></a></p>
org.apache.maven.plugins
maven-checkstyle-plugin
2.17
org.apache.maven.plugins
maven-changelog-plugin
2.3
single-report
range
60
http://glpk-java.svn.sourceforge.net/viewvc/glpk-java%FILE%?view=markup
changelog
org.codehaus.mojo
clirr-maven-plugin
2.8
1.8.0
org.apache.maven.plugins
maven-jxr-plugin
2.5
org.apache.maven.plugins
maven-pmd-plugin
3.7
1.8
org.codehaus.mojo
jdepend-maven-plugin
2.0
libglpk-java-1.12.0/swig/src/ 0000755 0001750 0001750 00000000000 13241544412 012677 5 0000000 0000000 libglpk-java-1.12.0/swig/src/site/ 0000755 0001750 0001750 00000000000 13125616046 013647 5 0000000 0000000 libglpk-java-1.12.0/swig/src/site/resources/ 0000755 0001750 0001750 00000000000 12324332674 015663 5 0000000 0000000 libglpk-java-1.12.0/swig/src/site/resources/images/ 0000755 0001750 0001750 00000000000 12753424354 017133 5 0000000 0000000 libglpk-java-1.12.0/swig/src/site/resources/images/swimlanes.png 0000644 0001750 0001750 00000226007 12753424354 021572 0000000 0000000 ‰PNG
IHDR P à YKpæ $iCCPicc xÚ••gP“YÇïó<é…@B‡PC‘*%€”Z(Ò«¨@èPElˆ¸+Šˆ4EQ@ÁU)²VD±°((bA7È" ¬W”ôÑyßÙûŸ¹÷üæ?gî=÷œ ‚8X¼´'&¥¼ì˜AÁLðƒÂøi)OO7ðz? åxoø÷"DD¦ñ—âÂÒÊå§Ò€²—X3+=e™/1=<þ+Ÿ]fÁRK|c™£¿ñèלo,úšãëÍ]z
)úÿÿ{ï²T8‚ôبÈl¦OrTzV˜ ’™¶Ü —Ëô$GÅ&DþPð¿Jþ¥Gf§/GnrÊAltL:óÿ5204ßgñÖëk!FÿÿÎgYß½äz س {¾{á• tî @úñwOm©¯”| :îð3™ß<Ôò†@t *кÀ˜K`€ð ¾ ¬| d\°
€"°ìU 4€&Ð
NƒNp\×Ámpƒ'@&À+ ïÁ<AXˆÑ H R‡t #ˆ
YCä
A¡P4”e@¹Ðv¨*…ª :¨ ú:]nBƒÐ#hš†þ†>ÁL‚é°¬ëÃl˜»Â¾ðZ8N…sà|x7\×Ã'àø
|†…ð+xa ʈ.ÂF¸ˆŒD!d3Rˆ”#õH+Òô!÷!2ƒ|DaP4¥‹²D9£üP|T*j3ªU…:Žê@õ¢î¡ÆP"Ô4-ÖA[ yè@t4:]€.G7¢ÛÑ×ÐÃè ô{ÃÀ°0fgL&³SŒ9ˆiÃ\ÆbÆ1³X,V«ƒµÂz`ðéØl%ööv;ý€#â”pF8G\0. —‡+Ç5ã.â†p“¸y¼8^o÷ÀGà7àKð
ønüü~ž A`¬¾„8Â6B¡•p0JxK$UˆæD/b,q+±‚xŠxƒ8FüH¢’´I\R)ƒ´›tŒt™ôˆô–L&kmÉÁätònrù*ùùƒMLOŒ'!¶E¬Z¬ClHì5OQ§p(ë(9”rÊÊÊŒ8^\Cœ+&¾Y¼Züœøˆø¬MÂPÂC"Q¢X¢Yâ¦ÄKÕ :P#¨ùÔ#Ô«ÔqBS¥qi|ÚvZím‚Ž¡³è@IR%%ý%³%«%/H
CƒÁc$0J§Ÿ¤¤8R‘R»¤Z¥†¤æ¤å¤m¥#¥¥Û¤‡¥?É0edâeöÊtÊ<•EÉjËzÉfÉ’½&;#G—³”ãËÊ–{,ËkË{Ëo”?"ß/?« ¨à¤¢P©pUaF‘¡h«§X¦xQqZ‰¦d«T¦tIé%S’Éa&0+˜½L‘²¼²³r†rò€ò¼
KÅO%O¥Må©*A•¥Z¦Ú£*RSRsWËUkQ{¬ŽWg«Ç¨PïSŸÓ`ihìÔèÔ˜bI³x¬VkT“¬i£™ªY¯y_£ÅÖŠ×:¨uWÖ6юѮ־£ë˜êÄêÔ\^a¾"iEýŠ]’.G7S·EwL¡ç¦—§×©÷Z_M?X¯~Ÿþƒƒƒ'†TCÃ<Ãnÿ´øFÕF÷W’W:®Ü²²kåcãHãCÆMh&î&;MzL>›š™
L[M§ÍÔÌBÍjÌFØt¶'»˜}Ãmng¾Åü¼ùGS‹t‹ÓYêZÆ[6[NbŠ\Õ°jÜJÅ*̪ÎJhÍ´µ>l-´Q¶ ³©·yn«jaÛh;ÉÑâÄqNp^ÛØ ìÚíæ¸ÜMÜËöˆ½“}¡ý€ÕÁÏ¡ÊᙣŠc´c‹£ÈÉÄi£Óeg´³«ó^çžÏkâ‰\Ì\6¹ôº’\}\«\Ÿ»i» ܺÝaw÷}ÕW'îô <}O=Yž©ž¿za¼<½ª½^xzçz÷ùÐ|Öû4û¼÷µó-ñ}â§é—á×ãOññoòŸ°(
ên
¼$ÔŒ
önž]ã°fÿš‰“‚kYk³×Þ\'».aÝ…õ”õaëÏ„¢CB›CÂ<ÂêÃfÃyá5á">—€ÿ*Â6¢,b:Ò*²4r2Ê*ª4j*Ú*z_ôtŒMLyÌL,7¶*öMœs\mÜ\¼Gü±øÅ„€„¶D\bhâ¹$jR|Ro²brvò`ŠNJAŠ0Õ"uªHà*hLƒÒÖ¦u¥Ó—>ÅþÍŒc™Ö™Õ™²ü³ÎdKd'e÷oÐÞ°kÃdŽcÎѨü=¹Ê¹ÛrÇ6q6Õm†6‡oîÙ¢º%ËÄV§Ç·¶Åoû-Ï ¯4ïÝö€íÝù
ù[óÇw8íh)+Œì´ÜYûê§ØŸvÜU¹ëKaDá"ƒ¢ò¢…b~ñŸ
®øyqwÔîÓ’C{0{’ö<Øk³÷x©DiNéø>÷}e̲²wû×ï¿Yn\^{€p 〰¢«RrOåBULÕpµ]u[|Í®š¹ƒ‡ÙjU¨-ªýt8öðÃ:§ºŽzúò#˜#™G^4ø7ôemj”m,jü|,é˜ð¸÷ñÞ&³¦¦fùæ’¸%£eúDȉ»'íOvµê¶Öµ1ÚŠNS§^þú˃Ӯ§{ΰϴžU?[ÓNk/ì€:6tˆ:c:…]A]ƒç\Îõt[v·ÿª÷ë±óÊç«/H^(¹H¸˜qñRÎ¥ÙË)—g®D_ïYßóäjàÕû½^½×\¯Ý¸îxýj§ïÒ
«çoZÜïþíáÕÃü< >Œx8õ(áћǙçŸlE>ZþLþYýïZ¿· M…ÆìÇúŸû<2ÎõGÚù/È/Ê'•&›¦Œ¦ÎO;Nß}¹æåÄ«”Wó3JüYóZóõÙ¿lÿêŠ&ÞÞ,þ]üVæí±wÆïzf=gŸ½O|??WøAæÃñì}Ÿ>MÎg-`*>k}îþâúet1qqñ?.¢¼r)Ô• cHRM z&