Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#ifndef _GRAPH_H
#define _GRAPH_H
#include <iostream>
#include <vector>
#include <algorithm>
#include "helper.h"
class Graph {
std::vector< std::vector<bool> > connections;
public:
Graph(const int &numberOfNodes);
void connectNodes(const int &node1, const int &node2);
void disconnectNodes(const int &node1, const int &node2);
void printAdjacencyMatrix();
bool isPath(const int &node1, const int &node2);
bool searchPath(const int &node1, const int &node2, std::vector<int> *visitedNodes);
bool isConnected();
};
#endif //_GRAPH_H