Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #ifndef GRAPHTYPE_H_INCLUDED
  2. #define GRAPHTYPE_H_INCLUDED
  3. #include "stacktype.h"
  4. #include "quetype.h"
  5. template<class VertexType>
  6. class GraphType
  7. {
  8. public:
  9. GraphType();
  10. GraphType(int maxV);
  11. ~GraphType();
  12. void MakeEmpty();
  13. bool IsEmpty();
  14. bool IsFull();
  15. void Addvertex(VertexType);
  16. void AddEdge(VertexType, VertexType, int);
  17. int WeightIs(VertexType, QueType<VertexType>&);
  18. void GetToVertices(VertexType, QueType<VertexType>&);
  19. void ClearMarks();
  20. void MarkVertex(VertexType);
  21. bool IsMarked(VertexType);
  22. void DepthFirstSearch(VertexType, VertexType);
  23. void BreadthFirstSearch(VertexType, VertexType);
  24. private:
  25. int numVertices;
  26. int maxVertices;
  27. VertexType* vertices;
  28. int **edges;
  29. bool* marks;
  30. };
  31.  
  32.  
  33. #endif // GRAPHTYPE_H_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement