Header File for Graph

#ifndef GRAPH_H
#define GRAPH_H

#include <string>
#include "Node.h"
#include "Edge.h"

class Graph
{
 public:
  Graph() { anchor = NULL; }
  int addNode(string);
  int addEdge(string,string);
  void print();
  void dfs();
  void bfs();
  void connectedComp();
 private:
  Node *anchor;
  Node* findNode(string);
  void dfs(Node*);
  void unMarkNodes();
  Node* someUnmarked();
  void bfs(Node *,int);
};

#endif


Email Me | Office Hours | My Home Page | Department Home | MCC Home Page

© Copyright Emmi Schatz 2001