MPSolve 3.2.1
|
Generic input-output functions inside MPSolve. More...
Go to the source code of this file.
Functions | |
MPS_BEGIN_DECLS void | mps_readroots (mps_context *s) |
Read the approximations from the file opened in the rtstr member of the mps_context. More... | |
void | mps_countroots (mps_context *s) |
Count the roots that are included in the search set, excluded form it, or have an undetermined inclusion state. More... | |
void | mps_outroot (mps_context *s, int i, int num) |
Print an approximation to stdout (or whatever the output stream currently selected in the mps_context is). More... | |
void | mps_output (mps_context *s) |
Print the approximations to stdout (or whatever the output stream currently selected in the mps_context is). More... | |
void | mps_copy_roots (mps_context *s) |
Update the MP version of the roots to the latest and greatest approximations. More... | |
void | mps_dump_status (mps_context *s, FILE *outstr) |
Dump status of all the root approximations. | |
void | mps_dump (mps_context *s) |
Dump all the current approximation to the logstr selected in the current mps_context. More... | |
void | mps_dump_cluster_structure (mps_context *s, FILE *outstr) |
Dump cluster structure to outstr . More... | |
mps_boolean | mps_is_a_tty (FILE *stream) |
Check if the file descriptor associated to stream is bounded to a tty. More... | |
void | mps_warn (mps_context *st, char *format,...) |
Print a warning to the user. More... | |
void | mps_error (mps_context *st, const char *format,...) |
Record an error happened during the computation. This will set the internal status error to on, and the actual errors will printed with the first call to mps_print_errors(). More... | |
void | mps_print_errors (mps_context *s) |
Print all the errors that have been recorded up to now. This function should be called only if mps_context_has_errors() returns true. More... | |
void | mps_skip_comments (FILE *input_stream) |
void | mps_raise_parsing_error (mps_context *s, mps_input_buffer *buffer, const char *token, const char *message,...) |
mps_input_option | mps_parse_option_line (mps_context *s, char *line, size_t length) |
Parse a line of the input stream that contains the character ';', so should be considered an option line. More... | |
mps_polynomial * | mps_monomial_poly_read_from_stream_v2 (mps_context *s, mps_input_buffer *buffer) |
Parse the stream that has been loaded into buffer and that describe a mps_monomial_poly. This function parse polynomials described in the format of MPSolve 2.2. More... | |
mps_polynomial * | mps_monomial_yacc_parser (mps_context *ctx, mps_abstract_input_stream *stream) |
Generic input-output functions inside MPSolve.
void mps_copy_roots | ( | mps_context * | s | ) |
Update the MP version of the roots to the latest and greatest approximations.
s | A pointer to the current mps_context. |
void mps_countroots | ( | mps_context * | s | ) |
Count the roots that are included in the search set, excluded form it, or have an undetermined inclusion state.
s | A pointer to the current mps_context. |
void mps_dump | ( | mps_context * | s | ) |
Dump all the current approximation to the logstr selected in the current mps_context.
s | A pointer to the current mps_context. |
This function is tipically used when encountering some errors.
void mps_dump_cluster_structure | ( | mps_context * | s, |
FILE * | outstr | ||
) |
Dump cluster structure to outstr
.
s | the mps_context struct pointer. |
outstr | The output stream where the cluster structure will be dumped. |
void mps_error | ( | mps_context * | s, |
const char * | format, | ||
... | |||
) |
Record an error happened during the computation. This will set the internal status error to on, and the actual errors will printed with the first call to mps_print_errors().
s | A pointer to the current mps_context. |
mps_boolean mps_is_a_tty | ( | FILE * | stream | ) |
Check if the file descriptor associated to stream is bounded to a tty.
stream | the stream to check |
mps_polynomial * mps_monomial_poly_read_from_stream_v2 | ( | mps_context * | s, |
mps_input_buffer * | buffer | ||
) |
Parse the stream that has been loaded into buffer and that describe a mps_monomial_poly. This function parse polynomials described in the format of MPSolve 2.2.
s | The current mps_context |
buffer | The buffer that needs to be parsed |
The | structure of the polynomial |
The | density configuration of the polynomial. |
void mps_output | ( | mps_context * | s | ) |
Print the approximations to stdout (or whatever the output stream currently selected in the mps_context is).
s | A pointer to the current mps_context. |
void mps_outroot | ( | mps_context * | s, |
int | i, | ||
int | num | ||
) |
Print an approximation to stdout (or whatever the output stream currently selected in the mps_context is).
s | A pointer to the current mps_context. |
i | The index of the approxiomation that shall be printed. |
num | The number of zero roots. |
mps_input_option mps_parse_option_line | ( | mps_context * | s, |
char * | line, | ||
size_t | length | ||
) |
Parse a line of the input stream that contains the character ';', so should be considered an option line.
Valid options, recognized at the moment being are:
void mps_print_errors | ( | mps_context * | s | ) |
Print all the errors that have been recorded up to now. This function should be called only if mps_context_has_errors() returns true.
s | A pointer to the current mps_context. |
MPS_BEGIN_DECLS void mps_readroots | ( | mps_context * | s | ) |
Read the approximations from the file opened in the rtstr member of the mps_context.
s | A pointer to the current mps_context. |
NOTE: This function is not used anywhere in the code, atm.
void mps_warn | ( | mps_context * | st, |
char * | format, | ||
... | |||
) |
Print a warning to the user.
st | The current mps_context |
format | The printf-like format for the data to print |