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

Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Implift/generic_position.adb, Revision 1.1

1.1     ! maekawa     1: with Lists_of_Integer_Vectors;           use Lists_of_Integer_Vectors;
        !             2: with Integer_Support_Functions;          use Integer_Support_Functions;
        !             3: with Power_Lists;                        use Power_Lists;
        !             4:
        !             5: function Generic_Position ( p : Poly_Sys; tv : Tree_of_Vectors )
        !             6:                           return boolean is
        !             7:
        !             8: -- ALGORITHM :
        !             9: --   Because tv contains the useful directions for the mixed volume,
        !            10: --   only the cardinality of the faces of the first support list will be
        !            11: --   checked, for all top directions in tv.
        !            12:
        !            13:   res : boolean := true;
        !            14:   tmp : Tree_of_Vectors := tv;
        !            15:   l : List := Create(p(p'first));
        !            16:
        !            17: begin
        !            18:   while not Is_Null(tmp) loop
        !            19:     declare
        !            20:       nd : Node := Head_Of(tmp);
        !            21:       fc : List;
        !            22:     begin
        !            23:       exit when nd.d'length < Head_Of(l)'length;
        !            24:       fc := Outer_Face(l,nd.d.all);
        !            25:       res := (Length_Of(fc) <= 1);
        !            26:       Deep_Clear(fc);
        !            27:     end;
        !            28:     exit when not res;
        !            29:     tmp := Tail_Of(tmp);
        !            30:   end loop;
        !            31:   return res;
        !            32: end Generic_Position;

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