Hostname: page-component-586b7cd67f-rcrh6 Total loading time: 0 Render date: 2024-11-28T09:27:11.207Z Has data issue: false hasContentIssue false

An open ended tree

Published online by Cambridge University Press:  13 May 2003

HENK VANDECASTEELE
Affiliation:
PharmaDM, Ambachtenlaan 54D, B-3001 Leuven, Belgium (email: [email protected])
GERDA JANSSENS
Affiliation:
Department of Computer Science, Katholieke Universiteit Leuven, Celestijnenlaan 200A, B-3001 Leuven, Belgium (email: [email protected])

Abstract

An open ended list is a well known data structure in Prolog programs. It is frequently used to represent a value changing over time, while this value is referred to from several places in the data structure of the application. A weak point in this technique is that the time complexity is linear in the number of updates to the value represented by the open ended list. In this programming pearl we present a variant of the open ended list, namely an open ended tree, with an update and access time complexity logarithmic in the number of updates to the value.

Type
PROGRAMMING PEARL
Copyright
© 2003 Cambridge University Press

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)