[BACK]Return to dynamic_mixed_subdivisions.ads CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Root_Counts / Dynlift

Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Dynlift/dynamic_mixed_subdivisions.ads, Revision 1.1.1.1

1.1       maekawa     1: with Standard_Integer_Vectors;           use Standard_Integer_Vectors;
                      2: with Standard_Floating_Vectors;
                      3: with Lists_of_Integer_Vectors;           use Lists_of_Integer_Vectors;
                      4: with Triangulations;                     use Triangulations;
                      5: with Integer_Faces_of_Polytope;          use Integer_Faces_of_Polytope;
                      6: with Integer_Mixed_Subdivisions;         use Integer_Mixed_Subdivisions;
                      7: with Arrays_of_Integer_Vector_Lists;     use Arrays_of_Integer_Vector_Lists;
                      8:
                      9: package Dynamic_Mixed_Subdivisions is
                     10:
                     11: -- DESCRIPTION :
                     12: --   This package provides implementations of the dynamic lifting
                     13: --   algorithm for the construction of a mixed subdivision.
                     14:
                     15: -- OPTIONS :
                     16: --   1. Choice of the order of the points;
                     17: --   2. For vertices or not, allows to add interior points;
                     18: --   3. With flattening or not, allows maximum lifting value.
                     19:
                     20: -- DATA STRUCTURES :
                     21:
                     22:   type Face_Structure is record
                     23:     l,last : List;      -- l contains the lifted points of the faces,
                     24:                         -- last is a pointer to the last element of l
                     25:     t : Triangulation;  -- triangulation of the points in l
                     26:     f : Faces;          -- k-faces of conv(l)
                     27:   end record;
                     28:   type Face_Structures is array(integer range <>) of Face_Structure;
                     29:
                     30: -- BASIC VERSIONS : WITHOUT OUTPUT GENERICS :
                     31:
                     32:   procedure Dynamic_Lifting
                     33:                 ( n : in natural; mix : in Vector; points : in Array_of_Lists;
                     34:                   order,inter,conmv : in boolean; maxli : in natural;
                     35:                   mixsub : in out Mixed_Subdivision;
                     36:                   fs : in out Face_Structures;
                     37:                   nbsucc,nbfail : in out Standard_Floating_Vectors.Vector );
                     38:
                     39:   -- DESCRIPTION :
                     40:   --   Application of the dynamic lifting algorithm to the points.
                     41:
                     42:   -- ON ENTRY :
                     43:   --   n          dimension before lifting;
                     44:   --   mix        type of mixture;
                     45:   --   points     tuple of lists of points of length n;
                     46:   --   order      if true, then the points are already ordered and will
                     47:   --              be processed like they occur in the list,
                     48:   --              if false, then a random order will be chosen;
                     49:   --   inter      if true, then the list may contain interior points,
                     50:   --              that are points x in conv(l\{x}),
                     51:   --              if false, no interior points occur in the list;
                     52:   --   conmv      if true, then online checks on zero contributions will
                     53:   --              be made, otherwise this will not happen;
                     54:   --   maxli      maximum value of the lifting function,
                     55:   --              if = 0, then no flattening will be applied,
                     56:   --              if > 0, then no points will be given a lifting value
                     57:   --              larger than maxli, eventually flattening will be applied;
                     58:   --   mixsub     regular mixed subdivision of the lifted points;
                     59:   --   fs         the face structures of the lower hulls of the lifted
                     60:   --              points, necessary to re-start the algorithm efficiently;
                     61:   --   nbsucc     number of successful face-face combinations;
                     62:   --   nbfail     number of unsuccessful face-face combinations.
                     63:
                     64:   -- ON RETURN :
                     65:   --   mixsub     regular mixed subdivision of the lifted points;
                     66:   --   fs         face structures of the updated lower hulls;
                     67:   --   nbsucc     updated number of successful face-face combinations;
                     68:   --   nbfail     updated number of unsuccessful face-face combinations.
                     69:
                     70: -- EXTENDED VERSIONS : WITH OUTPUT GENERICS
                     71:
                     72:   generic
                     73:     with procedure Before_Flattening
                     74:                 ( mixsub : in out Mixed_Subdivision; fs : in Face_Structures );
                     75:
                     76:     -- DESCRIPTION :
                     77:     --   Before flattening, the current mixed subdivision and face
                     78:     --   structures are given as parameter to the procedure above.
                     79:
                     80:   procedure Dynamic_Lifting_with_Flat
                     81:                 ( n : in natural; mix : in Vector; points : in Array_of_Lists;
                     82:                   order,inter,conmv : in boolean; maxli : in natural;
                     83:                   mixsub : in out Mixed_Subdivision;
                     84:                   fs : in out Face_Structures;
                     85:                   nbsucc,nbfail : in out Standard_Floating_Vectors.Vector );
                     86:
                     87:   -- DESCRIPTION :
                     88:   --   Application of the dynamic lifting algorithm to the points.
                     89:   --   Before flattening, the generic procedure will be invoked.
                     90:   --   The parameters have the same meaning as in the basic version.
                     91:
                     92:   generic
                     93:     with procedure Process_New_Cells
                     94:                 ( mixsub : in out Mixed_Subdivision;
                     95:                   i : in natural; point : in vector );
                     96:
                     97:     -- DESCRIPTION :
                     98:     --   After the addition of a new point to the ith component,
                     99:     --   this lifted point together with the new mixed cells are returned.
                    100:     --   After the computation of the initial cell, i=0.
                    101:
                    102:   procedure Dynamic_Lifting_with_New
                    103:                 ( n : in natural; mix : in Vector; points : in Array_of_Lists;
                    104:                   order,inter,conmv : in boolean; maxli : in natural;
                    105:                   mixsub : in out Mixed_Subdivision;
                    106:                   fs : in out Face_Structures;
                    107:                   nbsucc,nbfail : in out Standard_Floating_Vectors.Vector );
                    108:
                    109:   -- DESCRIPTION :
                    110:   --   Application of the dynamic lifting algorithm to the points.
                    111:   --   After each addition of a point, the generic procedure will
                    112:   --   be invoked.
                    113:   --   The parameters have the same meaning as in the basic version.
                    114:
                    115:   generic
                    116:     with procedure Before_Flattening
                    117:                 ( mixsub : in out Mixed_Subdivision; fs : in Face_Structures );
                    118:
                    119:     -- DESCRIPTION :
                    120:     --   Before flattening, the current mixed subdivision with
                    121:     --   the current lists of lifted points are given.
                    122:
                    123:     with procedure Process_New_Cells
                    124:                 ( mixsub : in out Mixed_Subdivision;
                    125:                   i : in natural; point : in vector );
                    126:
                    127:     -- DESCRIPTION :
                    128:     --   After the addition of a new point to the ith component,
                    129:     --   this lifted point together with the new simplices are returned.
                    130:     --   After the computation of the initial cell, i=0.
                    131:
                    132:   procedure Dynamic_Lifting_with_Flat_and_New
                    133:                 ( n : in natural; mix : in Vector; points : in Array_of_Lists;
                    134:                   order,inter,conmv : in boolean; maxli : in natural;
                    135:                   mixsub : in out Mixed_Subdivision;
                    136:                   fs : in out Face_Structures;
                    137:                   nbsucc,nbfail : in out Standard_Floating_Vectors.Vector );
                    138:
                    139:   -- DESCRIPTION :
                    140:   --   Application of the dynamic lifting algorithm to the list l.
                    141:   --   Before flattening, the first generic procedure will be invoked.
                    142:   --   After each addition of a point, the second generic procedure
                    143:   --   will be invoked.
                    144:   --   The parameters have the same meaning as in the basic version.
                    145:
                    146: end Dynamic_Mixed_Subdivisions;

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