nick.graph
Class Vertex<E>
java.lang.Object
nick.graph.GraphElement<E>
nick.graph.Vertex<E>
public class Vertex<E>
- extends GraphElement<E>
A basic vertex class which extends the GraphElement class.
A graph G = (V, E) is comprised of a set of vertices (V) and edges (E). The
set of edges are comprised of {u, v} edge pairs of vertices in G. The nodes
or vertices of a graph may or may not be connected to other vertices in the
graph via edges.
Note that it is more natural that a vertex have a name before a data value.
The ordering of constructor parameters is reversed compared to the parent
class.
- Version:
- March 13, 2009
- Author:
- Nick Aschenbach
Constructor Summary |
Vertex(java.lang.String the_name)
Construct a new Vertex object. |
Vertex(java.lang.String the_name,
E the_data)
Construct a new Vertex object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Vertex
public Vertex(java.lang.String the_name)
- Construct a new Vertex object.
- Parameters:
the_name
- Set the name of this vertex.
Vertex
public Vertex(java.lang.String the_name,
E the_data)
- Construct a new Vertex object.
- Parameters:
the_data
- Set the data of this vertex.the_name
- Set the name of this vertex.