Download GOBLIN - Stony Brook University
Transcript
CHAPTER 8. EXPLICIT DATA STRUCTURES
EXPLICIT DATA STRUCTURES
24
44
18
24
36
53
36
Chapter 8
90
49
83
29
81
29
89
40
60
98
83
96
Explicit Data Structures
Figure 8.1: Fibonacci Heaps
This chapter describes the GOBLIN classes which are data structures
in the usual sense and for some of which equivalent data structures can
be found in the C++ standard template library (STL). The template data
structures which are discussed here support the GOBLIN memory management and tracing functionality.
In general, the template parameter <TItem> has to be integral and the
GOBLIN library file contains template instances for the types TNode and
TArc. To generate additional template instances, one may include the corresponding .cpp file directly.
8.1
Container Objects
Include file: goblinQueue.h
Synopsis:
template <class TItem,class TPriority>
class goblinContainer : public virtual goblinDataObject
{
virtual void
Init() = 0;
virtual
virtual
virtual
virtual
virtual
virtual
void
void
TItem
TItem
bool
TItem
Insert(TItem,TKey) = 0;
ChangeKey(TItem,TKey) = 0;
Delete() = 0;
Peek() = 0;
Empty();
Cardinality() = 0;
71