[BACK]Return to symmetric_bkk_bound_solvers.adb CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Root_Counts / Symmetry

Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Symmetry/symmetric_bkk_bound_solvers.adb, Revision 1.1.1.1

1.1       maekawa     1: with Standard_Integer_Vectors;           use Standard_Integer_Vectors;
                      2: with Standard_Floating_Vectors;
                      3: with Power_Lists;                        use Power_Lists;
                      4: with Standard_Complex_Laur_Systems;      use Standard_Complex_Laur_Systems;
                      5: with Standard_Poly_Laur_Convertors;      use Standard_Poly_Laur_Convertors;
                      6: with Integer_Lifting_Utilities;          use Integer_Lifting_Utilities;
                      7: with Arrays_of_Integer_Vector_Lists;     use Arrays_of_Integer_Vector_Lists;
                      8: with Integer_Mixed_Subdivisions;         use Integer_Mixed_Subdivisions;
                      9: with Integer_Mixed_Subdivisions_io;      use Integer_Mixed_Subdivisions_io;
                     10: with Mixed_Coherent_Subdivisions;        use Mixed_Coherent_Subdivisions;
                     11: with Mixed_Volume_Computation;           use Mixed_Volume_Computation;
                     12: with Symmetric_Polyhedral_Continuation;  use Symmetric_Polyhedral_Continuation;
                     13:
                     14: package body Symmetric_BKK_Bound_Solvers is
                     15:
                     16:   function Symmetric_BKK_Solve ( p : Poly_Sys; sign : boolean )
                     17:                                return Solution_List is
                     18:
                     19:     n : constant natural := p'length;
                     20:     points : Array_of_Lists(p'range) := Create(p);
                     21:     sols : Solution_List;
                     22:     mix,per : Link_to_Vector;
                     23:     mixsub : Mixed_Subdivision;
                     24:     lp,pp : Laur_Sys(p'range);
                     25:     low : constant Vector := (1..n => 0);
                     26:     upp : constant Vector := Adaptive_Lifting(points);
                     27:
                     28:   begin
                     29:     Compute_Mixture(points,mix,per); Clear(per);
                     30:     declare
                     31:       lifted : Array_of_Lists(mix'range);
                     32:       nbsucc,nbfail : Standard_Floating_Vectors.Vector(mix'range)
                     33:                     := (mix'range => 0.0);
                     34:       file : file_type;
                     35:     begin
                     36:       Mixed_Coherent_Subdivision
                     37:         (n,mix.all,points,false,low,upp,lifted,nbsucc,nbfail,mixsub);
                     38:       pp := Polynomial_to_Laurent_System(p);
                     39:       lp := Perform_Lifting(n,mix.all,lifted,pp);
                     40:       Create(file,out_file,"/tmp/brol");
                     41:       sols := Symmetric_Mixed_Solve(file,sign,lp,mixsub,n,mix.all);
                     42:       Deep_Clear(lifted);
                     43:     end;
                     44:     Clear(pp); Clear(lp);
                     45:     Deep_Clear(points);
                     46:     Clear(mixsub);
                     47:     return sols;
                     48:   end Symmetric_BKK_Solve;
                     49:
                     50:   function Symmetric_BKK_Solve ( p : Poly_Sys; grp : List_of_Permutations;
                     51:                                  sign : boolean ) return Solution_List is
                     52:
                     53:     n : constant natural := p'length;
                     54:     points : Array_of_Lists(p'range) := Create(p);
                     55:     sols : Solution_List;
                     56:     mix,per : Link_to_Vector;
                     57:     mixsub : Mixed_Subdivision;
                     58:     lp,pp : Laur_Sys(p'range);
                     59:     low : constant Vector := (1..n => 0);
                     60:     upp : constant Vector := Adaptive_Lifting(points);
                     61:
                     62:   begin
                     63:     Compute_Mixture(points,mix,per); Clear(per);
                     64:     declare
                     65:       lifted : Array_of_Lists(mix'range);
                     66:       nbsucc,nbfail : Standard_Floating_Vectors.Vector(mix'range)
                     67:                     := (mix'range => 0.0);
                     68:       file : file_type;
                     69:     begin
                     70:       Mixed_Coherent_Subdivision
                     71:          (n,mix.all,points,false,low,upp,lifted,nbsucc,nbfail,mixsub);
                     72:       pp := Polynomial_to_Laurent_System(p);
                     73:       lp := Perform_Lifting(n,mix.all,lifted,pp);
                     74:       Create(file,out_file,"/tmp/brol");
                     75:       sols := Symmetric_Mixed_Solve(file,grp,sign,lp,mixsub,n,mix.all);
                     76:       Deep_Clear(lifted);
                     77:     end;
                     78:     Clear(pp); Clear(lp);
                     79:     Deep_Clear(points);
                     80:     Clear(mixsub);
                     81:     return sols;
                     82:   end Symmetric_BKK_Solve;
                     83:
                     84:   function Symmetric_BKK_Solve
                     85:                ( file : file_type; p : Poly_Sys; sign : boolean)
                     86:                return Solution_List is
                     87:
                     88:     n : constant natural := p'length;
                     89:     points : Array_of_Lists(p'range) := Create(p);
                     90:     sols : Solution_List;
                     91:     mix,per : Link_to_Vector;
                     92:     mixsub : Mixed_Subdivision;
                     93:     lp,pp : Laur_Sys(p'range);
                     94:     low : constant Vector := (1..n => 0);
                     95:     upp : constant Vector := Adaptive_Lifting(points);
                     96:
                     97:   begin
                     98:     Compute_Mixture(points,mix,per); Clear(per);
                     99:     declare
                    100:       lifted : Array_of_Lists(mix'range);
                    101:       nbsucc,nbfail : Standard_Floating_Vectors.Vector(mix'range)
                    102:                     := (mix'range => 0.0);
                    103:     begin
                    104:       Mixed_Coherent_Subdivision
                    105:         (n,mix.all,points,false,low,upp,lifted,nbsucc,nbfail,mixsub);
                    106:       put_line(file,"****  THE SYMMETRIC MIXED SUBDIVISION  ****");
                    107:       put(file,n,mix.all,mixsub);
                    108:       pp := Polynomial_to_Laurent_System(p);
                    109:       lp := Perform_Lifting(n,mix.all,lifted,pp);
                    110:       new_line(file); put_line(file,"****  SYMMETRIC MIXED SOLVE  ****");
                    111:       sols := Symmetric_Mixed_Solve(file,sign,lp,mixsub,n,mix.all);
                    112:       Deep_Clear(lifted);
                    113:     end;
                    114:     Clear(pp); Clear(lp);
                    115:     Deep_Clear(points);
                    116:     Clear(mixsub);
                    117:     return sols;
                    118:   end Symmetric_BKK_Solve;
                    119:
                    120:   function Symmetric_BKK_Solve ( file : file_type; p : Poly_Sys;
                    121:                                  grp :  List_of_Permutations; sign : boolean )
                    122:                                return Solution_List is
                    123:
                    124:     n : constant natural := p'length;
                    125:     points : Array_of_Lists(p'range) := Create(p);
                    126:     sols : Solution_List;
                    127:     mix,per : Link_to_Vector;
                    128:     mixsub : Mixed_Subdivision;
                    129:     lp,pp : Laur_Sys(p'range);
                    130:     low : constant Vector := (1..n => 0);
                    131:     upp : constant Vector := Adaptive_Lifting(points);
                    132:
                    133:   begin
                    134:     Compute_Mixture(points,mix,per); Clear(per);
                    135:     declare
                    136:       lifted : Array_of_Lists(mix'range);
                    137:       nbsucc,nbfail : Standard_Floating_Vectors.Vector(mix'range)
                    138:                     := (mix'range => 0.0);
                    139:     begin
                    140:       Mixed_Coherent_Subdivision
                    141:         (n,mix.all,points,false,low,upp,lifted,nbsucc,nbfail,mixsub);
                    142:       put_line(file,"****  THE SYMMETRIC MIXED SUBDIVISION  ****");
                    143:       put(file,n,mix.all,mixsub);
                    144:       pp := Polynomial_to_Laurent_System(p);
                    145:       lp := Perform_Lifting(n,mix.all,lifted,pp);
                    146:       new_line(file); put_line(file,"****  SYMMETRIC MIXED SOLVE  ****");
                    147:       sols := Symmetric_Mixed_Solve(file,grp,sign,lp,mixsub,n,mix.all);
                    148:       Deep_Clear(lifted);
                    149:     end;
                    150:     Clear(pp); Clear(lp);
                    151:     Deep_Clear(points);
                    152:     Clear(mixsub);
                    153:     return sols;
                    154:   end Symmetric_BKK_Solve;
                    155:
                    156: end Symmetric_BKK_bound_Solvers;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>