V - The vertex typeE - The edge typepublic class PQTreeReduction<V extends Vertex,E extends Edge<V>>
extends java.lang.Object
| Constructor and Description |
|---|
PQTreeReduction() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bubble(PQTree<V,E> pqTree,
java.util.List<PQTreeNode> S)
Implementation of the bubble procedure
|
java.util.Map<V,java.lang.Integer> |
getReversalNum() |
boolean |
reduce(PQTree<V,E> pqTree,
java.util.List<PQTreeNode> S,
PQTreeNode pertRoot)
Implementation of the reduction procedure
|
public boolean bubble(PQTree<V,E> pqTree, java.util.List<PQTreeNode> S)
pqTree - PQ-treeS - A subset of all nodespublic boolean reduce(PQTree<V,E> pqTree, java.util.List<PQTreeNode> S, PQTreeNode pertRoot)
pqTree - PQ-tree to be reducedS - Subset of all nodespertRoot - Pertinent roottrue if the tree can be reduced, false otherwisepublic java.util.Map<V,java.lang.Integer> getReversalNum()