Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

TreeComp Documentation

1.2

TreeComp is developed at the Control Theory and Robotics Lab. It contains ANSI C++ classes for handling tree structures. This documentation is based on the thesis of Ingo Herwig who also implemented the first version of TreeComp.

Goals

The reason TreeComp was made is, that at our lab we need data structures to handle trees an an implementation of Genetic Programming. Since this is a rather fundamental element, we decided to isolate it from the other code. Also we tried to design it STL-like using design patterns.

What is a tree?

A tree is a construct with nodes, which contain pointers to other nodes (children). Each node has one parent and zero or any number of children. A node without children is also called leave. The nodes have an hierarchical order, without circles.

Components

The central element is the class Node which is the interface to the tree component. Node is the physical representation of the tree, consisting of nodes and subtrees. For traversing a tree the classes NodeIterator and NodeTraversal can be used.

In order to execute certain operations on the tree these can be encapsulated in the visitor class NodeVisitor.

The output of trees takes place in the strategy classes (OutputStrategy). For each output format is done by a specialized subclass.

Concepts

This library makes heavy use of design patterns as described by Gamma et. al. and some other widely used software techniques. To understand this lib you should be familiar with the concepts of

Further Documentation

See the following pages for documentation about the design of this library:

Node
NodeIterator
NodeVisitor
OutputStrategy
NodeTraversal

An example for the usage of the classes can be found in main.cpp .


Generated on Mon Jan 6 12:02:08 2003 for TreeComp by doxygen1.2.17