Knotted should work now. I really was over-complicating it. I have commented the code and removed unused includes from the file.
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
#ifndef PROJECT2_INC_GRAPH_HPP
|
||||
#define PROJECT2_INC_GRAPH_HPP
|
||||
|
||||
#include <string> // string
|
||||
#include <vector> // vector<int>, vector<vector<int>
|
||||
#include <set> // set<int>.find()
|
||||
#include <string> // string -- not used?
|
||||
#include <vector> // vector<int>, vector<vector<int>
|
||||
|
||||
typedef std::vector<std::vector<int>> matrix;
|
||||
|
||||
@@ -26,11 +27,14 @@ class graph {
|
||||
// is the graph...
|
||||
bool reducible (); // ?
|
||||
bool knotted (); // ?
|
||||
|
||||
|
||||
// miscellaneous functions:
|
||||
// print the graph
|
||||
void print ();
|
||||
|
||||
bool DFS( int node, std::set<int>&visited, int parent );
|
||||
bool detectKnot();
|
||||
|
||||
private:
|
||||
int num_processes = 0;
|
||||
int num_resources = 0;
|
||||
@@ -38,4 +42,4 @@ class graph {
|
||||
matrix m; // Tell me, Mr. Anderson, what good is a phone call if you are unable to speak?
|
||||
};
|
||||
|
||||
#endif // PROJECT2_INC_GRAPH_HPP
|
||||
#endif // PROJECT2_INC_GRAPH_HPP
|
||||
|
||||
Reference in New Issue
Block a user