float128_editor.c File Reference

#include "qs_config.h"
#include "float128_qsopt.h"
#include "float128_lpdata.h"
#include "float128_qstruct.h"
#include "float128_editor.h"
#include "float128_readline.h"
#include "float128_rawlp.h"
#include "stddefs.h"
#include "float128_read_lp.h"
#include "float128_lp.h"
#include "float128_lib.h"

Include dependency graph for float128_editor.c:

Go to the source code of this file.

Defines

#define float128_ADD   10
#define float128_COL   2
#define float128_DEL   8
#define float128_DUAL   12
#define float128_HELP   7
#define float128_ILL_BREAK_BODY   goto CLEANUP
#define float128_ILL_BREAK_BODY_IF(rval)   if (rval != 0) goto CLEANUP
#define float128_NCOMMAND   13
#define float128_NEW   9
#define float128_NONE   -1
#define float128_PLP   3
#define float128_PMPS   6
#define float128_PRIMAL   11
#define float128_PRTX   4
#define float128_QS_EXIT   0
#define float128_ROW   1
#define float128_SOLVE   5

Functions

static void float128_add_col (float128_QSdata *p, float128_rawlpdata *lp, float128_ILLread_lp_state *state)
static void float128_add_row (float128_QSdata *p, float128_rawlpdata *lp, float128_ILLread_lp_state *state)
static void float128_del_col (float128_QSdata *p, float128_rawlpdata *lp, float128_ILLread_lp_state *state)
static void float128_del_row (float128_QSdata *p, float128_rawlpdata *lp, float128_ILLread_lp_state *state)
static int float128_del_row_or_col (float128_QSdata *p, float128_rawlpdata *lp, float128_ILLread_lp_state *state, int isRow)
static int float128_fill_matrix (float128_rawlpdata *lp, float128_ILLread_lp_state *state, float128_ILLmatrix *m, float128 *obj, int n)
static char * float128_get_row_col_name (float128_QSdata *p, float128_rawlpdata *lp, float128_ILLread_lp_state *state, int doRow)
static void float128_getCmd (float128_ILLread_lp_state *state, int *cmd, int *subcmd)
void float128_ILLeditor (float128_QSdata *p)
static void float128_ILLeditor_help (void)
static void float128_ILLeditor_help_cmd (int cmd, int subcmd)
void float128_ILLeditor_init (void)
int float128_ILLeditor_solve (float128_QSdata *p, int salgo)
static int float128_pull_info_from_p (float128_QSdata *p, float128_rawlpdata *lp)
static int float128_transpose (float128_rawlpdata *lp)

Variables

static const char * float128_commands [float128_NCOMMAND+1]
static char float128_hasSubCmd [float128_NCOMMAND+1]
static int TRACE = 0


Define Documentation

#define float128_ADD   10

Definition at line 67 of file float128_editor.c.

Referenced by float128_ILLeditor(), float128_ILLeditor_help(), float128_ILLeditor_help_cmd(), and float128_ILLeditor_init().

#define float128_COL   2

Definition at line 59 of file float128_editor.c.

Referenced by float128_getCmd(), float128_ILLeditor(), float128_ILLeditor_help(), float128_ILLeditor_help_cmd(), and float128_ILLeditor_init().

#define float128_DEL   8

Definition at line 65 of file float128_editor.c.

Referenced by float128_ILLeditor(), float128_ILLeditor_help(), float128_ILLeditor_help_cmd(), and float128_ILLeditor_init().

#define float128_DUAL   12

Definition at line 69 of file float128_editor.c.

Referenced by float128_ILLeditor(), and float128_ILLeditor_init().

#define float128_HELP   7

Definition at line 64 of file float128_editor.c.

Referenced by float128_ILLeditor_help(), float128_ILLeditor_help_cmd(), and float128_ILLeditor_init().

#define float128_ILL_BREAK_BODY   goto CLEANUP

Definition at line 44 of file float128_editor.c.

Referenced by float128_ILLeditor().

#define float128_ILL_BREAK_BODY_IF ( rval   )     if (rval != 0) goto CLEANUP

Definition at line 43 of file float128_editor.c.

Referenced by float128_add_col(), float128_add_row(), float128_del_row_or_col(), float128_get_row_col_name(), float128_ILLeditor(), float128_ILLeditor_solve(), and float128_pull_info_from_p().

