-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrafo.hpp
43 lines (27 loc) · 798 Bytes
/
grafo.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef GRAFO_HPP_INCLUDED
#define GRAFO_HPP_INCLUDED
#include<iostream>
#include<list>
#include<queue>
#include<map>
#include"geom.hpp"
using namespace geom;
enum COLOR{BRANCO, CINZA, PRETO};
struct Vertice{
Ponto ponto;///Identificador no Mapa
Vertice* ant;
int dist;
COLOR cor;
std::list<Vertice> adj;
};
struct Grafo{
std::map<int, Vertice> grafo;
std::map<int, Vertice>::iterator it;
std::map<int, Vertice>::iterator it_;
void busca_largura_lab(Vertice* saida, Vertice* entrada);
Vertice* busca_vertice(Ponto p);
void caminho_curto(Ponto fonte,Ponto destino);
Vertice* busca_vertice_lista(std::list<Vertice*> lista, Vertice* desejado);
void busca_largura_ed(Vertice* entrada, Vertice* saida);
};
#endif // GRAFO_HPP_INCLUDED