public class DirectedDfsVertex<E extends DfsEdgeData> extends DirectedEdgeDataVertex<E> implements EdgeTypeDfsVertex<E>
DEFAULT_DISCOVERY_TIME, DEFAULT_FINISH_TIME, FIRST_DISCOVERY_TIME
Constructor and Description |
---|
DirectedDfsVertex(EdgeDataFactory<E> edgeDataFactory)
Constructor from an EdgeDataFactory
|
Modifier and Type | Method and Description |
---|---|
Color |
getColor()
Get the vertex color
|
int |
getDiscoveryTime()
Get the vertex's discovery time
|
EdgeType |
getEdgeType(EdgeTypeVertex<E> to)
Retrieve the type of the edge from the calling vertex to the vertex passed
as parameter.
|
int |
getFinishTime()
Get the vertex's finish time
|
ChildVertex |
getParent()
Get the vertex's parent
|
void |
setColor(Color color)
Set the vertex color
|
void |
setDiscoveryTime(int discoveryTime)
Set the time at which the vertex was discovered
|
void |
setEdgeType(EdgeTypeVertex<E> to,
EdgeType edgeType)
Set the type of the edge from the calling vertex to the vertex passed
as parameter
|
void |
setFinishTime(int finishTime)
Set the time at which the vertex visit was finished
|
void |
setParent(ChildVertex parent)
Set the parent of the given vertex
|
addAdjacency, adjacencyCount, clearAdjacencies, containsAdjacency, getAdjacencies, getEdgeData, hasAdjacencies, removeAdjacency
equals, getGraph, setGraph
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEdgeData
public DirectedDfsVertex(EdgeDataFactory<E> edgeDataFactory)
edgeDataFactory
- factory to use for creating new EdgeData objectspublic void setParent(ChildVertex parent)
ChildVertex
setParent
in interface ChildVertex
parent
- vertex to be set as parentpublic ChildVertex getParent()
ChildVertex
getParent
in interface ChildVertex
public void setColor(Color color)
ColoredVertex
setColor
in interface ColoredVertex
color
- value to which to set the colorpublic Color getColor()
ColoredVertex
getColor
in interface ColoredVertex
public void setEdgeType(EdgeTypeVertex<E> to, EdgeType edgeType)
EdgeTypeVertex
setEdgeType
in interface EdgeTypeVertex<E extends DfsEdgeData>
to
- head of the edge for which to set the typeedgeType
- type to which to set the edge (TREE, BACK, FORWARD, CROSS, UNKNOWN)public EdgeType getEdgeType(EdgeTypeVertex<E> to)
EdgeTypeVertex
getEdgeType
in interface EdgeTypeVertex<E extends DfsEdgeData>
to
- head of the edge for which to retrieve the typepublic void setDiscoveryTime(int discoveryTime)
VisitedVertex
setDiscoveryTime
in interface VisitedVertex
discoveryTime
- value to which to set the discovery timepublic void setFinishTime(int finishTime)
VisitedVertex
setFinishTime
in interface VisitedVertex
finishTime
- value to which to set the finish timepublic int getDiscoveryTime()
VisitedVertex
getDiscoveryTime
in interface VisitedVertex
public int getFinishTime()
VisitedVertex
getFinishTime
in interface VisitedVertex