#define float128_NCOMMAND   13

Definition at line 70 of file float128_editor.c.

Referenced by float128_ILLeditor_init().

#define float128_NEW   9

Definition at line 66 of file float128_editor.c.

Referenced by float128_ILLeditor_init().

#define float128_NONE   -1

Definition at line 56 of file float128_editor.c.

Referenced by float128_ILLeditor(), and float128_ILLeditor_help().

#define float128_PLP   3

Definition at line 60 of file float128_editor.c.

Referenced by float128_ILLeditor(), float128_ILLeditor_help(), float128_ILLeditor_help_cmd(), and float128_ILLeditor_init().

#define float128_PMPS   6

Definition at line 63 of file float128_editor.c.

Referenced by float128_ILLeditor(), float128_ILLeditor_help(), float128_ILLeditor_help_cmd(), and float128_ILLeditor_init().

#define float128_PRIMAL   11

Definition at line 68 of file float128_editor.c.

Referenced by float128_ILLeditor(), and float128_ILLeditor_init().

#define float128_PRTX   4

Definition at line 61 of file float128_editor.c.

Referenced by float128_ILLeditor(), float128_ILLeditor_help(), float128_ILLeditor_help_cmd(), and float128_ILLeditor_init().

#define float128_QS_EXIT   0

Definition at line 57 of file float128_editor.c.

Referenced by float128_ILLeditor(), float128_ILLeditor_help(), float128_ILLeditor_help_cmd(), and float128_ILLeditor_init().

#define float128_ROW   1

Definition at line 58 of file float128_editor.c.

Referenced by float128_getCmd(), float128_ILLeditor(), float128_ILLeditor_help(), float128_ILLeditor_help_cmd(), and float128_ILLeditor_init().

#define float128_SOLVE   5

Definition at line 62 of file float128_editor.c.

Referenced by float128_getCmd(), float128_ILLeditor(), float128_ILLeditor_help(), float128_ILLeditor_help_cmd(), and float128_ILLeditor_init().


Function Documentation

static void float128_add_col ( float128_QSdata p,
float128_rawlpdata lp,
float128_ILLread_lp_state state 
) [static]

Definition at line 594 of file float128_editor.c.

References float128_fill_matrix(), float128_get_row_col_name(), float128_ILL_BREAK_BODY_IF, float128_ILLmatrix_free(), float128_ILLmatrix_init(), float128_ILLraw_clear_matrix(), float128_ILLread_lp_state_next_line(), float128_ILLread_lp_state_value(), float128_ILLread_one_constraint(), float128_QSadd_cols(), float128_transpose(), ILL_FAILfalse, ILL_IFFREE, ILL_IFTRACE, ILLsymboltab_delete(), float128_ILLmatrix::matbeg, float128_ILLmatrix::matcnt, float128_ILLmatrix::matind, float128_ILLmatrix::matval, float128_rawlpdata::ncols, float128_rawlpdata::nrows, NULL, and float128_rawlpdata::rowtab.

Referenced by float128_ILLeditor(), and float128_read_mps_line_in_section().

Here is the call graph for this function:

static void float128_add_row ( float128_QSdata p,
float128_rawlpdata lp,
float128_ILLread_lp_state state 
) [static]

Definition at line 535 of file float128_editor.c.

References float128_fill_matrix(), float128_get_row_col_name(), float128_ILL_BREAK_BODY_IF, float128_ILLmatrix_free(), float128_ILLmatrix_init(), float128_ILLraw_clear_matrix(), float128_ILLread_one_constraint(), float128_QSadd_rows(), ILL_FAILfalse, ILL_IFFREE, ILL_IFTRACE, ILLsymboltab_delete(), float128_ILLmatrix::matbeg, float128_ILLmatrix::matcnt, float128_ILLmatrix::matind, float128_ILLmatrix::matval, float128_rawlpdata::nrows, NULL, float128_rawlpdata::rhs, float128_rawlpdata::rowsense, and float128_rawlpdata::rowtab.

Referenced by float128_ILLeditor(), and float128_read_mps_line_in_section().

Here is the call graph for this function:

static void float128_del_col ( float128_QSdata p,
float128_rawlpdata lp,
float128_ILLread_lp_state state 
) [static]

Definition at line 769 of file float128_editor.c.

