//******************************************************************************
//
// Cs361 : Fall 2003 Ohio University Travis Dillon
// Homework 8 : President of railroad 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();
~Graph();
void read_num_vertices(istream& fin, ostream& fout);
void read_vertices_name(istream& fin, ostream& fout);
void read_travel_time(istream& fin, ostream& fout);
void read_existing_links(istream& fin, ostream& fout);
void read_demand(istream& fin, ostream& fout);
void read_cost_of_link(istream& fin, ostream& fout);
void read_funds_remaining(istream& fin, ostream& fout);
float get_length(size_t from, size_t to);
void shortest_path(ostream& fout);
size_t choose(const float dist[], const bool set[]);
void compute_people_minutes(ostream& fout);
double compute_people_minutes(ostream& fout, size_t from, size_t to);
void choose_new_connections(istream& fin, ostream& fout);
private:
list<Node> cheapest_edges; //keeps the unmade links inorder
vector<string> names; //vector of strings of names of verticies
double people_minutes; //total time people travel
int funds_remaining; //money left for building
int num_vertices; //number of cities in the graph
size_t** where_from; //all pairs shortest paths
size_t** existing_links; //0 no link, 1 link exist
size_t** demand; //number of people wanting to travel
double** travel_time; //time to go from a to b
double** cost_of_link; //cost of a new RR track from a to b
};
#endif //GRAPH_H