mpq_read_lp.c File Reference

#include "qs_config.h"
#include "mpq_iqsutil.h"
#include "mpq_read_lp.h"
#include "mpq_lp.h"
#include "mpq_rawlp.h"
#include "mpq_lpdefs.h"
#include "mpq_format.h"

Include dependency graph for mpq_read_lp.c:

Go to the source code of this file.

Defines

#define mpq_END_LINE(p)   (((*p) == '\\' || (*p) == '\n' || (*p) == '\0') ? 1 : 0)

Functions

int mpq_ILLcheck_subject_to (mpq_ILLread_lp_state *state)
int mpq_ILLget_value (char *line, mpq_t *coef)
int mpq_ILLlp_error (mpq_ILLread_lp_state *state, const char *format,...)
void mpq_ILLlp_warn (mpq_ILLread_lp_state *state, const char *format,...)
int mpq_ILLread_lp_state_bad_keyword (mpq_ILLread_lp_state *state)
int mpq_ILLread_lp_state_colon (mpq_ILLread_lp_state *state)
int mpq_ILLread_lp_state_has_colon (mpq_ILLread_lp_state *state)
int mpq_ILLread_lp_state_init (mpq_ILLread_lp_state *state, mpq_qsline_reader *file, const char *mpq_fname, int inter)
int mpq_ILLread_lp_state_keyword (mpq_ILLread_lp_state *state, const char *kwd[])
int mpq_ILLread_lp_state_next_constraint (mpq_ILLread_lp_state *state)
int mpq_ILLread_lp_state_next_field (mpq_ILLread_lp_state *state)
int mpq_ILLread_lp_state_next_field_on_line (mpq_ILLread_lp_state *state)
int mpq_ILLread_lp_state_next_line (mpq_ILLread_lp_state *state)
int mpq_ILLread_lp_state_next_var (mpq_ILLread_lp_state *state)
int mpq_ILLread_lp_state_possible_bound_value (mpq_ILLread_lp_state *state)
int mpq_ILLread_lp_state_possible_coef (mpq_ILLread_lp_state *state, mpq_t *coef, const mpq_t defValue)
void mpq_ILLread_lp_state_prev_field (mpq_ILLread_lp_state *state)
static void mpq_ILLread_lp_state_print_at (mpq_ILLread_lp_state *state)
int mpq_ILLread_lp_state_sense (mpq_ILLread_lp_state *state)
int mpq_ILLread_lp_state_sign (mpq_ILLread_lp_state *state, mpq_t *sign)
int mpq_ILLread_lp_state_skip_blanks (mpq_ILLread_lp_state *state, int wrapLines)
int mpq_ILLread_lp_state_value (mpq_ILLread_lp_state *state, mpq_t *coef)
void mpq_ILLtest_lp_state_bound_sense (mpq_ILLread_lp_state *state)
int mpq_ILLtest_lp_state_keyword (mpq_ILLread_lp_state *state, const char *kwd[])
int mpq_ILLtest_lp_state_next_is (mpq_ILLread_lp_state *state, const char *str)
int mpq_ILLtest_lp_state_sense (mpq_ILLread_lp_state *state, int all)
static void mpq_lp_err (mpq_ILLread_lp_state *state, int isError, const char *format, va_list args)
static int mpq_next_field (mpq_ILLread_lp_state *state, int acrossLines)

Variables

static const char * mpq_all_keyword []
static int mpq_all_keyword_len []
static int TRACE = 0


Define Documentation

#define mpq_END_LINE (  )     (((*p) == '\\' || (*p) == '\n' || (*p) == '\0') ? 1 : 0)

Definition at line 49 of file mpq_read_lp.c.

Referenced by mpq_ILLmps_check_end_of_line(), mpq_ILLmps_next_bound(), mpq_ILLread_lp_state_next_line(), mpq_ILLread_lp_state_possible_bound_value(), mpq_ILLread_lp_state_print_at(), mpq_ILLread_lp_state_sense(), and mpq_ILLread_lp_state_skip_blanks().


Function Documentation

int mpq_ILLcheck_subject_to ( mpq_ILLread_lp_state state  ) 

Definition at line 781 of file mpq_read_lp.c.

References ILL_RESULT, mpq_ILL_ISBLANK, mpq_ILLread_lp_state_bad_keyword(), mpq_ILLread_lp_state_next_field(), mpq_ILLread_lp_state_prev_field(), and mpq_ILLread_lp_state_skip_blanks().

Referenced by mpq_read_constraints().

Here is the call graph for this function:

int mpq_ILLget_value ( char *  line,
mpq_t *  coef 
)

Definition at line 695 of file mpq_read_lp.c.

References ILL_IFTRACE, ILL_namebufsize, and ILL_RESULT.

Referenced by mpq_get_double(), and mpq_ILLread_lp_state_value().

