N
- node classE
- edge classD
- user data classpublic class BaseDFSVisitor<N,E,D> extends Object implements DFSVisitor<N,E,D>
DFSVisitor
.Constructor and Description |
---|
BaseDFSVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
backEdge(N srcNode,
D srcData,
E edge,
N tgtNode,
D tgtData) |
void |
backtrackEdge(N srcNode,
D srcDate,
E edge,
N tgtNode,
D tgtData) |
void |
blackTarget(N srcNode,
D srcData,
E edge,
N tgtNode,
D tgtData) |
void |
crossEdge(N srcNode,
D srcData,
E edge,
N tgtNode,
D tgtData) |
void |
edge(N srcNode,
D srcData,
E edge,
N tgtNode)
Most general edge handler.
|
void |
explore(N node,
D data) |
void |
finish(N node,
D data) |
void |
forwardEdge(N srcNode,
D srcData,
E edge,
N tgtNode,
D tgtData) |
void |
grayTarget(N srcNode,
D srcData,
E edge,
N tgtNode,
D tgtData) |
D |
initialize(N node) |
void |
nontreeEdge(N srcNode,
D srcData,
E edge,
N tgtNode,
D tgtData) |
D |
treeEdge(N srcNode,
D srcData,
E edge,
N tgtNode) |
public D initialize(N node)
initialize
in interface DFSVisitor<N,E,D>
public D treeEdge(N srcNode, D srcData, E edge, N tgtNode)
treeEdge
in interface DFSVisitor<N,E,D>
public void edge(N srcNode, D srcData, E edge, N tgtNode)
srcNode
- the source nodesrcData
- the data associated with the source nodeedge
- the edge that is being processedtgtNode
- the target node of this edgepublic void backEdge(N srcNode, D srcData, E edge, N tgtNode, D tgtData)
backEdge
in interface DFSVisitor<N,E,D>
public void crossEdge(N srcNode, D srcData, E edge, N tgtNode, D tgtData)
crossEdge
in interface DFSVisitor<N,E,D>
public void forwardEdge(N srcNode, D srcData, E edge, N tgtNode, D tgtData)
forwardEdge
in interface DFSVisitor<N,E,D>
public void backtrackEdge(N srcNode, D srcDate, E edge, N tgtNode, D tgtData)
backtrackEdge
in interface DFSVisitor<N,E,D>
Copyright © 2020. All rights reserved.