MPSolve 3.2.1
Loading...
Searching...
No Matches
mps_context Struct Reference

this struct holds the state of the mps computation More...

#include <context.h>

Public Attributes

mps_boolean error_state
 true if an error has occurred during the computation.
 
char * last_error
 The text describing the last error occurred.
 
mps_thread_poolself_thread_pool
 This value is non NULL if mpsolve is launched via mps_mpsolve_async() and in that case holds a pointer to the thread pool used to manage asynchronous callbacks. More...
 
mps_boolean resume
 true if we are trying to resume previously interrupted. More...
 
mps_boolean chkrad
 True if check of radius should be performed at the end of the algorithm. More...
 
mps_callback callback
 Callback called when the async version of mps_mpsolve(), i.e. terminate the computation.
 
void * user_data
 Pointer to user_data passed to the callback.
 
mps_operation operation
 The operation running now. Can be used to debug what's happening event if mpsolve was launched without debug enabled.
 
mps_boolean initialized
 This value is true if the data for the computation has been allocated by calling mps_allocate_data(). It is used by mps_free_data() to know what has to be freed.
 
mps_debug_level debug_level
 Bytes containing the flags of debug enabled.
 
mps_boolean over_max
 True if the computation has reached the maximum allowed precision.
 
mps_input_configurationinput_config
 Configuration of the input of MPSolve.
 
mps_output_configurationoutput_config
 Output configuration for MPSolve.
 
int newtis
 Newton isolation of the cluster.
 
int newtis_old
 Old value for the newton isolation of the cluster.
 
mps_boolean DOLOG
 true if log are needed. They will be written to logstr More...
 
mps_boolean DOWARN
 true if warning are needed.
 
mps_boolean DOSORT
 true if root sorting is desired. It will be performed with routines in mps_sort.c.
 
FILE * instr
 Default input stream.
 
FILE * outstr
 Default output stream.
 
FILE * logstr
 Default log stream.
 
FILE * rtstr
 Stream used to resume an interrupted computation or to load the approximations from a custom file.
 
int max_pack
 number of max packets of iterations
 
int max_it
 number of max iterations per packet
 
int max_newt_it
 Number of max newton iterations for gravity center computations.
 
long int mpwp_max
 Maximum allowed number of bits for mp numbers: used in high precision shift.
 
mps_long_int_mt data_prec_max
 Maximum precision reached during the computation.
 
pthread_mutex_t precision_mutex
 Precision operation give best results when done one thread at a time :)
 
mps_boolean just_raised_precision
 True if this is the first iteration after the precision has been raised.
 
mps_boolean random_seed
 mps_boolean value that determine if we should use a random seed for starting points
 
int n
 degree of zero-deflated polynomial.
 
int deg
 input degree and allocation size.
 
mps_phase lastphase
 Last computing phase.
 
mps_phase starting_case
 Selected starting case, can be 'd' for DPE or 'f' for floating point.
 
mps_boolean best_approx
 Set to true if the approximation are the best that can be obtained with the current precision.
 
double last_sigma
 shift in the angle in the positioning of the starting approximation for the last cluster. It will be used to determine the new sigma to maximize distance between starting points.
 
int count [3]
 Vector containing count of in, out and uncertaing roots.
 
int zero_roots
 Number of zero roots.
 
int * order
 Output index order.
 
mps_approximation ** root
 Vector of points to the current root approximations.
 
mps_boolean skip_float
 true if the float phase should be skipped, passing directly do dpe phase.
 
rdpe_t eps_in
 Input precision of the coefficients.
 
rdpe_t eps_out
 Output precision of the roots.
 
double lmax_coeff
 Logarithm of the max modulus of the coefficients.
 
long int mpwp
 Bits of working precision that mpsolve is using.
 
rdpe_t mp_epsilon
 Current multiprecision epsilon.
 
double sep
 Log of the lower bound to the minumum distance of the roots.
 
mps_clusterizationclusterization
 Clusterization object that represent the clusterization detected on the roots. More...
 
cplx_t * fppc1
 Standard complex coefficients of the polynomial. More...
 
cdpe_t * dpc1
 dpe complex coefficients of the polynomial. More...
 
cdpe_t * dpc2
 dpe complex coefficients of the polynomial. More...
 
mpc_t * mfpc1
 Multiprecision complex coefficients of the polynomial. More...
 
mpc_t * mfppc1
 Multiprecision complex coefficients of the first derivative of the polynomial. More...
 
mps_boolean * spar1
 Vector representing sparsity of the polynomial in the same way that spar does. More...
 
int * oldpunt
 Old value of punt (temporary vector). More...
 
double * fap1
 Vector containing the moduli of the coefficients of the polynomial as floating point numbers. More...
 
double * fap2
 Vector containing the logarithm of the moduli of the coefficients of the polynomial as floating point numbers. More...
 
rdpe_t * dap1
 Vector containing the moduli of the coefficients of the polynomial as dpe numbers. More...
 
mps_boolean * again_old
 Temporary vector containing the old value of again. More...
 
mps_algorithm algorithm
 This is used in the program to switch behavious based on the algorithm that is been used now.
 
mps_starting_strategy starting_strategy
 Strategy used to dispose the starting approximations.
 
