Volume 1 : Number 2 : Paper 4

December 1998 Special Issue of Best Papers presented at CLEI'97. Valparaiso
Title:
Complete Traversals and their Implementation Using the Standard Template Library

Authors and Affiliations:
David R. Musser, Rensselaer Polytechnic Institute, Troy, USA
Arturo J. Sanchez-Ruiz, Universidad Central de Venezuela, Caracas, Venezuela
Eric Gamess, Universidad del Valle, Cali, Colombia

Abstract:
A complete traversal of a container C (such as a set) is informally described by the iteration scheme for x in C F(x,C) where F is a function that might possibly modify C by inserting new elements into it. We assume that the order in which the elements are treated is not relevant, as long as the iteration continues until F has been applied to all elements currently in C, including those F has inserted. Standard iteration mechanisms, such as the iterators provided in the C++ Standard Template Library (STL), do not directly support complete traversals. In this paper we present two approaches to complete traversals, both extending the STL framework, one by means of generic algorithms and the other by means of a container adaptor.


Received September 1998, Revised May 1999
Full paper, 18 pages [ PS.GZ, 60 Kb  |  PDF, 251 Kb ]