Software Engineering Home Other Component Types

Container Adaptors (under development)

There are four adaptors that provide graph classes with different functionality and performance profiles.  These container adaptors are different to those found in the STL (e.g. stack, queue) in that they extended, rather than restrict, the behaviour of the containers that they adapt.
 
Adaptor Description Requirements  
of Containers
Properties
SequenceGraph Converts an STL 
vector or string 
into a BTL Graph
1. random access via a [] 
operator 
2. provide certain insert 
and erase functions 
1. Random access to vertices in O(1) 
2. Insertion of vertices in O(1) 
3. Insertion of links between vertices in O(n)
SequenceGraph 
WithEdges
Converts an STL 
vector or string 
into a BTL GraphWith 
Edges
1. random access via 
a [] operator 
2. provide certain 
insert and erase 
functions 
1. All of the SequenceGraph properties 
2. Random access to edges in O(1) 
3. Insertion of edges in O(n) 
SortedGraph Converts an STL 
map into a BTL 
Graph
1.  Must provide the 
same functionality 
as a STL map
1. Provides random access to vertices in O(log n) 
2. Insertion of vertices in O(log n) 
3. Addition and removal of links between vertices in O(log n)
SortedGraph 
WithEdge
Converts an STL 
map into a 
GraphWith Edges
1.  Must provide the 
same functionality 
as a STL map
1. All of the SortedGraph properties 

Iterators

There are two custom built iterators, the IndirectIterator and the DFSIterator. The former of these components is designed to work with a container of pointers to objects. The later component is specifically for use with Graph (see the section on BTL containers) objects and can be used to migrate through a graph in depth first search order. This iterator is unusual in that the termination point is not known ahead of time and for this reason the use of this iterator is slightly different from those found in the STL.
 
Back Forward