int mpq_ILLlp_error ( mpq_ILLread_lp_state state,
const char *  format,
  ... 
)

Definition at line 668 of file mpq_read_lp.c.

References mpq_lp_err().

Referenced by mpq_add_var(), mpq_del_row_or_col(), mpq_fill_matrix(), mpq_get_row_col_name(), mpq_ILLread_constraint_expr(), mpq_ILLread_constraint_name(), mpq_ILLread_lp(), mpq_ILLread_lp_state_bad_keyword(), mpq_ILLread_lp_state_next_constraint(), mpq_ILLread_lp_state_sense(), mpq_ILLread_one_constraint(), mpq_read_bounds(), mpq_read_colname(), mpq_read_constraints(), mpq_read_integer(), mpq_read_minmax(), mpq_read_objective(), and mpq_read_problem_name().

Here is the call graph for this function:

void mpq_ILLlp_warn ( mpq_ILLread_lp_state state,
const char *  format,
  ... 
)

Definition at line 680 of file mpq_read_lp.c.

References mpq_lp_err(), and NULL.

Referenced by mpq_fill_matrix(), mpq_ILLread_constraint_expr(), mpq_read_bounds(), and mpq_read_objective().

Here is the call graph for this function:

int mpq_ILLread_lp_state_bad_keyword ( mpq_ILLread_lp_state state  ) 

Definition at line 268 of file mpq_read_lp.c.

References mpq_ILLread_lp_state::field, mpq_ILLread_lp_state::fieldOnFirstCol, and mpq_ILLlp_error().

Referenced by mpq_ILLcheck_subject_to(), and mpq_ILLread_lp_state_keyword().

Here is the call graph for this function:

int mpq_ILLread_lp_state_colon ( mpq_ILLread_lp_state state  ) 

Definition at line 311 of file mpq_read_lp.c.

References mpq_ILLread_lp_state_skip_blanks().

Referenced by mpq_ILLread_constraint_name(), and mpq_read_objective().

Here is the call graph for this function:

int mpq_ILLread_lp_state_has_colon ( mpq_ILLread_lp_state state  ) 

Definition at line 322 of file mpq_read_lp.c.

References mpq_ILLread_lp_state_skip_blanks(), and mpq_ILLread_lp_state::p.

Referenced by mpq_ILLread_constraint_name(), and mpq_read_objective().

Here is the call graph for this function:

int mpq_ILLread_lp_state_init ( mpq_ILLread_lp_state state,
mpq_qsline_reader file,
const char *  mpq_fname,
int  inter 
)

Definition at line 64 of file mpq_read_lp.c.

References mpq_ILLread_lp_state::bound_val, mpq_ILLread_lp_state::eof, mpq_ILLread_lp_state::field, mpq_ILLread_lp_state::fieldOnFirstCol, mpq_ILLread_lp_state::file, mpq_ILLread_lp_state::file_name, ILL_FAILtrue, ILL_RETURN, mpq_ILLread_lp_state::line, mpq_ILLread_lp_state::line_num, mpq_ILLread_lp_state_skip_blanks(), mpq_ILLread_lp_state::mpq_interactive, NULL, mpq_ILLread_lp_state::p, and mpq_ILLread_lp_state::realline.

Referenced by mpq_ILLeditor(), and mpq_ILLread_lp().

Here is the call graph for this function:

int mpq_ILLread_lp_state_keyword ( mpq_ILLread_lp_state state,
const char *  kwd[] 
)

Definition at line 299 of file mpq_read_lp.c.

References mpq_ILLread_lp_state::eof, mpq_ILLread_lp_state_bad_keyword(), and mpq_ILLtest_lp_state_keyword().

Here is the call graph for this function:

int mpq_ILLread_lp_state_next_constraint ( mpq_ILLread_lp_state state  ) 

Definition at line 338 of file mpq_read_lp.c.

References mpq_ILLread_lp_state::eof, mpq_ILLread_lp_state::line_num, mpq_all_keyword, mpq_ILLlp_error(), mpq_ILLread_lp_state_next_field(), mpq_ILLread_lp_state_prev_field(), mpq_ILLread_lp_state_skip_blanks(), and mpq_ILLtest_lp_state_keyword().

Referenced by mpq_read_constraints().

Here is the call graph for this function:

int mpq_ILLread_lp_state_next_field ( mpq_ILLread_lp_state state  ) 

Definition at line 196 of file mpq_read_lp.c.

References mpq_next_field().

Referenced by mpq_ILLcheck_subject_to(), mpq_ILLeditor(), mpq_ILLread_lp(), mpq_ILLread_lp_state_next_constraint(), mpq_read_bounds(), mpq_read_constraints(), mpq_read_integer(), and mpq_read_problem_name().

