// file: graph.h // // class for graph abstract data type // not an STL class itself but uses STL classes // #ifndef GRAPH_H #define GRAPH_H #include #include #include using namespace std; class graph { public: // constructors graph (unsigned int n); graph (unsigned int n, int directed); // operations virtual void build(); virtual void print(); protected: // data fields int size; // number of vertices int id; // used to record path in recursive // searches int direct; // boolean field vector labels; // vertex labels vector > adjacent;// adjacency matrix vector > temp; // for calculation }; class weightedGraph : public graph { public: // constructors weightedGraph (unsigned int n); weightedGraph (unsigned int n, int directed); // operations void build (); // use terminal input void build (char * filename); // use file input }; int DetermineSize (); #endif