Search this API

y.layout.labeling
Class SALabeling

java.lang.Object
  extended by y.layout.AbstractLayoutStage
      extended by y.layout.labeling.AbstractLabelingAlgorithm
          extended by y.layout.labeling.MISLabelingAlgorithm
              extended by y.layout.labeling.SALabeling
All Implemented Interfaces:
Layouter, LayoutStage

public class SALabeling
extends MISLabelingAlgorithm

This class is based on the enhanced profit model and places the labels of a graph using a simulated annealing strategy taking into account the amount of overlaps of labels. The algorithm is inspired by the article of Christensen, Marks and Shieber.


Field Summary
 
Fields inherited from class y.layout.labeling.MISLabelingAlgorithm
boxesToNodes, conflictGraph, graph, nodesToBoxes, nodesToID, OPTIMIZATION_BALANCED, OPTIMIZATION_EDGE_OVERLAP, OPTIMIZATION_LABEL_OVERLAP, OPTIMIZATION_NODE_OVERLAP, OPTIMIZATION_NONE
 
Fields inherited from class y.layout.labeling.AbstractLabelingAlgorithm
EPS, LABEL_MODEL_DPKEY, setCustomizedProfitModel
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
SALabeling()
           
 
Method Summary
 long getMaximalDuration()
          Returns the time limit for the algorithm (in milliseconds).
 boolean isDeterministicModeEnabled()
          Returns whether or not this labeling algorithm should work deterministically.
 void setDeterministicModeEnabled(boolean deterministicModeEnabled)
          Specifies whether or not this labeling algorithm should work deterministically.
 void setMaximalDuration(long msec)
          Sets a time limit for the labeling algorithm.
 
Methods inherited from class y.layout.labeling.MISLabelingAlgorithm
assignProfit, createEdges, foundEdgeOverlap, foundLabelOverlap, foundNodeOverlap, getCustomProfitModelRatio, getOptimizationStrategy, setCustomProfitModelRatio, setOptimizationStrategy
 
Methods inherited from class y.layout.labeling.AbstractLabelingAlgorithm
canLayout, checkGroupNodeSize, checkNodeSize, doLayout, getPlaceEdgeLabels, getPlaceNodeLabels, getProfit, getProfitModel, getRects, getRemoveEdgeOverlaps, getRemoveNodeOverlaps, getSelectionKey, isApplyPostprocessing, isAutoFlippingEnabled, isEdgeGroupOverlapAllowed, isMoveInternalNodeLabels, isStoreRects, isUseAlternativeSideHandling, label, label, label, setApplyPostprocessing, setAutoFlippingEnabled, setEdgeGroupOverlapAllowed, setMoveInternalNodeLabels, setPlaceEdgeLabels, setPlaceNodeLabels, setProfitModel, setRemoveEdgeOverlaps, setRemoveNodeOverlaps, setSelection, setStoreRects, setUseAlternativeSideHandling
 
Methods inherited from class y.layout.AbstractLayoutStage
canLayoutCore, doLayoutCore, getCoreLayouter, setCoreLayouter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SALabeling

public SALabeling()
Method Detail

isDeterministicModeEnabled

public boolean isDeterministicModeEnabled()
Returns whether or not this labeling algorithm should work deterministically.

See Also:
setDeterministicModeEnabled(boolean)

setDeterministicModeEnabled

public void setDeterministicModeEnabled(boolean deterministicModeEnabled)
Specifies whether or not this labeling algorithm should work deterministically. In deterministic mode this labeling algorithm produces the same layout results for the same input graph and layout/labeling parameters.

By default deterministic mode is disabled.


setMaximalDuration

public void setMaximalDuration(long msec)
Sets a time limit for the labeling algorithm. Note, that this limit is not strictly observed.

Parameters:
msec - the time in milliseconds

getMaximalDuration

public long getMaximalDuration()
Returns the time limit for the algorithm (in milliseconds). Note, that this limit is not strictly observed.


© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.