public class CycleBreaker extends BFS
Constructor and Description |
---|
CycleBreaker(Set<GraphObject> result,
Set<Node> ST,
int limit)
Constructor with the objects in the result, source and target nodes, and search limit.
|
Modifier and Type | Method and Description |
---|---|
void |
breakCycles()
Run the algorithm.
|
boolean |
isSafe(Node node,
Edge edge)
Checks whether an edge is on an unwanted cycle.
|
protected boolean |
processNode2(Node current)
Continue the search from the node.
|
getColor, getLabel, initMaps, isEquivalentInTheSet, isEquivalentInTheSet, labelEquivRecursive, processNode, run, setColor, setLabel
public CycleBreaker(Set<GraphObject> result, Set<Node> ST, int limit)
result
- Result set to search inST
- Source and target nodeslimit
- Search limitpublic void breakCycles()
public boolean isSafe(Node node, Edge edge)
node
- Node that the edge is boundedge
- The edge to checkprotected boolean processNode2(Node current)
current
- The node to traverseCopyright © 2015 BioPAX. All rights reserved.