ProgrammingAssignment-ALGraph

- Programming Assignment#7 Submit file is due Thursday at 10:30 am Hard copy is due at the beginning of class the same day This assignment will

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming Assignment #7 Submit file is due Thursday, April 19, 2007 at 10:30 am Hard copy is due at the beginning of class the same day This assignment will exercise your skills in implementing a graph and a couple of associated algorithms. The task is to implement a class called ALGraph , which represents a graph. The "AL" stands for adjaceny list, since the graph will hold the adjacency information using lists (as opposed to using an adjacency matrix ). In addition to the constructor, there are only two methods that a client will use to construct the graph: AddDEdge and AddUEdge . Method Description ALGraph(unsigned size) Constructs an ALGraph containing size nodes with IDs 1 through size . ~ALGraph(void) Destructor. AddDEdge(unsigned source, unsigned destination, unsigned weight) Adds a directed edge from source to destination to the graph. source and destination are node IDs. ( source , destination ) AddUEdge(unsigned node1, unsigned node2, unsigned weight) Adds an undirected edge to the graph. This will actually add two directed edges to the graph. One from node1 to node2 and another from node2 to node 1. node1 and node2 are node IDs. { node1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This lab report was uploaded on 04/18/2008 for the course CS 280 taught by Professor Mead during the Spring '07 term at DigiPen Institute of Technology.

Page1 / 2

- Programming Assignment#7 Submit file is due Thursday at 10:30 am Hard copy is due at the beginning of class the same day This assignment will

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online