daily pastebin goal
78%
SHARE
TWEET

graph.h

a guest Jan 23rd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma once
  2.  
  3. // directed graph
  4. class graph
  5. {
  6. public:
  7.     graph(int size);
  8.     ~graph();
  9.  
  10.     void getGraphInfo();
  11.     int searchVertex(int vertexName);
  12.  
  13.     void insertVertex(int vertexName);
  14.     void insertEdge(int firstVertexName, int secondVertexName);
  15.  
  16.     void removeVertex(int vertexName);
  17.     void removeEdge(int firstVertexName, int secondVertexName);
  18.  
  19.     void depthFirstSearch(int vartexName);
  20.  
  21. private:
  22.     bool **adjacencyMatrix;
  23.     int *vertexNames;
  24.  
  25.     int currentVertexNumber;
  26.     int matrixSize;
  27.     int edgeNumber;
  28. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top