References float128_del_row_or_col(), and float128_rawlpdata::ncols.

Referenced by float128_ILLeditor().

Here is the call graph for this function:

static void float128_del_row ( float128_QSdata p,
float128_rawlpdata lp,
float128_ILLread_lp_state state 
) [static]

Definition at line 756 of file float128_editor.c.

References float128_del_row_or_col(), and float128_rawlpdata::nrows.

Referenced by float128_ILLeditor().

Here is the call graph for this function:

static int float128_del_row_or_col ( float128_QSdata p,
float128_rawlpdata lp,
float128_ILLread_lp_state state,
int  isRow 
) [static]

Definition at line 724 of file float128_editor.c.

References float128_ILLlpdata::colnames, float128_rawlpdata::coltab, float128_ILLread_lp_state::field, float128_ILL_BREAK_BODY_IF, float128_ILLlp_error(), float128_ILLread_lp_state_next_field_on_line(), float128_ILLutil_array_index(), float128_QSdelete_cols(), float128_QSdelete_rows(), ILL_RESULT, ILLsymboltab_delete(), float128_ILLlpdata::nrows, float128_ILLlpdata::nstruct, float128_qsdata::qslp, float128_ILLlpdata::rownames, and float128_rawlpdata::rowtab.

Referenced by float128_del_col(), and float128_del_row().

Here is the call graph for this function:

static int float128_fill_matrix ( float128_rawlpdata lp,
float128_ILLread_lp_state state,
float128_ILLmatrix m,
float128 *  obj,
int  n 
) [static]

Definition at line 468 of file float128_editor.c.

References float128_colptr::coef, float128_rawlpdata::cols, float128_ILLlp_error(), float128_ILLlp_warn(), float128_ILLraw_colname(), ILL_FAILfalse, ILL_RESULT, ILL_SAFE_MALLOC, float128_ILLmatrix::matbeg, float128_ILLmatrix::matcnt, float128_ILLmatrix::matcols, float128_ILLmatrix::matind, float128_ILLmatrix::matrows, float128_ILLmatrix::matsize, float128_ILLmatrix::matval, float128_rawlpdata::ncols, float128_colptr::next, float128_rawlpdata::nrows, NULL, and float128_colptr::this_val.

Referenced by float128_add_col(), and float128_add_row().

Here is the call graph for this function:

static char* float128_get_row_col_name ( float128_QSdata p,
float128_rawlpdata lp,
float128_ILLread_lp_state state,
int  doRow 
) [static]

Definition at line 429 of file float128_editor.c.

References float128_rawlpdata::coltab, float128_ILL_BREAK_BODY_IF, float128_ILLlib_findName(), float128_ILLlp_error(), float128_ILLread_constraint_name(), ILL_IFFREE, ILL_namebufsize, ILLsymboltab_lookup(), float128_rawlpdata::ncols, float128_rawlpdata::nrows, NULL, float128_qsdata::qslp, and float128_rawlpdata::rowtab.

Referenced by float128_add_col(), and float128_add_row().

Here is the call graph for this function:

static void float128_getCmd ( float128_ILLread_lp_state state,
int *  cmd,
int *  subcmd 
) [static]

Definition at line 165 of file float128_editor.c.

References float128_ILLread_lp_state::field, float128_COL, float128_commands, float128_hasSubCmd, float128_ILLread_lp_state_next_field_on_line(), float128_ILLutil_index(), float128_ROW, float128_SOLVE, and ILL_IFTRACE.

Referenced by float128_ILLeditor().

Here is the call graph for this function:

void float128_ILLeditor ( float128_QSdata p  ) 

Definition at line 188 of file float128_editor.c.

References DUAL_SIMPLEX, float128_ADD, float128_add_col(), float128_add_row(), float128_COL, float128_DEL, float128_del_col(), float128_del_row(), float128_DUAL, float128_getCmd(), float128_ILL_BREAK_BODY, float128_ILL_BREAK_BODY_IF, float128_ILLeditor_help(), float128_ILLeditor_solve(), float128_ILLfree_rawlpdata(), float128_ILLlib_print_x(), float128_ILLline_reader_free(), float128_ILLline_reader_new(), float128_ILLread_lp_state_init(), float128_ILLread_lp_state_next_field(), float128_ILLread_lp_state_next_field_on_line(), float128_ILLread_lp_state_next_line(), float128_NONE, float128_PLP, float128_PMPS, float128_PRIMAL, float128_PRTX, float128_pull_info_from_p(), float128_QS_EXIT, float128_QSwrite_prob(), float128_QSwrite_prob_file(), float128_ROW, float128_SOLVE, ILL_IFTRACE, float128_qsdata::lp, and PRIMAL_SIMPLEX.