Here is the call graph for this function:

int mpq_ILLread_lp_state_next_field_on_line ( mpq_ILLread_lp_state state  ) 

Definition at line 190 of file mpq_read_lp.c.

References mpq_next_field().

Referenced by mpq_del_row_or_col(), mpq_getCmd(), and mpq_ILLeditor().

Here is the call graph for this function:

int mpq_ILLread_lp_state_next_line ( mpq_ILLread_lp_state state  ) 

Definition at line 89 of file mpq_read_lp.c.

References mpq_ILLread_lp_state::eof, mpq_ILLread_lp_state::field, mpq_ILLread_lp_state::fieldOnFirstCol, mpq_ILLread_lp_state::file, mpq_ILLread_lp_state::file_name, ILL_IFTRACE, ILL_namebufsize, mpq_ILLread_lp_state::line, mpq_ILLread_lp_state::line_num, mpq_END_LINE, mpq_ILL_ISBLANK, mpq_ILLline_reader_get, mpq_ILLread_lp_state::mpq_interactive, NULL, mpq_ILLread_lp_state::p, and mpq_ILLread_lp_state::realline.

Referenced by mpq_add_col(), mpq_ILLeditor(), and mpq_ILLread_lp_state_skip_blanks().

int mpq_ILLread_lp_state_next_var ( mpq_ILLread_lp_state state  ) 

Definition at line 220 of file mpq_read_lp.c.

References mpq_all_keyword, mpq_all_keyword_len, mpq_ILLis_lp_name_char(), mpq_ILLread_lp_state_skip_blanks(), and NULL.

Referenced by mpq_ILLread_constraint_expr(), mpq_ILLread_constraint_name(), mpq_read_colname(), and mpq_read_objective().

Here is the call graph for this function:

int mpq_ILLread_lp_state_possible_bound_value ( mpq_ILLread_lp_state state  ) 

Definition at line 429 of file mpq_read_lp.c.

References mpq_END_LINE, mpq_ILL_MAXDOUBLE, mpq_ILL_MINDOUBLE, mpq_ILLread_lp_state_sign(), mpq_ILLread_lp_state_skip_blanks(), mpq_ILLread_lp_state_value(), and NULL.

Referenced by mpq_read_bounds().

Here is the call graph for this function:

int mpq_ILLread_lp_state_possible_coef ( mpq_ILLread_lp_state state,
mpq_t *  coef,
const mpq_t  defValue 
)

Definition at line 419 of file mpq_read_lp.c.

References mpq_ILLread_lp_state_value().

Referenced by mpq_ILLread_constraint_expr().

Here is the call graph for this function:

void mpq_ILLread_lp_state_prev_field ( mpq_ILLread_lp_state state  ) 

Definition at line 202 of file mpq_read_lp.c.

References mpq_ILLread_lp_state::fieldOnFirstCol, mpq_ILLread_lp_state::line, mpq_ILL_ISBLANK, and mpq_ILLread_lp_state::p.

Referenced by mpq_ILLcheck_subject_to(), mpq_ILLread_lp_state_next_constraint(), mpq_read_colname(), and mpq_read_minmax().

static void mpq_ILLread_lp_state_print_at ( mpq_ILLread_lp_state state  )  [static]

Definition at line 582 of file mpq_read_lp.c.

References mpq_ILLread_lp_state::eof, mpq_END_LINE, mpq_ILL_ISBLANK, and mpq_ILLread_lp_state::p.

Referenced by mpq_lp_err().

int mpq_ILLread_lp_state_sense ( mpq_ILLread_lp_state state  ) 

Definition at line 554 of file mpq_read_lp.c.

References mpq_END_LINE, mpq_ILLlp_error(), and mpq_ILLtest_lp_state_sense().

Referenced by mpq_ILLread_one_constraint().

Here is the call graph for this function:

int mpq_ILLread_lp_state_sign ( mpq_ILLread_lp_state state,
mpq_t *  sign 
)

Definition at line 363 of file mpq_read_lp.c.

References mpq_ILLread_lp_state_skip_blanks().

Referenced by mpq_ILLread_constraint_expr(), and mpq_ILLread_lp_state_possible_bound_value().

Here is the call graph for this function:

int mpq_ILLread_lp_state_skip_blanks ( mpq_ILLread_lp_state state,
int  wrapLines 
)

Definition at line 141 of file mpq_read_lp.c.

References mpq_END_LINE, mpq_ILL_ISBLANK, mpq_ILLread_lp_state_next_line(), and mpq_ILLread_lp_state::p.

