Árboles Binarios

Hoy les quiero compartir para el que necesite la definición de un árbol binario programado en Java por mi. Lo subí al Wikipedia y espero que este bastante tiempo allí. Modifique el artículo para que contenga la definición en este lenguaje. El link: http://es.wikipedia.org/wiki/Arbol_binario
Está escrito basicamente para contener un dato del tipo int, pero si quisieran que contenga un String solamente deben reemplazar el tipo de variable y en los métodos setters y getters.
Estuve buscando algún grupo de clases para poder dibujar estos árboles y/o grafos y encontré uno bastante piola. Estoy bajandolo y experimentando un poco pero parece bastante fácil de adaptar a cualquier proyecto en Java. Su nombre es JUNG: Java Universal Network/Graph Framework. Interesante es que uno de sus creadores fue un estudiante de la Universidad de California y actualmente es Ingeniero en Software y trabaja nada más y nada menos que en Google. Su nombre: Joshua O'Madadhain. Les dejo unos links de los demos que figuran en la página. Están realmente completos:

Jung-2.0 Demos:

WorldMapGraphDemo
The background image transforms along with the graph.

AnimatingAddNodeDemo
The old AddNodeDemo, but with animated transitions

ShowLayouts2
The old ShowLayouts demo, but with animated transitions

Tree Node Collapse Demo
Demonstrates how to hide/show children of tree nodes.

Vertex Collapse Demo
Demonstrates how to collapse vertices into a single vertex

Label As Vertex Demo
Demonstrates how to use the vertex labels as the vertex shape.

Lens Vertex Image Demo
Demonstrates the use of a magnifier on a graph using icons for vertices.

Annotations Demo
Demonstrates an annotations layer for a graph. Draw arbitrary shapes and text over and under the graph visualization.

Tree Layout
Demonstrates TreeLayout and an animated transition to RadialLayout

Radial Layout
Shows a radial layout for Trees or Forests

Balloon Layout
Demonstrates Tree Layout and Balloon Layout for a Tree.

Minimum Spanning Tree
Demonstrates how to extract Minimum Spanning Trees from a Graph, configure them with TreeLayout, then display the original graph in a hierarchical form.

Comentarios

  1. sabes de algun tutorial sobre jung que me seria de gran ayuda
    Gracias

    ResponderBorrar

Publicar un comentario