El Collections Framework de Java ofrece un conjunto
amplio de tipos pero no está orientado a la docencia.
Otras bibliotecas que incluyen algunos libros de
texto sobre estructuras de datos y algoritmos o bien
no están actualizadas (no usan tipos parametrizados
por ejemplo) o no contienen algunos tipos que
consideramos interesantes para implementar algoritmos
sobre grafos (por ejemplo una cola con prioridad
modificable). En este trabajo se presenta una
biblioteca de tipos en Java que incluye algunas características
que la hacen idónea para ser usada en
cursos de estructuras de datos y algoritmos. En concreto:
ofrece tipos adicionales (árbol general, grafo
y cola con prioridad modificable); cada tipo tiene
un método para obtener el coste (número de operaciones
realizadas sobre los datos) del último método
ejecutado; todos los tipos disponen de un método
para mostrar la estructura interna; ofrece tipos para
la generación gráficas de costes; y la obtención de
las instancias se realiza a través de clases de factoría.
Mediante el uso de esta biblioteca es posible diseñar
actividades (presenciales o autónomas) para que los
alumnos analicen las implicaciones que tienen diferentes
implementaciones del tipo de datos sobre el
coste de las operaciones o visualicen la evolución de
la estructura al llamar a una serie de métodos.SUMMARY -- The Java Collections Framework offers a considerable
amount of types (possible too many for introductory
courses on data structures and algorithms).
Other libraries included in textbooks are not up to
date (they do not offer parametrized types for instance)
or do not contain some data types that are interesting
to implement graph algorithms (as a modifiable
priority queue). In this work we present a Java
data type library that includes some valuable characteristics
to teach data structures and algorithms.
These are: it offers additional types such as general
tree, graph, and modifiable priority queue; all the
data types offer methods to obtain the cost of the
last operation, and to show the internal structure; it
offers a type that allows to create cost plots hidding
details about Input/Output and gnuplot; and, only interfaces
and factory clases are public thus hidding
the implementation.With this library it is possible to
design learning activities, so that students can study
how the different implementations affect the cost or
to see how the internal structure evolves as a result
of calling some methods.Peer Reviewe