Referenced by mpq_ILLcheck_subject_to(), mpq_ILLread_lp_state_colon(), mpq_ILLread_lp_state_has_colon(), mpq_ILLread_lp_state_init(), mpq_ILLread_lp_state_next_constraint(), mpq_ILLread_lp_state_next_var(), mpq_ILLread_lp_state_possible_bound_value(), mpq_ILLread_lp_state_sign(), mpq_ILLread_lp_state_value(), mpq_ILLtest_lp_state_next_is(), mpq_ILLtest_lp_state_sense(), mpq_lp_err(), mpq_next_field(), and mpq_read_objective().

Here is the call graph for this function:

int mpq_ILLread_lp_state_value ( mpq_ILLread_lp_state state,
mpq_t *  coef 
)

Definition at line 396 of file mpq_read_lp.c.

References ILL_RESULT, mpq_ILLget_value(), and mpq_ILLread_lp_state_skip_blanks().

Referenced by mpq_add_col(), mpq_ILLread_lp_state_possible_bound_value(), mpq_ILLread_lp_state_possible_coef(), and mpq_ILLread_one_constraint().

Here is the call graph for this function:

void mpq_ILLtest_lp_state_bound_sense ( mpq_ILLread_lp_state state  ) 

Definition at line 548 of file mpq_read_lp.c.

References mpq_ILLtest_lp_state_sense().

Referenced by mpq_read_bounds().

Here is the call graph for this function:

int mpq_ILLtest_lp_state_keyword ( mpq_ILLread_lp_state state,
const char *  kwd[] 
)

Definition at line 280 of file mpq_read_lp.c.

References mpq_ILLread_lp_state::eof, mpq_ILLread_lp_state::field, mpq_ILLread_lp_state::fieldOnFirstCol, and NULL.

Referenced by mpq_ILLread_lp_state_keyword(), and mpq_ILLread_lp_state_next_constraint().

int mpq_ILLtest_lp_state_next_is ( mpq_ILLread_lp_state state,
const char *  str 
)

Definition at line 383 of file mpq_read_lp.c.

References mpq_ILLread_lp_state_skip_blanks(), and mpq_ILLread_lp_state::p.

Referenced by mpq_read_bounds().

Here is the call graph for this function:

int mpq_ILLtest_lp_state_sense ( mpq_ILLread_lp_state state,
int  all 
)

Definition at line 487 of file mpq_read_lp.c.

References mpq_ILLread_lp_state_skip_blanks(), and mpq_ILLread_lp_state::sense_val.

Referenced by mpq_ILLread_lp_state_sense(), and mpq_ILLtest_lp_state_bound_sense().

Here is the call graph for this function:

static void mpq_lp_err ( mpq_ILLread_lp_state state,
int  isError,
const char *  format,
va_list  args 
) [static]

Definition at line 614 of file mpq_read_lp.c.

References mpq_qsline_reader::error_collector, mpq_ILLread_lp_state::file, mpq_ILLread_lp_state::file_name, ILL_FAILfalse, mpq_ILLread_lp_state::line, mpq_ILLread_lp_state::line_num, mpq_ILLformat_error, mpq_ILLformat_error_create(), mpq_ILLformat_error_delete(), mpq_ILLread_lp_state_print_at(), mpq_ILLread_lp_state_skip_blanks(), mpq_ILLread_lp_state::mpq_interactive, NULL, mpq_ILLread_lp_state::p, QS_LP_FORMAT_ERROR, QS_LP_FORMAT_WARN, and mpq_ILLread_lp_state::realline.

Referenced by mpq_ILLlp_error(), and mpq_ILLlp_warn().

Here is the call graph for this function:

static int mpq_next_field ( mpq_ILLread_lp_state state,
int  acrossLines 
) [static]

Definition at line 172 of file mpq_read_lp.c.

References mpq_ILLread_lp_state_skip_blanks().

Referenced by mpq_ILLread_lp_state_next_field(), and mpq_ILLread_lp_state_next_field_on_line().

Here is the call graph for this function:


Variable Documentation

const char* mpq_all_keyword[] [static]

Initial value:

 {
  "MIN", "MINIMUM", "MINIMIZE",
  "MAX", "MAXIMUM", "MAXIMIZE",
  "SUBJECT", "ST", "PROBLEM", "PROB",
  "BOUNDS", "BOUND", "INTEGER", "END", NULL
}

Definition at line 51 of file mpq_read_lp.c.

Referenced by mpq_ILLread_lp_state_next_constraint(), and mpq_ILLread_lp_state_next_var().

int mpq_all_keyword_len[] [static]

Initial value:

 {
  3, 7, 8,
  3, 7, 8,
  7, 2, 7, 4,
  6, 5, 7, 3, -1
}

Definition at line 57 of file mpq_read_lp.c.

Referenced by mpq_ILLread_lp_state_next_var().

int TRACE = 0 [static]

Definition at line 47 of file mpq_read_lp.c.


Generated on Thu Mar 29 09:44:57 2012 for QSopt_ex by  doxygen 1.4.7