de.cau.cs.kieler.klay.layered.p3order
Interface ICrossingMinimizationHeuristic
- All Known Implementing Classes:
- BarycenterHeuristic
public interface ICrossingMinimizationHeuristic
Determines the node order of a given free layer. Uses heuristic methods to find an ordering that
minimizes edge crossings between the given free layer and a neighboring layer with fixed node
order. Given constraints are to be respected, possibly by the use of an IConstraintResolver.
Port ranks are calculated with the help of a IPortDistributor.
- Rating

Method Summary |
int |
minimizeCrossings(List<NodeGroup> layer,
com.google.common.collect.Multimap<LNode,LNode> layoutUnits,
int layerIndex,
boolean preOrdered,
boolean randomize,
boolean forward,
float[] portPos,
Map<LNode,NodeGroup>[] singleNodeNodeGroups)
Minimize the number of crossings for the edges between the given layer and either its
predecessor or its successor. |
minimizeCrossings
int minimizeCrossings(List<NodeGroup> layer,
com.google.common.collect.Multimap<LNode,LNode> layoutUnits,
int layerIndex,
boolean preOrdered,
boolean randomize,
boolean forward,
float[] portPos,
Map<LNode,NodeGroup>[] singleNodeNodeGroups)
- Minimize the number of crossings for the edges between the given layer and either its
predecessor or its successor. Resolve violated constraints. Calculate Port Ranks.
- Parameters:
layer
- the free layer whose nodes are reordered.layoutUnits
- a map associating layout units with their respective members.layerIndex
- the free layer's index.preOrdered
- whether the nodes have been ordered in a previous run.randomize
- true
if this layer's node order should just be randomized. In that case,
preOrdered
is assumed to be false
and the return value is
0
.forward
- whether the free layer is after the fixed layer.portPos
- position array.singleNodeNodeGroups
- Map of single node vertices for each layer.
- Returns:
- the total number of edges going either in or out of the given layer.