//******************************************************************************
//
// Cs361      : Fall 2003 Ohio University Travis Dillon
// Homework 6 : Network manager for large software company
// file       : graph.h
// started    : 10-14-03
// summary    : This is the header for the Graph class.
//
//******************************************************************************


#ifndef GRAPH_H
#define GRAPH_H

#include "node.h"

class Node;

class Graph
{
 public:
   Graph();

   void read_directed(istream& fin, ostream& fout);
   void read_num_vertices(istream& fin, ostream& fout);
   void read_vertices_name(istream& fin, ostream& fout);
   void read_num_edges(istream& fin, ostream& fout);
   void read_edges(istream& fin, ostream& fout);
   void read_start(istream& fin, ostream& fout);

   void insert_edge(ostream& fout, string from, string to, float the_weight);
   size_t get_id(ostream& fout, string in_name);
   void is_spanning(ostream& fout);
   void find_network();
   void simplify();

   void show_all(ostream& fout);

 private:
   list<Node>* array;  //array of pointers to lists
   vector<string> names;  //vector of strings of names of verticies
   size_t start_vertex;  //vertex that the bfs will begin with
   int num_vertices;  //number of vertices in the graph
   int num_edges;  //number of edges in the graph
   bool directed;  //true of the graph is directed, otherwise false
   bool spanning;  //true if the graph has a spanning tree
};

#endif  //GRAPH_H