Skip to content
Home arrow News arrow New project added: Directed Graph
New project added: Directed Graph
Friday, 20 April 2007

New project added to the "University" section: a directed graph definition and implementation in Java 1.5.

A directed graph is composed of a set of vertices (or nodes) and a set of ordered pairs of vertices, called directed edges, arcs, or arrows.

This assignment was developed with Java 5.0. It consisted in defining and implementing:

  • The class Arco<T> (arc).
  • The interface Vertices<T>, which inherits from Iterable<T>. It has the operations insert, delete, size and isElement.
  • The interface Grafo<T> (graph), which inherits from Vertices<T> and have the operations insertArc, deleteArc, size, isElement, adjacents, previous and following.
  • The class GrafoLAdj<T> which uses a List<List> to store the graph.
  • The interface GrafoAciclico<T> (acyclic graph) which extends Grafo<T> with the operations navigable, path and minimumPath (implemented recursively).
  • The class GrafoAciclicoLAdj<T>, which implements GrafoAciclico<T>, inherits from GrafoLAdj<T> and redefine the operation insertArc to make it acyclic.
 
< Prev   Next >