altura private intancho private ArbolNodoarbol private java.util.List<java.util.List<ArbolNodo>>niveles private intsize intgetAltura() voidcalcularNiveles(ArbolNodo nodo,
+ int nivel) intgetAlturaRecursivo(ArbolNodo nodo) getAltura() intgetAncho() getAlturaRecursivo(ArbolNodo nodo) ArbolNodogetArbol() java.util.List<java.util.List<ArbolNodo>>getNiveles() booleaninsertar(int valor) voidsetAltura(int altura) voidsetAncho(int ancho) setAltura(int altura) intprivate int altura- +
private int ancho+
private java.util.List<java.util.List<ArbolNodo>> niveles
public void setAltura(int altura)- +
public int getAncho()-
public void setAncho(int ancho)+
public java.util.List<java.util.List<ArbolNodo>> getNiveles()
public int getAlturaRecursivo(ArbolNodo nodo)
public void calcularNiveles(ArbolNodo nodo, + int nivel)+
private voidgenerarGrafico()
-generarGrafico() voidprivate void generarGrafico()-
private ArbolNodo.Desdedesde private ArbolNodoizquerda private intvalor nivel private ArbolNodopadre private intx private inty valor ArbolNodo(int valor) ArbolNodo(int valor,
+ ArbolNodo padre) getDerecha() ArbolNodo.DesdegetDesde() ArbolNodogetIzquerda() intgetValor() getNivel() ArbolNodogetPadre() intgetX() getValor() intgetY() voidsetDerecha(ArbolNodo derecha) voidsetDesde(ArbolNodo.Desde desde) voidsetIzquerda(ArbolNodo izquerda) voidsetX(int x) setNivel(int nivel) voidsetY(int y) setPadre(ArbolNodo padre) private ArbolNodo padre+
private int valor- - - -
private int y-
private int x-
private ArbolNodo.Desde desde+
private int nivel
public ArbolNodo(int valor)+
public ArbolNodo(int valor, + ArbolNodo padre)
public ArbolNodo getPadre()+
public void setPadre(ArbolNodo padre)+
public int getValor()- +
public int getY()+
public int getNivel()
public void setY(int y)-
public int getX()-
public void setX(int x)-
public ArbolNodo.Desde getDesde()-
public void setDesde(ArbolNodo.Desde desde)+
public void setNivel(int nivel)
T - Generic objectpublic static interface Grafo.DFSVisitor<T>
+| Modifier and Type | +Method and Description | +
|---|---|
void |
+visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v)
+Called by the graph traversal methods when a vertex is first visited.
+ |
+
void |
+visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v,
+ Grafo.Edge<T> e)
+Used dfsSpanningTree to notify the visitor of each outgoing edge to an
+ unvisited vertex.
+ |
+
void visit(Grafo.Dirigido<T> g, + Grafo.Vertex<T> v)+
g - -
+ the graphv - -
+ the vertex being visited.void visit(Grafo.Dirigido<T> g, + Grafo.Vertex<T> v, + Grafo.Edge<T> e)+
g - -
+ the graphv - -
+ the vertex being visitede - -
+ the outgoing edge from vpublic static final class Grafo.Dirigido<T>
+extends java.lang.Object
+| Modifier and Type | +Field and Description | +
|---|---|
private java.util.List<Grafo.Edge<T>> |
+edges
+Vector of edges in the graph
+ |
+
private Grafo.Vertex<T> |
+rootVertex
+The vertex identified as the root of the graph
+ |
+
private java.util.List<Grafo.Vertex<T>> |
+verticies
+Vector of graph verticies
+ |
+
static int |
+VISIT_COLOR_BLACK
+Color used to mark nodes after descendants are completely visited
+ |
+
static int |
+VISIT_COLOR_GREY
+Color used to mark nodes as they are first visited in DFS order
+ |
+
static int |
+VISIT_COLOR_WHITE
+Color used to mark unvisited nodes
+ |
+
| Constructor and Description | +
|---|
Dirigido()
+Construct a new graph without any vertices or edges
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
boolean |
+addEdge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to,
+ int cost)
+Insert a directed, weighted Edge into the graph.
+ |
+
boolean |
+addVertex(Grafo.Vertex<T> v)
+Add a vertex to the graph
+ |
+
void |
+breadthFirstSearch(Grafo.Vertex<T> v,
+ Grafo.Visitor<T> visitor)
+Perform a breadth first search of this graph, starting at v.
+ |
+
<E extends java.lang.Exception> |
+breadthFirstSearch(Grafo.Vertex<T> v,
+ Grafo.VisitorEX<T,E> visitor)
+Perform a breadth first search of this graph, starting at v.
+ |
+
void |
+clearEdges()
+Clear the mark state of all edges in the graph by calling clearMark() on
+ all edges.
+ |
+
void |
+clearMark()
+Clear the mark state of all verticies in the graph by calling clearMark()
+ on all verticies.
+ |
+
<E extends java.lang.Exception> |
+depthFirstSearch(Grafo.Vertex<T> v,
+ Grafo.VisitorEX<T,E> visitor)
+Perform a depth first serach using recursion.
+ |
+
void |
+dfsSpanningTree(Grafo.Vertex<T> v,
+ Grafo.DFSVisitor<T> visitor)
+Find the spanning tree using a DFS starting from v.
+ |
+
Grafo.Edge<T>[] |
+findCycles()
+Search the graph for cycles.
+ |
+
Grafo.Vertex<T> |
+findVertexByData(T data,
+ java.util.Comparator<T> compare)
+Search the verticies for one with data.
+ |
+
Grafo.Vertex<T> |
+findVertexByName(java.lang.String name)
+Search the verticies for one with name.
+ |
+
java.util.List<Grafo.Edge<T>> |
+getEdges()
+Get the graph edges
+ |
+
Grafo.Vertex<T> |
+getRootVertex()
+Get the root vertex
+ |
+
Grafo.Vertex<T> |
+getVertex(int n)
+Get the given Vertex.
+ |
+
java.util.List<Grafo.Vertex<T>> |
+getVerticies()
+Get the graph verticies
+ |
+
boolean |
+insertBiEdge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to,
+ int cost)
+Insert a bidirectional Edge in the graph
+ |
+
boolean |
+isEmpty()
+Are there any verticies in the graph
+ |
+
boolean |
+removeEdge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to)
+Remove an Edge from the graph
+ |
+
boolean |
+removeVertex(Grafo.Vertex<T> v)
+Remove a vertex from the graph
+ |
+
void |
+setRootVertex(Grafo.Vertex<T> root)
+Set a root vertex.
+ |
+
int |
+size()
+Get the vertex count.
+ |
+
java.lang.String |
+toString() |
+
private void |
+visit(Grafo.Vertex<T> v,
+ java.util.ArrayList<Grafo.Edge<T>> cycleEdges) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final int VISIT_COLOR_WHITE+
public static final int VISIT_COLOR_GREY+
public static final int VISIT_COLOR_BLACK+
private java.util.List<Grafo.Vertex<T>> verticies+
private java.util.List<Grafo.Edge<T>> edges+
private Grafo.Vertex<T> rootVertex+
public Dirigido()+
public boolean isEmpty()+
public boolean addVertex(Grafo.Vertex<T> v)+
v - the Vertex to addpublic int size()+
public Grafo.Vertex<T> getRootVertex()+
public void setRootVertex(Grafo.Vertex<T> root)+
root - -
+ the vertex to set as the root and optionally add if it does not
+ exist in the graph.public Grafo.Vertex<T> getVertex(int n)+
n - the index [0, size()-1] of the Vertex to accesspublic java.util.List<Grafo.Vertex<T>> getVerticies()+
public boolean addEdge(Grafo.Vertex<T> from, + Grafo.Vertex<T> to, + int cost) + throws java.lang.IllegalArgumentException+
from - -
+ the Edge starting vertexto - -
+ the Edge ending vertexcost - -
+ the Edge weight/costjava.lang.IllegalArgumentException - if from/to are not verticies in the graphpublic boolean insertBiEdge(Grafo.Vertex<T> from, + Grafo.Vertex<T> to, + int cost) + throws java.lang.IllegalArgumentException+
from - -
+ the Edge starting vertexto - -
+ the Edge ending vertexcost - -
+ the Edge weight/costjava.lang.IllegalArgumentException - if from/to are not verticies in the graphpublic java.util.List<Grafo.Edge<T>> getEdges()+
public boolean removeVertex(Grafo.Vertex<T> v)+
v - the Vertex to removepublic boolean removeEdge(Grafo.Vertex<T> from, + Grafo.Vertex<T> to)+
from - -
+ the Edge starting vertexto - -
+ the Edge ending vertexpublic void clearMark()+
Grafo.Vertex.clearMark()public void clearEdges()+
public <E extends java.lang.Exception> void depthFirstSearch(Grafo.Vertex<T> v, + Grafo.VisitorEX<T,E> visitor) + throws E extends java.lang.Exception+
E - Exceptionv - -
+ the Vertex to start the search fromvisitor - -
+ the vistor to inform prior toE - if visitor.visit throws an exceptionE extends java.lang.Exceptionpublic void breadthFirstSearch(Grafo.Vertex<T> v, + Grafo.Visitor<T> visitor)+
v - -
+ the search starting pointvisitor - -
+ the vistor whose vist method is called prior to visting a vertex.public <E extends java.lang.Exception> void breadthFirstSearch(Grafo.Vertex<T> v, + Grafo.VisitorEX<T,E> visitor) + throws E extends java.lang.Exception+
E - -
+ exceptionv - -
+ the search starting pointvisitor - -
+ the vistor whose vist method is called prior to visting a vertex.E - if vistor.visit throws an exceptionE extends java.lang.Exceptionpublic void dfsSpanningTree(Grafo.Vertex<T> v, + Grafo.DFSVisitor<T> visitor)+
v - -
+ the vertex to start the search fromvisitor - -
+ visitor invoked after each vertex is visited and an edge is added
+ to the tree.public Grafo.Vertex<T> findVertexByName(java.lang.String name)+
name - -
+ the vertex namepublic Grafo.Vertex<T> findVertexByData(T data, + java.util.Comparator<T> compare)+
data - -
+ the vertex data to matchcompare - -
+ the comparator to perform the matchpublic Grafo.Edge<T>[] findCycles()+
private void visit(Grafo.Vertex<T> v, + java.util.ArrayList<Grafo.Edge<T>> cycleEdges)+
public java.lang.String toString()+
toString in class java.lang.ObjectT - Generic objectpublic static final class Grafo.Edge<T>
+extends java.lang.Object
+| Modifier and Type | +Field and Description | +
|---|---|
private int |
+cost |
+
private Grafo.Vertex<T> |
+from |
+
private boolean |
+mark |
+
private Grafo.Vertex<T> |
+to |
+
| Constructor and Description | +
|---|
Edge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to)
+Create a zero cost edge between from and to
+ |
+
Edge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to,
+ int cost)
+Create an edge between from and to with the given cost.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+clearMark()
+Clear the edge mark flag
+ |
+
int |
+getCost()
+Get the cost of the edge
+ |
+
Grafo.Vertex<T> |
+getFrom()
+Get the starting vertex
+ |
+
Grafo.Vertex<T> |
+getTo()
+Get the ending vertex
+ |
+
boolean |
+isMarked()
+Get the edge mark flag
+ |
+
void |
+mark()
+Set the mark flag of the edge
+ |
+
java.lang.String |
+toString()
+String rep of edge
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprivate Grafo.Vertex<T> from+
private Grafo.Vertex<T> to+
private int cost+
private boolean mark+
public Edge(Grafo.Vertex<T> from, + Grafo.Vertex<T> to)+
from - the starting vertexto - the ending vertexpublic Edge(Grafo.Vertex<T> from, + Grafo.Vertex<T> to, + int cost)+
from - the starting vertexto - the ending vertexcost - the cost of the edgepublic Grafo.Vertex<T> getTo()+
public Grafo.Vertex<T> getFrom()+
public int getCost()+
public void mark()+
public void clearMark()+
public boolean isMarked()+
public java.lang.String toString()+
toString in class java.lang.Objectpublic static final class Grafo.NoDirigido<T>
+extends java.lang.Object
+implements java.lang.Iterable<T>
+| Modifier and Type | +Field and Description | +
|---|---|
private java.util.Map<T,java.util.Set<T>> |
+mGraph |
+
| Constructor and Description | +
|---|
NoDirigido() |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+addEdge(T one,
+ T two)
+Given two nodes, adds an arc of that length between those nodes.
+ |
+
boolean |
+addNode(T node)
+Adds a new node to the graph.
+ |
+
boolean |
+containsNode(T node)
+Returns whether a given node is contained in the graph.
+ |
+
boolean |
+edgeExists(T one,
+ T two)
+Given two endpoints, returns whether an edge exists between them.
+ |
+
java.util.Set<T> |
+edgesFrom(T node)
+Given a node in the graph, returns an immutable view of the edges
+ leaving that node.
+ |
+
boolean |
+isEmpty()
+Returns whether the graph is empty.
+ |
+
java.util.Iterator<T> |
+iterator()
+Returns an iterator that can traverse the nodes in the graph.
+ |
+
boolean |
+nodeExists(T node)
+Given a node, returns whether that node exists in the graph.
+ |
+
void |
+removeEdge(T one,
+ T two)
+Removes the edge between the indicated endpoints from the graph.
+ |
+
boolean |
+removeNode(T node)
+Remove a node from the graph.
+ |
+
int |
+size()
+Returns the number of nodes in the graph.
+ |
+
java.lang.String |
+toString()
+Returns a human-readable representation of the graph.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic boolean addNode(T node)+
node - The node to add.public boolean removeNode(T node)+
node - The node to remove.public boolean nodeExists(T node)+
node - The node in question.public void addEdge(T one, + T two)+
one - The first node.two - The second node.java.util.NoSuchElementException - If either the start or destination nodes
+ do not exist.public void removeEdge(T one, + T two)+
one - The start node.two - The destination node.java.util.NoSuchElementException - If either node is not in the graph.public boolean edgeExists(T one, + T two)+
one - The first endpoint.two - The second endpoint.java.util.NoSuchElementException - If the endpoints are not nodes in the
+ graph.public java.util.Set<T> edgesFrom(T node)+
node - The node whose edges should be queried.java.util.NoSuchElementException - If the node does not exist.public boolean containsNode(T node)+
node - The node to test for inclusion.public java.util.Iterator<T> iterator()+
iterator in interface java.lang.Iterable<T>public int size()+
public boolean isEmpty()+
public java.lang.String toString()+
toString in class java.lang.Objectpublic static final class Grafo.Tipos
+extends java.lang.Object
+| Modifier and Type | +Field and Description | +
|---|---|
static int |
+DIRIGIDO
+Tipo de grafo dirigido.
+ |
+
static int |
+NO_DIRIGIDO
+Tipo de grafo no dirigido.
+ |
+
private int |
+tipo
+El tipo que está elegido.
+ |
+
| Constructor and Description | +
|---|
Tipos(int tipo)
+Inicilizar el tipo.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
int |
+getTipo()
+Devolver el tipo.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final int DIRIGIDO+
public static final int NO_DIRIGIDO+
private final int tipo+
T - Generic objectpublic static final class Grafo.Vertex<T>
+extends java.lang.Object
+| Modifier and Type | +Field and Description | +
|---|---|
private T |
+data |
+
private java.util.List<Grafo.Edge<T>> |
+incomingEdges |
+
private boolean |
+mark |
+
private int |
+markState |
+
private java.lang.String |
+name |
+
private java.util.List<Grafo.Edge<T>> |
+outgoingEdges |
+
| Constructor and Description | +
|---|
Vertex()
+Calls this(null, null).
+ |
+
Vertex(java.lang.String n)
+Create a vertex with the given name and no data
+ |
+
Vertex(java.lang.String n,
+ T data)
+Create a Vertex with name n and given data
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
boolean |
+addEdge(Grafo.Edge<T> e)
+Add an edge to the vertex.
+ |
+
void |
+addIncomingEdge(Grafo.Vertex<T> from,
+ int cost)
+Add an incoming edge starting at from
+ |
+
void |
+addOutgoingEdge(Grafo.Vertex<T> to,
+ int cost)
+Add an outgoing edge ending at to.
+ |
+
void |
+clearMark()
+Clear the visited mark flag.
+ |
+
int |
+cost(Grafo.Vertex<T> dest)
+What is the cost from this vertext to the dest vertex.
+ |
+
Grafo.Edge<T> |
+findEdge(Grafo.Edge<T> e)
+Search the outgoing edges for a match to e.
+ |
+
Grafo.Edge<T> |
+findEdge(Grafo.Vertex<T> dest)
+Search the outgoing edges looking for an edge whose's edge.to == dest.
+ |
+
T |
+getData() |
+
Grafo.Edge<T> |
+getIncomingEdge(int i)
+Get the ith incoming edge
+ |
+
int |
+getIncomingEdgeCount() |
+
java.util.List |
+getIncomingEdges()
+Get the incoming edges
+ |
+
int |
+getMarkState()
+Get the mark state value.
+ |
+
java.lang.String |
+getName() |
+
Grafo.Edge<T> |
+getOutgoingEdge(int i)
+Get the ith outgoing edge
+ |
+
int |
+getOutgoingEdgeCount() |
+
java.util.List |
+getOutgoingEdges()
+Get the outgoing edges
+ |
+
boolean |
+hasEdge(Grafo.Edge<T> e)
+Check the vertex for either an incoming or outgoing edge mathcing e.
+ |
+
boolean |
+hasEdge(Grafo.Vertex<T> dest)
+Is there an outgoing edge ending at dest.
+ |
+
void |
+mark()
+Set the vertex mark flag.
+ |
+
boolean |
+remove(Grafo.Edge<T> e)
+Remove an edge from this vertex
+ |
+
void |
+setData(T data) |
+
void |
+setMarkState(int state)
+Set the mark state to state.
+ |
+
java.lang.String |
+toString() |
+
void |
+visit()
+Visit the vertex and set the mark flag to true.
+ |
+
boolean |
+visited()
+Has this vertex been marked during a visit
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprivate java.util.List<Grafo.Edge<T>> incomingEdges+
private java.util.List<Grafo.Edge<T>> outgoingEdges+
private java.lang.String name+
private boolean mark+
private int markState+
private T data+
public Vertex()+
public Vertex(java.lang.String n)+
n - -
+ return npublic Vertex(java.lang.String n, + T data)+
n - -
+ name of vertexdata - -
+ data associated with vertexpublic java.lang.String getName()+
public T getData()+
public void setData(T data)+
data - The data to set.public boolean addEdge(Grafo.Edge<T> e)+
e - -
+ the edge to addpublic void addOutgoingEdge(Grafo.Vertex<T> to, + int cost)+
to - -
+ the destination vertexcost - the edge costpublic void addIncomingEdge(Grafo.Vertex<T> from, + int cost)+
from - -
+ the starting vertexcost - the edge costpublic boolean hasEdge(Grafo.Edge<T> e)+
e - the edge to checkpublic boolean remove(Grafo.Edge<T> e)+
e - -
+ the edge to removepublic int getIncomingEdgeCount()+
public Grafo.Edge<T> getIncomingEdge(int i)+
i - the index into incoming edgespublic java.util.List getIncomingEdges()+
public int getOutgoingEdgeCount()+
public Grafo.Edge<T> getOutgoingEdge(int i)+
i - the index into outgoing edgespublic java.util.List getOutgoingEdges()+
public Grafo.Edge<T> findEdge(Grafo.Vertex<T> dest)+
dest - the destinationpublic Grafo.Edge<T> findEdge(Grafo.Edge<T> e)+
e - -
+ the edge to checkpublic int cost(Grafo.Vertex<T> dest)+
dest - -
+ the destination vertex.public boolean hasEdge(Grafo.Vertex<T> dest)+
dest - -
+ the vertex to checkpublic boolean visited()+
public void mark()+
public void setMarkState(int state)+
state - the statepublic int getMarkState()+
public void visit()+
public void clearMark()+
public java.lang.String toString()+
toString in class java.lang.ObjectT - Generic objectpublic static interface Grafo.Visitor<T>
+| Modifier and Type | +Method and Description | +
|---|---|
void |
+visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v)
+Called by the graph traversal methods when a vertex is first visited.
+ |
+
void visit(Grafo.Dirigido<T> g, + Grafo.Vertex<T> v)+
g - -
+ the graphv - -
+ the vertex being visited.T - Generic objectE - Exceptionpublic static interface Grafo.VisitorEX<T,E extends java.lang.Exception>
+| Modifier and Type | +Method and Description | +
|---|---|
void |
+visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v)
+Called by the graph traversal methods when a vertex is first visited.
+ |
+
void visit(Grafo.Dirigido<T> g, + Grafo.Vertex<T> v) + throws E extends java.lang.Exception+
g - -
+ the graphv - -
+ the vertex being visited.E - exception for any errorE extends java.lang.Exceptionpublic class Grafo
+extends java.lang.Object
+| Modifier and Type | +Class and Description | +
|---|---|
static interface |
+Grafo.DFSVisitor<T>
+A spanning tree visitor callback interface
+ |
+
static class |
+Grafo.Dirigido<T> |
+
static class |
+Grafo.Edge<T>
+A directed, weighted edge in a graph
+ |
+
static class |
+Grafo.NoDirigido<T>
+Author: Keith Schwarz (htiek@cs.stanford.edu)
+ |
+
static class |
+Grafo.Tipos
+Esta clase contiene los tipos de grafo.
+ |
+
static class |
+Grafo.Vertex<T>
+A named graph vertex with optional data.
+ |
+
static interface |
+Grafo.Visitor<T>
+A graph visitor interface.
+ |
+
static interface |
+Grafo.VisitorEX<T,E extends java.lang.Exception>
+A graph visitor interface that can throw an exception during a visit
+ callback.
+ |
+
public class GrafoController
+extends java.lang.Object
+implements javafx.fxml.Initializable
+| Modifier and Type | +Field and Description | +
|---|---|
private javafx.scene.text.Text |
+codigoGrafo
+Donde va el codigo a mostrar a la pantalla.
+ |
+
private javafx.scene.canvas.Canvas |
+contenidoGrafo
+Donde poner el contenido de array.
+ |
+
private Grafo.Dirigido<GrafoNodo> |
+dirigido
+El grafo dirigido usado en la aplicación.
+ |
+
private Grafico |
+grafico
+Grafico rectangulos.
+ |
+
private GrafoNodo[] |
+grafoNodos
+Nodos.
+ |
+
private Grafo.Tipos |
+grafoTipos
+Tipo de grafo.
+ |
+
private Grafo.NoDirigido<GrafoNodo> |
+noDirigido
+El grafo no dirigido usado en la aplicación.
+ |
+
private java.util.ResourceBundle |
+resourceBundle
+Donde está guardado los idiomas.
+ |
+
private javafx.scene.Scene |
+scene
+La escena donde está cosas graficas.
+ |
+
private TextFieldLimited |
+valorGrafo
+La caja para el valor.
+ |
+
private TextFieldLimited |
+valorNodo1
+La caja por nodo 1.
+ |
+
private TextFieldLimited |
+valorNodo2
+La caja por nodo 2.
+ |
+
private static int |
+WEIGHT
+A static weight.
+ |
+
| Constructor and Description | +
|---|
GrafoController() |
+
| Modifier and Type | +Method and Description | +
|---|---|
protected void |
+botonEliminar()
+Eliminar un nodo del grafo.
+ |
+
protected void |
+botonEliminarEdge()
+Eliminar un edge del grafo y mostrar el codigo en la pantalla.
+ |
+
protected void |
+botonInsertar()
+Insertar un nodo en el grafo.
+ |
+
protected void |
+botonInsertarEdge()
+Insertar un edge al grafo y mostrar el codigo en la pantalla.
+ |
+
protected void |
+botonLlenar()
+LLenar el grafo con nodos y edges al azar.
+ |
+
protected void |
+botonVaciar()
+Eliminar el grafo.
+ |
+
private boolean |
+edgeExists(GrafoNodo nodo1,
+ GrafoNodo nodo2)
+Buscar un grafo dirigido para ver si existe en edge entre los nodos.
+ |
+
private void |
+generarGrafico()
+Generar la canvas con el grafo.
+ |
+
private GrafoNodo[] |
+getNodosEdge()
+Devolver los nodos que existen.
+ |
+
void |
+initialize(java.net.URL location,
+ java.util.ResourceBundle resourceBundle)
+Inicializar todos los datos y dibujar las graficas.
+ |
+
private void |
+initializeGrafo()
+Crear un grafo nuevo.
+ |
+
private int |
+textX(int x,
+ java.lang.String texto)
+Calcular la posición del texto basado en la cantidad de caracters.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprivate TextFieldLimited valorGrafo+
private TextFieldLimited valorNodo1+
private TextFieldLimited valorNodo2+
private javafx.scene.canvas.Canvas contenidoGrafo+
private javafx.scene.text.Text codigoGrafo+
private javafx.scene.Scene scene+
private java.util.ResourceBundle resourceBundle+
private Grafo.Tipos grafoTipos+
private Grafo.Dirigido<GrafoNodo> dirigido+
private Grafo.NoDirigido<GrafoNodo> noDirigido+
private Grafico grafico+
private GrafoNodo[] grafoNodos+
private static final int WEIGHT+
public void initialize(java.net.URL location, + java.util.ResourceBundle resourceBundle)+
initialize in interface javafx.fxml.Initializablelocation - URL: El URL de fxml en uso.resourceBundle - ResourceBundle: Tiene datos de idioma.protected void botonLlenar()+
protected void botonVaciar()+
protected void botonInsertar()+
protected void botonEliminar()+
protected void botonInsertarEdge()+
protected void botonEliminarEdge()+
private void initializeGrafo()+
private GrafoNodo[] getNodosEdge()+
private boolean edgeExists(GrafoNodo nodo1, + GrafoNodo nodo2)+
nodo1 - GrafoNodo: El primer nodo a buscar.nodo2 - GrafoNodo: El otro nodo a buscar.private void generarGrafico()+
private int textX(int x, + java.lang.String texto)+
x - int: La posición donde desea el texto.texto - String: El texto a posicionar.class GrafoNodo
+extends java.lang.Object
+| Modifier and Type | +Field and Description | +
|---|---|
private int |
+value |
+
| Constructor and Description | +
|---|
GrafoNodo(int value) |
+
| Modifier and Type | +Method and Description | +
|---|---|
int |
+getValue() |
+
void |
+setValue(int value) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprivate static enum Logs.DEBUG_TIPOS +extends java.lang.Enum<Logs.DEBUG_TIPOS>+
| Enum Constant and Description | +
|---|
ARCHIVO |
+
CONSOLA |
+
| Modifier and Type | +Method and Description | +
|---|---|
static Logs.DEBUG_TIPOS |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Logs.DEBUG_TIPOS[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetClass, notify, notifyAll, wait, wait, waitpublic static final Logs.DEBUG_TIPOS ARCHIVO+
public static final Logs.DEBUG_TIPOS CONSOLA+
public static Logs.DEBUG_TIPOS[] values()+
+for (Logs.DEBUG_TIPOS c : Logs.DEBUG_TIPOS.values()) + System.out.println(c); +
public static Logs.DEBUG_TIPOS valueOf(java.lang.String name)+
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null| Modifier and Type | +Class and Description | +
|---|---|
private static class |
+Logs.DEBUG_TIPOS
+Tipos de depuración.
+ |
+
static booleanDEBUG
+static Logs.DEBUG_TIPOSDEBUG_TIPO
+java.util.logging.FileHandlerfileHandler static java.lang.StringLOGFILE
static java.lang.StringLOGNAME
| Modifier and Type | Method and Description |
|---|---|
void |
+close()
+Cerrar el archivo.
+ |
+
static void |
+log(java.util.logging.Level level,
+ java.lang.Exception exception)
+Agregar un log al logger y agregar el stack trace.
+ |
+
static void |
log(java.util.logging.Level level,
java.lang.String mensaje)
-Agregar un log al logger.
+Agregar un log al logger con un mensaje.
+ |
+
static void |
+log(java.lang.String mensaje)
+Agregar un log al logger con un mensaje.
|
public static final boolean DEBUG+
public static final Logs.DEBUG_TIPOS DEBUG_TIPO+
public static final java.lang.String LOGNAME@@ -237,6 +317,15 @@ extends java.lang.Object
public java.util.logging.FileHandler fileHandler+
public Logs()-
public void close()+
public static void log(java.lang.String mensaje)+
mensaje - String: El mensaje de lo que pasó.public static void log(java.util.logging.Level level, + java.lang.String mensaje)+
level - Level: El tipo de error o mensaje que ha sido generado.mensaje - String: El mensaje de lo que pasó.public static void log(java.util.logging.Level level, - java.lang.String mensaje)-
level - Level: El tipo de error o mensaje que ha sido generado.mensaje - String: El mensaje de lo que pasó.exception - String: El mensaje de lo que pasó.static booleanDEBUG
-private static Logslogs
+voidstop() getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stopgetHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheetpublic static final boolean DEBUG-
private static Logs logs+
public void stop()+
stop in class javafx.application.Applicationprotected voidmenuGrafoDirigidos()
+protected voidmenuGrafoNoDirigidos()
+protected voidmenuHashTable()
protected voidmenuIngles()
protected voidmenuInsercion()
protected voidmenuListaEnlazadaCircular()
protected voidmenuListaEnlazadaDoble()
protected voidmenuListaEnlazadaSimple()
protected voidmenuMerge()
protected voidmenuPila()
protected voidmenuQuick()
protected voidmenuSeleccion()
protected voidmenuShell()
private voidopenFXML(java.lang.String fxml,
javafx.scene.Scene scene,
@@ -658,6 +670,26 @@ implements javafx.fxml.Initializable
Click en Arbol General.
+
+
+
+
+-
+
menuGrafoDirigidos
+protected void menuGrafoDirigidos()
+Click en Grafo Dirigidos.
+
+
+
+
+
+
+-
+
menuGrafoNoDirigidos
+protected void menuGrafoNoDirigidos()
+Click en Grafo No Dirigidos.
+
+
diff --git a/doc/cl/cromer/estructuras/MergeController.html b/doc/cl/cromer/estructuras/MergeController.html
index 82076ab..67ff2c1 100644
--- a/doc/cl/cromer/estructuras/MergeController.html
+++ b/doc/cl/cromer/estructuras/MergeController.html
@@ -2,10 +2,10 @@
-
+
MergeController
-
+
diff --git a/doc/cl/cromer/estructuras/Palabras.html b/doc/cl/cromer/estructuras/Palabras.html
index c1a165a..109551d 100644
--- a/doc/cl/cromer/estructuras/Palabras.html
+++ b/doc/cl/cromer/estructuras/Palabras.html
@@ -2,10 +2,10 @@
-
+
Palabras
-
+
diff --git a/doc/cl/cromer/estructuras/Pila.html b/doc/cl/cromer/estructuras/Pila.html
index 2ef2acb..456a6c0 100644
--- a/doc/cl/cromer/estructuras/Pila.html
+++ b/doc/cl/cromer/estructuras/Pila.html
@@ -2,10 +2,10 @@
-
+
Pila
-
+
diff --git a/doc/cl/cromer/estructuras/PilaController.html b/doc/cl/cromer/estructuras/PilaController.html
index a72a875..c2864d2 100644
--- a/doc/cl/cromer/estructuras/PilaController.html
+++ b/doc/cl/cromer/estructuras/PilaController.html
@@ -2,10 +2,10 @@
-
+
PilaController
-
+
diff --git a/doc/cl/cromer/estructuras/QuickController.html b/doc/cl/cromer/estructuras/QuickController.html
index f8b04fd..5c9f8e9 100644
--- a/doc/cl/cromer/estructuras/QuickController.html
+++ b/doc/cl/cromer/estructuras/QuickController.html
@@ -2,10 +2,10 @@
-
+
QuickController
-
+
diff --git a/doc/cl/cromer/estructuras/SeleccionController.html b/doc/cl/cromer/estructuras/SeleccionController.html
index 9eb4826..f6e796c 100644
--- a/doc/cl/cromer/estructuras/SeleccionController.html
+++ b/doc/cl/cromer/estructuras/SeleccionController.html
@@ -2,10 +2,10 @@
-
+
SeleccionController
-
+
diff --git a/doc/cl/cromer/estructuras/ShellController.html b/doc/cl/cromer/estructuras/ShellController.html
index 13eedf7..79d75a4 100644
--- a/doc/cl/cromer/estructuras/ShellController.html
+++ b/doc/cl/cromer/estructuras/ShellController.html
@@ -2,10 +2,10 @@
-
+
ShellController
-
+
diff --git a/doc/cl/cromer/estructuras/TablaHash.html b/doc/cl/cromer/estructuras/TablaHash.html
index 479f754..f692d5f 100644
--- a/doc/cl/cromer/estructuras/TablaHash.html
+++ b/doc/cl/cromer/estructuras/TablaHash.html
@@ -2,10 +2,10 @@
-
+
TablaHash
-
+
diff --git a/doc/cl/cromer/estructuras/TablaHashController.html b/doc/cl/cromer/estructuras/TablaHashController.html
index c3e9d82..31c6046 100644
--- a/doc/cl/cromer/estructuras/TablaHashController.html
+++ b/doc/cl/cromer/estructuras/TablaHashController.html
@@ -2,10 +2,10 @@
-
+
TablaHashController
-
+
diff --git a/doc/cl/cromer/estructuras/TextFieldLimited.StyleableProperties.html b/doc/cl/cromer/estructuras/TextFieldLimited.StyleableProperties.html
index b2aeb90..3467d6d 100644
--- a/doc/cl/cromer/estructuras/TextFieldLimited.StyleableProperties.html
+++ b/doc/cl/cromer/estructuras/TextFieldLimited.StyleableProperties.html
@@ -2,10 +2,10 @@
-
+
TextFieldLimited.StyleableProperties
-
+
diff --git a/doc/cl/cromer/estructuras/TextFieldLimited.html b/doc/cl/cromer/estructuras/TextFieldLimited.html
index 2da693e..df14760 100644
--- a/doc/cl/cromer/estructuras/TextFieldLimited.html
+++ b/doc/cl/cromer/estructuras/TextFieldLimited.html
@@ -2,10 +2,10 @@
-
+
TextFieldLimited
-
+
diff --git a/doc/cl/cromer/estructuras/class-use/Arbol.PrimerLado.html b/doc/cl/cromer/estructuras/class-use/Arbol.PrimerLado.html
index e72bb79..6459ae9 100644
--- a/doc/cl/cromer/estructuras/class-use/Arbol.PrimerLado.html
+++ b/doc/cl/cromer/estructuras/class-use/Arbol.PrimerLado.html
@@ -2,10 +2,10 @@
-
+
Uses of Class cl.cromer.estructuras.Arbol.PrimerLado
-
+
diff --git a/doc/cl/cromer/estructuras/class-use/Arbol.Tipos.html b/doc/cl/cromer/estructuras/class-use/Arbol.Tipos.html
index 23f7f84..7060957 100644
--- a/doc/cl/cromer/estructuras/class-use/Arbol.Tipos.html
+++ b/doc/cl/cromer/estructuras/class-use/Arbol.Tipos.html
@@ -2,10 +2,10 @@
-
+
Uses of Class cl.cromer.estructuras.Arbol.Tipos
-
+
diff --git a/doc/cl/cromer/estructuras/class-use/Arbol.html b/doc/cl/cromer/estructuras/class-use/Arbol.html
index ac88663..1bd8fb8 100644
--- a/doc/cl/cromer/estructuras/class-use/Arbol.html
+++ b/doc/cl/cromer/estructuras/class-use/Arbol.html
@@ -2,10 +2,10 @@
-
+
Uses of Class cl.cromer.estructuras.Arbol
-
+
diff --git a/doc/cl/cromer/estructuras/class-use/ArbolController.html b/doc/cl/cromer/estructuras/class-use/ArbolController.html
index aaeb90d..538b07e 100644
--- a/doc/cl/cromer/estructuras/class-use/ArbolController.html
+++ b/doc/cl/cromer/estructuras/class-use/ArbolController.html
@@ -2,10 +2,10 @@
-
+
Uses of Class cl.cromer.estructuras.ArbolController
-
+
diff --git a/doc/cl/cromer/estructuras/class-use/ArbolNodo.html b/doc/cl/cromer/estructuras/class-use/ArbolNodo.html
index 2b93558..8722cb5 100644
--- a/doc/cl/cromer/estructuras/class-use/ArbolNodo.html
+++ b/doc/cl/cromer/estructuras/class-use/ArbolNodo.html
@@ -2,10 +2,10 @@
-
+
Uses of Class cl.cromer.estructuras.ArbolNodo
-
+
@@ -99,6 +99,23 @@
private ArbolNodo
ArbolNodo.izquerda
private ArbolNodopadre | Modifier and Type | +Field and Description | +
|---|---|
private java.util.List<java.util.List<ArbolNodo>> |
+Arbol.niveles |
+
ArbolNodo |
ArbolNodo.getIzquerda() |
+
ArbolNodo |
+ArbolNodo.getPadre() |
+
| Modifier and Type | +Method and Description | +
|---|---|
java.util.List<java.util.List<ArbolNodo>> |
+Arbol.getNiveles() |
+
void |
+Arbol.calcularNiveles(ArbolNodo nodo,
+ int nivel) |
+
int |
Arbol.getAlturaRecursivo(ArbolNodo nodo) |
void |
ArbolNodo.setDerecha(ArbolNodo derecha) |
void |
ArbolNodo.setIzquerda(ArbolNodo izquerda) |
void |
+ArbolNodo.setPadre(ArbolNodo padre) |
+
| Constructor and Description | +
|---|
ArbolNodo(int valor,
+ ArbolNodo padre) |
+
private Graficografico
+grafico
private Graficografico
+private Graficografico
private Graficografico
private Graficografico
| Modifier and Type | +Method and Description | +
|---|---|
void |
+Grafo.Dirigido.dfsSpanningTree(Grafo.Vertex<T> v,
+ Grafo.DFSVisitor<T> visitor)
+Find the spanning tree using a DFS starting from v.
+ |
+
| Modifier and Type | +Field and Description | +
|---|---|
private Grafo.Dirigido<GrafoNodo> |
+GrafoController.dirigido
+El grafo dirigido usado en la aplicación.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+Grafo.Visitor.visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v)
+Called by the graph traversal methods when a vertex is first visited.
+ |
+
void |
+Grafo.VisitorEX.visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v)
+Called by the graph traversal methods when a vertex is first visited.
+ |
+
void |
+Grafo.DFSVisitor.visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v)
+Called by the graph traversal methods when a vertex is first visited.
+ |
+
void |
+Grafo.DFSVisitor.visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v,
+ Grafo.Edge<T> e)
+Used dfsSpanningTree to notify the visitor of each outgoing edge to an
+ unvisited vertex.
+ |
+
| Modifier and Type | +Field and Description | +
|---|---|
private java.util.List<Grafo.Edge<T>> |
+Grafo.Dirigido.edges
+Vector of edges in the graph
+ |
+
private java.util.List<Grafo.Edge<T>> |
+Grafo.Vertex.incomingEdges |
+
private java.util.List<Grafo.Edge<T>> |
+Grafo.Vertex.outgoingEdges |
+
| Modifier and Type | +Method and Description | +
|---|---|
Grafo.Edge<T>[] |
+Grafo.Dirigido.findCycles()
+Search the graph for cycles.
+ |
+
Grafo.Edge<T> |
+Grafo.Vertex.findEdge(Grafo.Edge<T> e)
+Search the outgoing edges for a match to e.
+ |
+
Grafo.Edge<T> |
+Grafo.Vertex.findEdge(Grafo.Vertex<T> dest)
+Search the outgoing edges looking for an edge whose's edge.to == dest.
+ |
+
Grafo.Edge<T> |
+Grafo.Vertex.getIncomingEdge(int i)
+Get the ith incoming edge
+ |
+
Grafo.Edge<T> |
+Grafo.Vertex.getOutgoingEdge(int i)
+Get the ith outgoing edge
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
java.util.List<Grafo.Edge<T>> |
+Grafo.Dirigido.getEdges()
+Get the graph edges
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
boolean |
+Grafo.Vertex.addEdge(Grafo.Edge<T> e)
+Add an edge to the vertex.
+ |
+
Grafo.Edge<T> |
+Grafo.Vertex.findEdge(Grafo.Edge<T> e)
+Search the outgoing edges for a match to e.
+ |
+
boolean |
+Grafo.Vertex.hasEdge(Grafo.Edge<T> e)
+Check the vertex for either an incoming or outgoing edge mathcing e.
+ |
+
boolean |
+Grafo.Vertex.remove(Grafo.Edge<T> e)
+Remove an edge from this vertex
+ |
+
void |
+Grafo.DFSVisitor.visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v,
+ Grafo.Edge<T> e)
+Used dfsSpanningTree to notify the visitor of each outgoing edge to an
+ unvisited vertex.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
private void |
+Grafo.Dirigido.visit(Grafo.Vertex<T> v,
+ java.util.ArrayList<Grafo.Edge<T>> cycleEdges) |
+
| Modifier and Type | +Field and Description | +
|---|---|
private Grafo.NoDirigido<GrafoNodo> |
+GrafoController.noDirigido
+El grafo no dirigido usado en la aplicación.
+ |
+
| Modifier and Type | +Field and Description | +
|---|---|
private Grafo.Tipos |
+GrafoController.grafoTipos
+Tipo de grafo.
+ |
+
| Modifier and Type | +Field and Description | +
|---|---|
private Grafo.Vertex<T> |
+Grafo.Edge.from |
+
private Grafo.Vertex<T> |
+Grafo.Dirigido.rootVertex
+The vertex identified as the root of the graph
+ |
+
private Grafo.Vertex<T> |
+Grafo.Edge.to |
+
| Modifier and Type | +Field and Description | +
|---|---|
private java.util.List<Grafo.Vertex<T>> |
+Grafo.Dirigido.verticies
+Vector of graph verticies
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
Grafo.Vertex<T> |
+Grafo.Dirigido.findVertexByData(T data,
+ java.util.Comparator<T> compare)
+Search the verticies for one with data.
+ |
+
Grafo.Vertex<T> |
+Grafo.Dirigido.findVertexByName(java.lang.String name)
+Search the verticies for one with name.
+ |
+
Grafo.Vertex<T> |
+Grafo.Edge.getFrom()
+Get the starting vertex
+ |
+
Grafo.Vertex<T> |
+Grafo.Dirigido.getRootVertex()
+Get the root vertex
+ |
+
Grafo.Vertex<T> |
+Grafo.Edge.getTo()
+Get the ending vertex
+ |
+
Grafo.Vertex<T> |
+Grafo.Dirigido.getVertex(int n)
+Get the given Vertex.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
java.util.List<Grafo.Vertex<T>> |
+Grafo.Dirigido.getVerticies()
+Get the graph verticies
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
boolean |
+Grafo.Dirigido.addEdge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to,
+ int cost)
+Insert a directed, weighted Edge into the graph.
+ |
+
boolean |
+Grafo.Dirigido.addEdge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to,
+ int cost)
+Insert a directed, weighted Edge into the graph.
+ |
+
void |
+Grafo.Vertex.addIncomingEdge(Grafo.Vertex<T> from,
+ int cost)
+Add an incoming edge starting at from
+ |
+
void |
+Grafo.Vertex.addOutgoingEdge(Grafo.Vertex<T> to,
+ int cost)
+Add an outgoing edge ending at to.
+ |
+
boolean |
+Grafo.Dirigido.addVertex(Grafo.Vertex<T> v)
+Add a vertex to the graph
+ |
+
void |
+Grafo.Dirigido.breadthFirstSearch(Grafo.Vertex<T> v,
+ Grafo.Visitor<T> visitor)
+Perform a breadth first search of this graph, starting at v.
+ |
+
<E extends java.lang.Exception> |
+Grafo.Dirigido.breadthFirstSearch(Grafo.Vertex<T> v,
+ Grafo.VisitorEX<T,E> visitor)
+Perform a breadth first search of this graph, starting at v.
+ |
+
int |
+Grafo.Vertex.cost(Grafo.Vertex<T> dest)
+What is the cost from this vertext to the dest vertex.
+ |
+
<E extends java.lang.Exception> |
+Grafo.Dirigido.depthFirstSearch(Grafo.Vertex<T> v,
+ Grafo.VisitorEX<T,E> visitor)
+Perform a depth first serach using recursion.
+ |
+
void |
+Grafo.Dirigido.dfsSpanningTree(Grafo.Vertex<T> v,
+ Grafo.DFSVisitor<T> visitor)
+Find the spanning tree using a DFS starting from v.
+ |
+
Grafo.Edge<T> |
+Grafo.Vertex.findEdge(Grafo.Vertex<T> dest)
+Search the outgoing edges looking for an edge whose's edge.to == dest.
+ |
+
boolean |
+Grafo.Vertex.hasEdge(Grafo.Vertex<T> dest)
+Is there an outgoing edge ending at dest.
+ |
+
boolean |
+Grafo.Dirigido.insertBiEdge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to,
+ int cost)
+Insert a bidirectional Edge in the graph
+ |
+
boolean |
+Grafo.Dirigido.insertBiEdge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to,
+ int cost)
+Insert a bidirectional Edge in the graph
+ |
+
boolean |
+Grafo.Dirigido.removeEdge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to)
+Remove an Edge from the graph
+ |
+
boolean |
+Grafo.Dirigido.removeEdge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to)
+Remove an Edge from the graph
+ |
+
boolean |
+Grafo.Dirigido.removeVertex(Grafo.Vertex<T> v)
+Remove a vertex from the graph
+ |
+
void |
+Grafo.Dirigido.setRootVertex(Grafo.Vertex<T> root)
+Set a root vertex.
+ |
+
void |
+Grafo.Visitor.visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v)
+Called by the graph traversal methods when a vertex is first visited.
+ |
+
void |
+Grafo.VisitorEX.visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v)
+Called by the graph traversal methods when a vertex is first visited.
+ |
+
void |
+Grafo.DFSVisitor.visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v)
+Called by the graph traversal methods when a vertex is first visited.
+ |
+
void |
+Grafo.DFSVisitor.visit(Grafo.Dirigido<T> g,
+ Grafo.Vertex<T> v,
+ Grafo.Edge<T> e)
+Used dfsSpanningTree to notify the visitor of each outgoing edge to an
+ unvisited vertex.
+ |
+
private void |
+Grafo.Dirigido.visit(Grafo.Vertex<T> v,
+ java.util.ArrayList<Grafo.Edge<T>> cycleEdges) |
+
| Constructor and Description | +
|---|
Edge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to)
+Create a zero cost edge between from and to
+ |
+
Edge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to)
+Create a zero cost edge between from and to
+ |
+
Edge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to,
+ int cost)
+Create an edge between from and to with the given cost.
+ |
+
Edge(Grafo.Vertex<T> from,
+ Grafo.Vertex<T> to,
+ int cost)
+Create an edge between from and to with the given cost.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
void |
+Grafo.Dirigido.breadthFirstSearch(Grafo.Vertex<T> v,
+ Grafo.Visitor<T> visitor)
+Perform a breadth first search of this graph, starting at v.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
<E extends java.lang.Exception> |
+Grafo.Dirigido.breadthFirstSearch(Grafo.Vertex<T> v,
+ Grafo.VisitorEX<T,E> visitor)
+Perform a breadth first search of this graph, starting at v.
+ |
+
<E extends java.lang.Exception> |
+Grafo.Dirigido.depthFirstSearch(Grafo.Vertex<T> v,
+ Grafo.VisitorEX<T,E> visitor)
+Perform a depth first serach using recursion.
+ |
+
| Modifier and Type | +Field and Description | +
|---|---|
private GrafoNodo[] |
+GrafoController.grafoNodos
+Nodos.
+ |
+
| Modifier and Type | +Field and Description | +
|---|---|
private Grafo.Dirigido<GrafoNodo> |
+GrafoController.dirigido
+El grafo dirigido usado en la aplicación.
+ |
+
private Grafo.NoDirigido<GrafoNodo> |
+GrafoController.noDirigido
+El grafo no dirigido usado en la aplicación.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
private GrafoNodo[] |
+GrafoController.getNodosEdge()
+Devolver los nodos que existen.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
private boolean |
+GrafoController.edgeExists(GrafoNodo nodo1,
+ GrafoNodo nodo2)
+Buscar un grafo dirigido para ver si existe en edge entre los nodos.
+ |
+
| Modifier and Type | +Field and Description | +
|---|---|
static Logs.DEBUG_TIPOS |
+Logs.DEBUG_TIPO
+Tipo de depuración a usar.
+ |
+
| Modifier and Type | +Method and Description | +
|---|---|
static Logs.DEBUG_TIPOS |
+Logs.DEBUG_TIPOS.valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Logs.DEBUG_TIPOS[] |
+Logs.DEBUG_TIPOS.values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
| Modifier and Type | +Field and Description | +
|---|---|
private static Logs |
+Main.logs
+El logger.
+ |
+
private TextFieldLimitedvalorGrafo
+private TextFieldLimitedvalorHashTable
private TextFieldLimitedvalorLista
private TextFieldLimitedvalorNodo1
+private TextFieldLimitedvalorNodo2
+private TextFieldLimitedvalorPila
ListaEnlaceNormal y ListaEnlaceCircular.| Modifier and Type | +Constant Field | +Value | +
|---|---|---|
+
+public static final int |
+VISIT_COLOR_BLACK |
+3 |
+
+
+public static final int |
+VISIT_COLOR_GREY |
+2 |
+
+
+public static final int |
+VISIT_COLOR_WHITE |
+1 |
+
| Modifier and Type | +Constant Field | +Value | +
|---|---|---|
+
+public static final int |
+DIRIGIDO |
+0 |
+
+
+public static final int |
+NO_DIRIGIDO |
+1 |
+
| Modifier and Type | +Constant Field | +Value | +
|---|---|---|
+
+private static final int |
+WEIGHT |
+0 |
+
| Modifier and Type | @@ -263,13 +341,20 @@||
|---|---|---|
+
+public static final boolean |
+DEBUG |
+true |
+
public static final java.lang.String |
LOGFILE |
"./EDD.log" |
public static final java.lang.String |
@@ -279,25 +364,6 @@
| Modifier and Type | -Constant Field | -Value | -
|---|---|---|
-
-public static final boolean |
-DEBUG |
-true |
-