|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AlgoritmosEmGrafos
Method Summary | |
---|---|
java.util.Collection<Aresta> |
agmUsandoKruskall(Grafo g)
Retorna a árvore geradora mínima utilizando o algoritmo Kruskall. |
java.util.Collection<Aresta> |
agmUsandoPrim(Grafo g)
Retorna a árvore geradora mínima utilizando o algoritmo Prim. |
java.util.Collection<Aresta> |
arestasDeArvore(Grafo g)
Arestas de arvore. |
java.util.Collection<Aresta> |
arestasDeAvanco(Grafo g)
Arestas de avanço. |
java.util.Collection<Aresta> |
arestasDeCruzamento(Grafo g)
Arestas de cruzamento. |
java.util.Collection<Aresta> |
arestasDeRetorno(Grafo g)
Arestas de retorno. |
java.util.ArrayList<Aresta> |
caminhoMaisCurto(Grafo g,
Vertice origem,
Vertice destino)
Retorna (em ordem) as arestas que compoem o caminho mais curto entre um par de vértices. |
Grafo |
carregarGrafo(java.lang.String path,
TipoDeRepresentacao t)
Carrega grafo do arquivo texto. |
java.util.Collection<java.util.Collection<Vertice>> |
componentesFortementeConectados(Grafo g)
Retorna todos os conjuntos de vértice fortemente conectados. |
double |
custoDaArvoreGeradora(Grafo g,
java.util.Collection<Aresta> arestas)
Calcula o custo de uma árvore geradora. |
double |
custoDoCaminho(Grafo g,
java.util.ArrayList<Aresta> arestas,
Vertice origem,
Vertice destino)
Dado um caminho, esta função calcula o custo do caminho. |
boolean |
ehArvoreGeradora(Grafo g,
java.util.Collection<Aresta> arestas)
Testa se a árvore é geradora. |
boolean |
ehCaminho(java.util.ArrayList<Aresta> arestas,
Vertice origem,
Vertice destino)
Verifica se a sequencia de arestas é caminho entre oriem e destino. |
boolean |
existeCiclo(Grafo g)
Verifica se existe ciclo no grafo. |
java.util.ArrayList<java.util.ArrayList<Vertice>> |
ordenacaoTopologica(Grafo g)
Retorna (em ordem) todos os conjuntos da ordenação topológica. |
Method Detail |
---|
Grafo carregarGrafo(java.lang.String path, TipoDeRepresentacao t) throws java.lang.Exception
path
-
java.lang.Exception
- Caminho inválido ou árquivo fora do padrão.boolean existeCiclo(Grafo g)
g
- Grafo.
java.util.Collection<java.util.Collection<Vertice>> componentesFortementeConectados(Grafo g)
g
- O grafo.
java.util.ArrayList<java.util.ArrayList<Vertice>> ordenacaoTopologica(Grafo g)
g
- O grafo.
java.util.Collection<Aresta> agmUsandoPrim(Grafo g)
g
- O grafo.
java.util.Collection<Aresta> agmUsandoKruskall(Grafo g)
g
- O grafo.
double custoDaArvoreGeradora(Grafo g, java.util.Collection<Aresta> arestas) throws java.lang.Exception
arestas
- As arestas que compoem a árvore geradora.g
- O grafo.
java.lang.Exception
- Se a árvore apresentada não é geradora do grafo.boolean ehArvoreGeradora(Grafo g, java.util.Collection<Aresta> arestas)
g
- arestas
-
java.util.ArrayList<Aresta> caminhoMaisCurto(Grafo g, Vertice origem, Vertice destino)
g
- origem
- destino
-
double custoDoCaminho(Grafo g, java.util.ArrayList<Aresta> arestas, Vertice origem, Vertice destino) throws java.lang.Exception
arestas
- g
- origem
- destino
-
java.lang.Exception
- Se a sequencia apresentada não é um caminho
entre origem e destino.boolean ehCaminho(java.util.ArrayList<Aresta> arestas, Vertice origem, Vertice destino)
arestas
- origem
- destino
-
java.util.Collection<Aresta> arestasDeArvore(Grafo g)
g
-
java.util.Collection<Aresta> arestasDeRetorno(Grafo g)
g
-
java.util.Collection<Aresta> arestasDeAvanco(Grafo g)
g
-
java.util.Collection<Aresta> arestasDeCruzamento(Grafo g)
g
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |