4600-project-2/inc/graph.hpp

34 lines
721 B
C++
Raw Normal View History

2022-04-17 00:03:38 +00:00
#ifndef PROJECT2_GRAPH_HPP_INCLUDED
#define PROJECT2_GRAPH_HPP_INCLUDED
#include <string> // string
#include <vector> // vector<int>, vector<vector<int>
2022-04-18 03:03:17 +00:00
class graph {
public:
// Constructors
2022-04-22 23:48:36 +00:00
graph() {}
2022-04-18 03:03:17 +00:00
// Initializers:
// Read a graph from a file
2022-04-23 09:47:55 +00:00
int read(std::string filename);
2022-04-18 03:03:17 +00:00
// check functions:
// is the graph...
bool reducible();// ?
bool knotted();// ?
2022-04-22 23:48:36 +00:00
// miscellaneous functions:
// print the graph
void print ();
2022-04-23 09:47:55 +00:00
typedef std::vector<std::vector<int>> matrix;
2022-04-22 23:48:36 +00:00
private:
int num_processes = 0;
int num_resources = 0;
std::vector<int> resource_counts;
2022-04-23 09:47:55 +00:00
matrix m; // Tell me, Mr. Anderson, what good is a phone call if you are unable to speak?
};
#endif