void(* mpsolve_ptr )(mps_context *status)
 Routine that performs the loop needed to coordinate root finding. It has to be called to do the hard work.
 
mps_polynomialactive_poly
 This is the polynomial that is currently being solved in MPSolve.
 
mps_secular_equationsecular_equation
 Pointer to the secular equation used in computations.
 
int n_threads
 Number of threads to be spawned.
 
mps_thread_poolpool
 The thread pool used for the concurrent part of MPSolve.
 
mpc_t * bmpc
 Auxiliary memory used in regeneation to avoid thread-safeness issues.
 
mps_boolean jacobi_iterations
 True if Jacobi-style iterations must be used in the secular algorithm.
 
const char * gnuplot_format
 Char to be intersted after the with statement in the output piped to gnuplot.
 
unsigned long int regeneration_time
 
unsigned long int mp_iteration_time
 
unsigned long int dpe_iteration_time
 
unsigned long int fp_iteration_time
 
mps_boolean exit_required
 
long int minimum_gmp_precision
 
mps_boolean avoid_multiprecision
 In case this field is set to true MPSolve will avoid a multiprecision phase, and exit instead. More...
 
mps_boolean crude_approximation_mode
 This flags enables the "crude" only approximation mode of MPSolve. More...
 
mps_regeneration_driverregeneration_driver
 This is a pointer to the regeneration driver that performs the standard regeneration step. MPSolve provides a default implementation of this can be overloaded by the user.
 

Detailed Description

this struct holds the state of the mps computation

Member Data Documentation

◆ again_old

mps_boolean* mps_context::again_old

Temporary vector containing the old value of again.

See also
again

◆ avoid_multiprecision

mps_boolean mps_context::avoid_multiprecision

In case this field is set to true MPSolve will avoid a multiprecision phase, and exit instead.

Note that this may imply that not all the required digits/isolation condition may have been computed.

◆ chkrad

mps_boolean mps_context::chkrad

True if check of radius should be performed at the end of the algorithm.

Only works for algorithm MPS_ALGORITHM_SECULAR_GA.

◆ clusterization

mps_clusterization* mps_context::clusterization

Clusterization object that represent the clusterization detected on the roots.

This value is updated with the mps_*cluster routines.

See also
mps_fcluster(), mps_dcluster(), mps_mcluster()

◆ crude_approximation_mode

mps_boolean mps_context::crude_approximation_mode

This flags enables the "crude" only approximation mode of MPSolve.

If this mode is activated MPSolve will only perform a basic Aberth iteration in floating point and then exit. Note that the output result will still be guaranteed but in general it will not be possible to reach arbitrary precision and the results may be quite far from the roots for bad conditioned polynomials.

◆ dap1

rdpe_t* mps_context::dap1

Vector containing the moduli of the coefficients of the polynomial as dpe numbers.

It is used in the computation of the newton polygonal in mps_dcompute_starting_radii().

See also
mps_dcompute_starting_radii()

◆ DOLOG

mps_boolean mps_context::DOLOG

true if log are needed. They will be written to logstr

See also
logstr

◆ dpc1

cdpe_t* mps_context::dpc1

dpe complex coefficients of the polynomial.

This is used as a temporary vector while shifting the polynomial with a new gravity center in mps_dshift().

◆ dpc2

cdpe_t* mps_context::dpc2

dpe complex coefficients of the polynomial.

This is used as a temporary vector while shifting the polynomial with a new gravity center in mps_dshift().

◆ fap1

double* mps_context::fap1

Vector containing the moduli of the coefficients of the polynomial as floating point numbers.

It is used in the computation of the newton polygonal in mps_fcompute_starting_radii().

See also
mps_fcompute_starting_radii()

◆ fap2

double* mps_context::fap2

Vector containing the logarithm of the moduli of the coefficients of the polynomial as floating point numbers.

It is used in the computation of the newton polygonal in mps_fcompute_starting_radii().

See also
mps_fcompute_starting_radii()
fap1

◆ fppc1

cplx_t* mps_context::fppc1

Standard complex coefficients of the polynomial.

This is used as a temporary vector while shifting the polynomial with a new gravity center in mps_fshift().

◆ mfpc1

mpc_t* mps_context::mfpc1

Multiprecision complex coefficients of the polynomial.

This is used as a temporary vector while shifting the polynomial with a new gravity center in mps_mshift().

◆ mfppc1

mpc_t* mps_context::mfppc1

Multiprecision complex coefficients of the first derivative of the polynomial.

This is used as a temporary vector while shifting the polynomial with a new gravity center in mps_mshift().

◆ oldpunt

int* mps_context::oldpunt

Old value of punt (temporary vector).

See also
punt

◆ resume

mps_boolean mps_context::resume

true if we are trying to resume previously interrupted.

Not yet implemented.

◆ self_thread_pool

mps_thread_pool* mps_context::self_thread_pool

This value is non NULL if mpsolve is launched via mps_mpsolve_async() and in that case holds a pointer to the thread pool used to manage asynchronous callbacks.

It will be automatically freed by mps_free_data().

◆ spar1

mps_boolean* mps_context::spar1

Vector representing sparsity of the polynomial in the same way that spar does.

It is used as a temporary vector.

See also
spar

The documentation for this struct was generated from the following file: