正在加载图片...
1166 EXTRACTS FROM THE BASE LIBRARY SA.I TWO WAY L/ST,a one-way linked list implementation,relying internally on class BI LINKABLE. TWO WAY TREE,a widely used implementation of general trees,based on TWO WAY LIST for its representation and relying on the observation made on the chapter on multiple inheritance:if we merge the notion of tree and node,we can consider that a tree is both a list (as in TWO WAY LIST)and a list element (as in BI LINKABLE). All these classes,representing containers,are generic,with a single generic parameter representing the type of elements. The classes are given"as is",without further formating.Note that the following page numbers are of the form 1266.1,1266.2 etc.to avoid any confusion with the numbering of the pages in the printed book A.1 ARRAYS indexing description: "Sequences of values,all of the same type or of a conforming one, %accessible through integer indices in a contiguous interval"; status:“See notice at end of class'”, date:“$Date:1996/06/0514:19:05$, revision:"SRevision:1.28 $ class ARRAY [G]inherit RESIZABLE [G] redefine full,copy,is_equal, consistent,setup end; INDEXABLE [G,INTEGER] redefine1166 EXTRACTS FROM THE BASE LIBRARY §A.1 • TWO_WAY_LIST, a one-way linked list implementation, relying internally on class BI_LINKABLE. • TWO_WAY_TREE, a widely used implementation of general trees, based on TWO_WAY_LIST for its representation and relying on the observation made on the chapter on multiple inheritance: if we merge the notion of tree and node, we can consider that a tree is both a list (as in TWO_WAY_LIST) and a list element (as in BI_LINKABLE). All these classes, representing containers, are generic, with a single generic parameter representing the type of elements. The classes are given “as is”, without further formating. Note that the following page numbers are of the form 1266.1, 1266.2 etc. to avoid any confusion with the numbering of the pages in the printed book. A.1 ARRAYS indexing description: “Sequences of values, all of the same type or of a conforming one, % %accessible through integer indices in a contiguous interval”; status: “See notice at end of class”; date: “$Date: 1996/06/05 14:19:05 $”; revision: “$Revision: 1.28 $” class ARRAY [G] inherit RESIZABLE [G] redefine full, copy, is_equal, consistent, setup end; INDEXABLE [G, INTEGER] redefine
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有