Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #ifndef _INCLUDE_GRAPH_
  2. #define _INCLUDE_GRAPH_
  3.  
  4. #pragma once
  5.  
  6. #define SPEED 4
  7.  
  8. typedef struct NItem
  9. {
  10. int nKey; //nr wierzchołka sąsiada
  11. double length; //długość
  12. double time; //czas
  13. NItem* pNext; //na kolejne pudelko w liscie sasiedzsta
  14. }List;
  15.  
  16. typedef struct
  17. {
  18. List* nList; //Lista sąsiedztw
  19. int Type; //Shop or not
  20. int NearestShop; //indeks najblizszego sklepu
  21. double WayToShop; //suma dlugosci
  22. int* WhichVertex; //nr węzła który jest najbliższym sklepem
  23. double TimeAll; //czas przejścia całości
  24. }Vertex;
  25.  
  26. double Dijkstra( Vertex*, int, int); // tu trzeba uzyc headera z prior queue
  27. void DFS(Vertex*, int, int*); // metoda przegladania grafu w glab obliczyc czasy przejscia pomiedzy wierzcholkami
  28.  
  29. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement