|
net.datastructures - version 5.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.datastructures.HashTableMap<Object,Object>
net.datastructures.AdjacencyListGraph.MyPosition<V>
net.datastructures.AdjacencyListGraph.MyVertex<V>
protected class AdjacencyListGraph.MyVertex<V>
Implementation of a vertex for an undirected adjacency list graph. Each vertex stores its incidence container and position in the vertex container of the graph.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.datastructures.HashTableMap |
---|
HashTableMap.HashEntry<K,V> |
Field Summary | |
---|---|
protected PositionList<Edge<E>> |
incEdges
Incidence container of the vertex. |
protected Position<Vertex<V>> |
loc
Position of the vertex in the vertex container of the graph. |
Fields inherited from class net.datastructures.AdjacencyListGraph.MyPosition |
---|
elem |
Fields inherited from class net.datastructures.HashTableMap |
---|
AVAILABLE, bucket, capacity, n, prime, scale, shift |
Method Summary | |
---|---|
int |
degree()
Return the degree of a given vertex |
Iterable<Edge<E>> |
incidentEdges()
Returns the incident edges on this vertex. |
Position<Edge<E>> |
insertIncidence(Edge<E> e)
Inserts an edge into the incidence container of this vertex. |
Position<Vertex<V>> |
location()
Returns the position of this vertex in the vertex container of the graph. |
void |
removeIncidence(Position<Edge<E>> p)
Removes an edge from the incidence container of this vertex. |
void |
setLocation(Position<Vertex<V>> p)
Sets the position of this vertex in the vertex container of the graph. |
String |
toString()
Returns a string representation of the element stored at this vertex. |
Methods inherited from class net.datastructures.AdjacencyListGraph.MyPosition |
---|
element, setElement |
Methods inherited from class net.datastructures.HashTableMap |
---|
checkKey, entrySet, findEntry, get, hashValue, isEmpty, keySet, put, rehash, remove, size, values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.datastructures.Position |
---|
element |
Methods inherited from interface net.datastructures.Map |
---|
entrySet, get, isEmpty, keySet, put, remove, size, values |
Field Detail |
---|
protected PositionList<Edge<E>> incEdges
protected Position<Vertex<V>> loc
Method Detail |
---|
public int degree()
public Iterable<Edge<E>> incidentEdges()
public Position<Edge<E>> insertIncidence(Edge<E> e)
public void removeIncidence(Position<Edge<E>> p)
public Position<Vertex<V>> location()
public void setLocation(Position<Vertex<V>> p)
public String toString()
toString
in class Object
|
net.datastructures - version 5.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |