Next:
Contents
An Experiment in Object Oriented Design: A General Graph Class and Its Graphical Interface: Version 1.0
Jim Peterson
February 3, 1999
Contents
List of Figures
Introduction:
Why Should We Care?
Background Reading and Study:
The Void List Type:
A Specific List Class: Double Lists:
The CELL_CORE Class:
The Child SL_CELL Class:
The Child DL_CELL Class:
The LIST_CORE Class:
The Child SLLIST:
The Child DLLIST:
The Child CLLIST:
Iterators:
The Void Access Class:
The Void Access Definitions:
The CORE Class:
The Child Classes:
The Void Access Implementation:
The Void List Class:
The Void List Definitions:
The CELL_CORE Class:
The Child SL_CELL Class:
The Child DL_CELL Class:
The LIST_CORE Class:
The Child SLLIST:
The Child DLLIST:
The Child CLLIST:
Iterators:
The Void List Implementation:
Implementable Methods:
Problems: Sorting:
Problems: Finding, Inserting and Deleting Elements:
Problems: Building A List:
The General Graph Class:
The Graph Class:
The Class Description: Header: graph.h
The Constructor and Destructor
Iterators
Overloaded I/O and Grab and Print:
Add a Node:
Gnode Constructor
Node Constructor
GnodePtrBag Add Agent
GnodePtrBagLink Constructor
Add an Edge:
Gedge Constructor:
GedgePtrBag Add:
GedgePtrBagLink Constructor
Find a Node:
GnodePtrBagIter Constructor:
Remove a Node:
GnodePtrBagManip Constructor:
The while loop:
The While Block:
The removeAll() Method:
A Sample Application:
Find an Edge:
Remove an Edge:
GedgePtrBagManip Constructor:
Gnode Edge Remove Agent:
GedgePtrBagManip remove() Agent
A Sample Application:
The Public Interface: nodes() and edges()
Complete Listing of the Graph-Related Source Code
The Edge Class:
The Class Definition: edge.h:
The Implementation: edge.c:
The Node Class:
node.h:
node.c:
The Bag Classes:
The Edge Bag Definitions:
The GedgePtrBagLink Class Implementation:
The GedgePtrBag Class Implementation:
The GedgePtrBagIter Class Implementation:
The GedgePtrBagmanip Class Implementation:
The Node Bag Definitions:
The GnodePtrBagLink Class Implementation:
The GnodePtrBag Class Implementation:
The GnodePtrBagIter Class Implementation:
The GnodePtrBagManip Class Implementation:
The Graph Class:
The Graph Definitions:
The Gnode Class Implementation:
The Gedge Class Implementation:
The Graph Class Implementation:
Run Time Results:
Adding Visualization to the Graph Class:
The Visual Graph Class:
xgraph.h
xgraph.c
The Graphical Interface to the Graph Class:
run.c
Run Time Results: Manual Graph Creation
Specifying a Graph Via a File:
The Specifications of the Input File:
The Graph::ReadInputFile Method:
The New Run Method:
RunTime Results: File Construction of the Graph Object:
Generating Random Graphs:
Arbitrary Graph Objects Via Void * Data:
Altering the Graph Class for Void * Data:
A First Run-Time Example:
A Second Run-Time Example:
Implementing the Access Methods as a Class:
A Run-time Example Using the ACCESS Class:
Graphs of Graphs:
The New ACCESS_GRAPH Class:
The New Run Time Code:
Construct Graph G1:
Construct Graph G2:
Construct the Complex Graph:
References:
About this document ...
Jim Peterson
1999-05-17