Referenced by float128_solver_main().

Here is the call graph for this function:

static void float128_ILLeditor_help ( void   )  [static]

Definition at line 112 of file float128_editor.c.

References float128_ADD, float128_COL, float128_DEL, float128_HELP, float128_ILLeditor_help_cmd(), float128_NONE, float128_PLP, float128_PMPS, float128_PRTX, float128_QS_EXIT, float128_ROW, and float128_SOLVE.

Referenced by float128_ILLeditor().

Here is the call graph for this function:

static void float128_ILLeditor_help_cmd ( int  cmd,
int  subcmd 
) [static]

Definition at line 128 of file float128_editor.c.

References float128_ADD, float128_COL, float128_commands, float128_DEL, float128_HELP, float128_PLP, float128_PMPS, float128_PRTX, float128_QS_EXIT, float128_ROW, and float128_SOLVE.

Referenced by float128_ILLeditor_help().

void float128_ILLeditor_init ( void   ) 

Definition at line 74 of file float128_editor.c.

References float128_ADD, float128_COL, float128_commands, float128_DEL, float128_DUAL, float128_hasSubCmd, float128_HELP, float128_NCOMMAND, float128_NEW, float128_PLP, float128_PMPS, float128_PRIMAL, float128_PRTX, float128_QS_EXIT, float128_ROW, float128_SOLVE, and NULL.

Referenced by float128_solver_main().

int float128_ILLeditor_solve ( float128_QSdata p,
int  salgo 
)

Definition at line 324 of file float128_editor.c.

References float128_ILL_BREAK_BODY_IF, float128_QSget_objval(), float128_QSopt_dual(), float128_QSopt_primal(), ILL_RESULT, PRIMAL_SIMPLEX, and float128_qsdata::simplex_display.

Referenced by float128_ILLeditor(), and float128_solver_main().

Here is the call graph for this function:

static int float128_pull_info_from_p ( float128_QSdata p,
float128_rawlpdata lp 
) [static]

Definition at line 357 of file float128_editor.c.

References float128_ILLlpdata::colnames, float128_rawlpdata::coltab, float128_ILL_BREAK_BODY_IF, float128_ILLinit_rawlpdata(), float128_ILLraw_add_col(), float128_ILLraw_add_row(), ILL_FAILfalse, ILL_RETURN, ILLsymboltab_create(), float128_ILLlpdata::intmarker, float128_qsdata::lp, float128_ILLlpdata::nrows, float128_ILLlpdata::nstruct, NULL, float128_lpinfo::O, float128_ILLlpdata::objname, float128_ILLlpdata::rhs, float128_ILLlpdata::rownames, float128_rawlpdata::rowtab, and float128_ILLlpdata::sense.

Referenced by float128_ILLeditor().

Here is the call graph for this function:

static int float128_transpose ( float128_rawlpdata lp  )  [static]

Definition at line 391 of file float128_editor.c.

References float128_rawlpdata::coltab, ILL_RETURN, float128_rawlpdata::ncols, float128_rawlpdata::nrows, QSMAX, float128_rawlpdata::rhs, float128_rawlpdata::rhssize, float128_rawlpdata::rowsense, float128_rawlpdata::rowtab, and float128_rawlpdata::sensesize.

Referenced by float128_add_col().


Variable Documentation

const char* float128_commands[float128_NCOMMAND+1] [static]

Definition at line 71 of file float128_editor.c.

Referenced by float128_getCmd(), float128_ILLeditor_help_cmd(), and float128_ILLeditor_init().

char float128_hasSubCmd[float128_NCOMMAND+1] [static]

Definition at line 72 of file float128_editor.c.

Referenced by float128_getCmd(), and float128_ILLeditor_init().

int TRACE = 0 [static]

Definition at line 41 of file float128_editor.c.


Generated on Thu Mar 29 09:35:45 2012 for QSopt_ex by  doxygen 1.4.7