34 lines
721 B
C++
34 lines
721 B
C++
|
|
#ifndef PROJECT2_GRAPH_HPP_INCLUDED
|
|
#define PROJECT2_GRAPH_HPP_INCLUDED
|
|
|
|
#include <string> // string
|
|
#include <vector> // vector<int>, vector<vector<int>
|
|
|
|
class graph {
|
|
public:
|
|
// Constructors
|
|
graph() {}
|
|
// Initializers:
|
|
// Read a graph from a file
|
|
int read(std::string filename);
|
|
|
|
// check functions:
|
|
// is the graph...
|
|
bool reducible();// ?
|
|
bool knotted();// ?
|
|
|
|
// miscellaneous functions:
|
|
// print the graph
|
|
void print ();
|
|
|
|
typedef std::vector<std::vector<int>> matrix;
|
|
|
|
private:
|
|
int num_processes = 0;
|
|
int num_resources = 0;
|
|
std::vector<int> resource_counts;
|
|
matrix m; // Tell me, Mr. Anderson, what good is a phone call if you are unable to speak?
|
|
};
|
|
|
|
#endif |