[BACK]Return to generic_arrays_of_vector_lists.ads CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Supports

Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Supports/generic_arrays_of_vector_lists.ads, Revision 1.1.1.1

1.1       maekawa     1: with Abstract_Ring;
                      2: with Generic_Vectors;
                      3: with Generic_VecVecs;
                      4: with Generic_Lists_of_Vectors;
                      5:
                      6: generic
                      7:
                      8:   with package Ring is new Abstract_Ring(<>);
                      9:   with package Vectors is new Generic_Vectors(Ring);
                     10:   with package VecVecs is new Generic_VecVecs(Ring,Vectors);
                     11:   with package Lists is new Generic_Lists_of_Vectors(Ring,Vectors,VecVecs);
                     12:
                     13: package Generic_Arrays_of_Vector_Lists is
                     14:
                     15: -- DESCRIPTION :
                     16: --   This package defines arrays of lists of links to vectors.
                     17:
                     18:   use Lists;
                     19:
                     20: -- DATA STRUCTURES :
                     21:
                     22:   type Array_of_Lists is array ( integer range <> ) of List;
                     23:   type Link_to_Array_of_Lists is access Array_of_Lists;
                     24:
                     25: -- COMPARISON and COPYING :
                     26:
                     27:   function Equal ( l1,l2 : Array_of_Lists ) return boolean;
                     28:   function Equal ( l1,l2 : Link_to_Array_of_Lists ) return boolean;
                     29:
                     30:   -- DESCRIPTION :
                     31:   --   Returns true if both arrays have the same lists.
                     32:
                     33:   procedure Copy ( l1 : in Array_of_Lists; l2 : in out Array_of_Lists );
                     34:
                     35:   -- DESCRIPTION :
                     36:   --   After Copy(l1,l2), Equal(l1,l2) holds.
                     37:   --   Of course, this is a deep copy, in constrast to l2 := l1.
                     38:
                     39: -- SELECTOR :
                     40:
                     41:   function Length_Of ( l : Array_of_Lists ) return natural;
                     42:
                     43:   -- DESCRIPTION :
                     44:   --   Returns the sum of all lengths of the lists in l.
                     45:
                     46: -- DESTRUCTORS :
                     47:
                     48:   procedure Deep_Clear    ( l : in out Array_of_Lists );
                     49:   procedure Shallow_Clear ( l : in out Array_of_Lists );
                     50:   procedure Deep_Clear    ( l : in out Link_to_Array_of_Lists );
                     51:   procedure Shallow_Clear ( l : in out Link_to_Array_of_Lists );
                     52:
                     53:   -- DESCRIPTION :
                     54:   --   Frees allocated memory space.
                     55:   --   With a deep clear, also the content of the lists are cleared,
                     56:   --   while with a shallow clear, only the lists structures will be
                     57:   --   destroyed, the points in the lists will remain.
                     58:
                     59: end Generic_Arrays_of_Vector_Lists;

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