Data Structures and Algorithms Lecture Notes

7 February 2011 List Traversal


Outline

Why Traversals?

Group Operations

Simple Group Operations

Capable Group Operations

Simple vs Capable

References

Example

for (i = er.first(); i.hasMore(); i.next())
  List<Patient>.reference sickest = i;
  for (j = i.next(); j.hasMore(); j.next())
    if j.value().sicker(sickest.value())
      sickest = j
  er.swap(i, sickest)

Traversals

But First...

Creating Iterators

Iterator References

Implementing Iterators

Iterator Methods

Iterator Under Change

List Extremes

List Traversal

External Traversals

Internal Traversals

Comparison

InEx Traversals

Summary

References


This page last modified on 2011 February 9.

Creative
    Commons License