Version 10/24/2018 Notes Index ↑ 

Graph Framework Catalog

Components of the fsu:: graph framework

FSU Graph Framework* The fsu Graph Framework consists of a number of classes, utility functions, and test harnesses. The following is a brief description of the files and their contents.
FilenameContents
graph.h Class templates ALUGraph, ALDGraph. These implement adjacency list representations for undirected and directed graphs, respectively.
bfsurvey.h Class template BFSurvey. This class implements breadth-first survey as described in lecture notes.
Important engineering details are implemented that are not discussed in the class notes.
dfsurvey.h Class template DFSurvey. This class implements depth-first survey as described in lecture notes.
Important engineering details are implemented that are not discussed in the class notes.
graph_util.h A number of stand-alone functions assisting clients of the graph classes, including Load, Save, OutDegreeSequence, OutDegreeFrequencyDistribution, ComponentRankSequence, ShowAL, Path_BFS, Path_DFS, CheckSymmetry, and IsBipartite, along with several functions specifically supporting the test harnesses.
survey_util.h Stand-alone functions primarily supporting the test harnesses for graph surveys. Includes Levelorder, Preorder, Postorder, and WriteData.
topsort.h Function template TopSort implementing the Knuth topological sort algorithm.
fgraph.cpp Client test harness for graph class templates.
Arguments: (1) graph file (req), (2) log file (opt)
Functions Used/Tested: (1) UnGraph and Digraph API, (2) Topological Sort
agraph.cpp Graph analysis client of graph classes and Partition.
Arguments: (1) graph file (req), (2) component sizes to display (req), (3) degree sequence to display (opt - defaults to (2))
Functions Used/Tested: (1) Load(file,g), (2) IsBipartite(g,color), (3) ComponentRankSequence(g), (4) OutDegreeFrequencyDistribution(g), (5) OutDegreeSequence(g)
fbfsurvey.cpp Client test harness for BFSurvey class template. Can be configured for either undirected or directed graphs.
Arguments (all req): (1) graph file, (2) 'f'/'s' (full or single search), (3) start vertex number, (4) 1/0 (trace/no-trace).
fdfsurvey.cpp Client test harness for DFSurvey class template. Can be configured for either undirected or directed graphs.
Arguments (all req): (1) graph file, (2) 'f'/'s' (full or single search), (3) start vertex number, (4) 1/0 (trace/no-trace).
fpath.cpp Client test harness for Load, Path_BFS and Path_DFS. Reads graph file and displays BFS and DFS paths from x to y. Does both undirected and directed graphs.
Arguments (all req): (1) graph file, (2) from vertex, (3) to vertex.
fsymm.cpp Digraph symmetry checker.
Arguments: (1) graph file (req), (2) verbose flag (opt).
ftopsort.cpp Client test harness for TopSort function template.
Argument: (1) graph file (req)
rangraph.cpp Random graph generator.
Arguments: (1) graph file name (req), (2) vertex size (req), (3) edge size (req), (4) length of tail to display (opt)
rangraph_ER.cpp Random Erdos_Renyi graph generator.
Arguments: (1) graph file name (req), (2) vertex size (req), (3) expected vertex degree (req), (4) length of tail to display (opt)
Partition Framework
partition?.h Class template Partition. Support for Union-Find algorithms. Two different implementatons (? = 1,2) with same API.
partition_util.h Function template RankComponentsBySize computes sizes of components and lists them ranked by decreasing size.
fpartition?.cpp Test harnesses for the two implementations of Partition.
Maze Apps
maze_util.h Functions supporting the study of mazes using the graph framework, including LoadMaze and Maze2Graph
solvemaze.cpp Client test harness for Path_DFS, CheckSymmetry, and LoadMaze. Reads maze file, checks for consistency, solves the maze, and appends solution in maze file with ".dfs" extension.
Argument: (1) maze file (req).
maze2graph.cpp Client test harness for Maze2Graph. Reads maze file, writes graph file containing directed graph model of maze. Graph file same as maze filename with ".dg" extension.
Arguments: (1) maze file (req), (2) 1/0 (directed/undirected) (optional - default is directed)
printmaze.x Executable. Creates postscript file from maze file (with solution). Useful to print graphics and to include graphics in pdf documents.
Use with file redirect, and be sure to write to a file with ".ps" extension. (Written by Bret Whissel.)
ps2png.sh Executable. Converts postscript file to png file for visual display. Assumes "$1.ps" and writes "$1.png".
Argument: (1) .ps filename without ".ps" extension (req)
mazemaster.x Executable. Menu-driven maze analysis tool. Argument: command file (optional)

*Creation of some components of this framework may be included in course assignments. These will appear in truncated form in the course library.
Executables of test harnesses can be found in LIB/notes_support.

Please note: It is very important to understand all of the code listed above in complete detail and as it fits into the theory discussed in the lecture notes. Mastery of this software is part of the course..