|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 2105 (0x839)
Types: TextFile
Names: »V«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
generic
type Item is private;
with function "<" (Left : in Item; Right : in Item) return Boolean;
with function Is_Equal (Left : in Item; Right : in Item) return Boolean;
package Halstead_List is
--================================================================
-- This package contains a generic list containing items and ==
-- their frequencies (number of times the same item is put ==
-- into the list using Put. After instantiating this package ==
-- and declaring an object of type List, we must Create the ==
-- object first before any other operations are performed. ==
-- Otherwise, the correctness of the following operations are ==
-- not guaranteed. ==
--================================================================
type List is private;
procedure Create (Empty_List : in out List);
-- Create an empty list. MUST be used before any other
-- operations below is used.
procedure Put (This_Item : in Item; Into : in out List);
-- Put an item into a list. If the given item is a new item,
-- it will be put into the list. If the given item already
-- exists, the frequency of the item will be incremented by
-- one. Items will be stored in ASCENDING order.
function Length_Of (This_List : in List) return Natural;
-- Return the number of items in the list. ZERO will be
-- returned if the given list is EMPTY.
function Frequency_Of
(This_Item : in Item; In_This : in List) return Natural;
-- returns frequency of an item in a given list. If the item
-- does not exist, ZERO is returned.
generic
with procedure Process (This_Item : in Item;
Frequency_Of_Item : in Natural);
procedure Iterate (Across_The_List : in List);
-- Iterate allows a user to visit every item in the list without
-- changing the state of the list.
private
type Node;
--
-- incomplete definition
--
type List is access Node;
end Halstead_List;