This second procedure allows to compute the largest square (up to a pre-defined accuracy ) that is enclosed in the region. This largest box can clearly be obtained from the result of the previous algorithm but this weaker procedure will be faster.
The principle is to have a set of boxes whose first element is a range for the center of the box and second element is a possible value for the length of the half-edge of the square. The main algorithm will test if for a given box the center may be a candidate to be the center of a square of half-edge (where is the current optimum) using some heuristics and if the answer is positive will compute the minimal and maximal root of the polynomials defined by this square using a secondary algorithm. If these values are compatible with the bound the current optimum will be updated.
int ALIAS_Geometry_Carre(int Degree,int Nb_Parameter, INTERVAL_VECTOR (* TheCoeff)(INTERVAL_VECTOR &), int Nb_Constraints,INTEGER_VECTOR &Type_Eq,INTEGER_VECTOR &Imperatif, int (* TheMatrix)(INTERVAL_VECTOR &, INTERVAL_MATRIX &), int Has_Matrix, INTERVAL_VECTOR (* IntervalFunction)(int,int,INTERVAL_VECTOR &), int *Has_Gradient, INTERVAL_MATRIX (* Gradient)(int, int,INTERVAL_VECTOR &), INTERVAL & TheDomain,INTERVAL_VECTOR & TheDomain_Parameter, int Nb_Points,int Use_Solve,int rand, int Iteration_Geometry,int Iteration_Polynom, double Accuracy_Variable,double Accuracy,double Accuracy_Geometry, double Accuracy_Polynom,INTERVAL_VECTOR &Solution,double *Seuil, int (* Solve_Poly)(double *, int *,double *), int (* Simp_Proc)(INTERVAL_VECTOR &), int (* Simp_Proc_Pol)(INTERVAL_VECTOR &))The arguments are the same than for the previous procedure except for:
This procedure will return:
During the calculation the flag ALIAS_Has_OptimumG will be set to 1 as soon as an optimum is found: the center of the current optimal geometry is the mid point of the interval vector ALIAS_Vector_OptimumG while is edge is in the interval ALIAS_OptimumG.
The secondary algorithm uses the flag Single_BisectionG and Reverse_StrorageG that play the same role than Single_Bisection and Reverse_Storage in the general solving algorithms (see sections 184.108.40.206 and 220.127.116.11).