suvi.alg.policies
Class NodeRankingPolicyWithPartialOrderDecorator

java.lang.Object
  |
  +--javautils.collections.Algs
        |
        +--javautils.graph.Graphs
              |
              +--suvi.alg.util.NodeRankingPolicyDecorator
                    |
                    +--suvi.alg.policies.NodeRankingPolicyWithPartialOrderDecorator
All Implemented Interfaces:
GraphLayoutAttrConsumer, NodeRankingPolicy

public class NodeRankingPolicyWithPartialOrderDecorator
extends NodeRankingPolicyDecorator

Augments the preprocessed graph with a partial order and updates the graph topology before passing them to the node ranking policy.

The partial order given does not override the minimum edge length constraints (EdgeMinLengthAttr) for an edge. In other words, nodes with a partial order relation may end up in the same rank if there is an edge from the above node to the below node and the minimum edge length constraint is zero.

Note: This decorator is not compatible with the ExplicitNodeRankingPolicy or any other node ranking policy that basically ignores the topology of the graphs passed to it and draws the ranks out of thin air.


Field Summary
 
Fields inherited from class suvi.alg.util.NodeRankingPolicyDecorator
original
 
Fields inherited from class javautils.collections.Algs
EMPTY_ARRAY, EMPTY_LIST, EMPTY_MAP, EMPTY_SEQUENCE, EMPTY_SET
 
Constructor Summary
NodeRankingPolicyWithPartialOrderDecorator(NodeRankingPolicy original)
           
 
Method Summary
 GraphLayoutAttr[] defaultAttrs()
          In addition to the attributes used by the original policy, this decorator uses: NodeOrderingAttr
 NodeRanking nodeRanking(javautils.graph.adt.AugmentedGraph originalGraph, javautils.graph.adt.AugmentedGraph preprocessed, GraphTopology topology, GraphLayoutAttrMap attrMap)
          A node ranking for the graph.
 
Methods inherited from class javautils.graph.Graphs
asSourceTargetPair, asString, asString, augmented, connectedComponents, edges, edgeSet, forEachEdge, forEachNode, inducedByEdgesAndContainingNodes, invariant, isAcyclic, isIncoming, isSelf, nodesByDecreasingDfsFinishingTime, nodesByIncreasingIndegree, nodesByIncreasingOutdegree, nodeSet, nodesReachableFrom, nodesReachableFrom, nodesReachableFrom, otherNode, randomGraph, restrictedToNodes, restrictedToNodes, restrictedToNodes, sameNodesAndEdges, stronglyConnectedComponents, transitiveIrreflexiveClosure, transposed, transposed, undirected
 
Methods inherited from class javautils.collections.Algs
addAll, allSuperInterfaces, asArray, asArray, asComparator, asUnmodifiableList, collect, collectMap, collectSet, collectUnmodifiable, concat, concat, concat, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOfArray, ensureLength, exists, exists, exists, filter, filter, filter, find, find, find, flatten, flatten, flatten, fold, fold, fold, foldRight, foldRight, foldRight, forAll, forAll, forAll, forEach, forEach, forEach, forEach, forEach, forEach, forEachInProduct, forEachInProduct, forEachInProduct, forEachInProduct, genAddAll, genConcat, genConcat, genForEach, genForEach, getOrIfNull, integersInRange, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iteratorOverArray, map, map, map, map, map, map, mapMorphism, mapMorphismTo, mapTransform, max, max, max, max, max, max, max, min, min, min, min, min, min, min, newMap, newShapedArray, newUnmodifiableList, putAll, putAll, reverseIterator, reverseIterator, select, select, select, sign, singletonIterator, sort, sort, sorted, sorted, transform, transform, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeRankingPolicyWithPartialOrderDecorator

public NodeRankingPolicyWithPartialOrderDecorator(NodeRankingPolicy original)
Method Detail

defaultAttrs

public GraphLayoutAttr[] defaultAttrs()

In addition to the attributes used by the original policy, this decorator uses:

Specified by:
defaultAttrs in interface GraphLayoutAttrConsumer
Overrides:
defaultAttrs in class NodeRankingPolicyDecorator

nodeRanking

public NodeRanking nodeRanking(javautils.graph.adt.AugmentedGraph originalGraph,
                               javautils.graph.adt.AugmentedGraph preprocessed,
                               GraphTopology topology,
                               GraphLayoutAttrMap attrMap)
Description copied from interface: NodeRankingPolicy

A node ranking for the graph.

Specified by:
nodeRanking in interface NodeRankingPolicy
Overrides:
nodeRanking in class NodeRankingPolicyDecorator