com.mindfusion.diagramming.jlayout
Class AnnealLayoutInfo

java.lang.Object
  extended by com.mindfusion.diagramming.jlayout.AnnealLayoutInfo

public class AnnealLayoutInfo
extends java.lang.Object


Constructor Summary
AnnealLayoutInfo()
           
 
Method Summary
 double getBoundaryFactor()
          Gets a value indicating how important the distance from nodes to the layout area boundaries is relatively to the other criteria considered by the algorithm.
 double getCrossingEdgesCost()
          Gets a value specifying how important the low number of arrow crossings is relatively to the other criteria considered by the algorithm.
 double getDistributionFactor()
          Gets a value indicating the importance of node distribution relatively to the other criteria considered by the algorithm.
 double getEdgeLengthFactor()
          Gets a value specifying how important the short length of arrows is relatively to the other criteria considered by the algorithm.
 int getIterationsPerStage()
          Gets how many node shift iterations to perform at each stage of the algorithm.
 java.awt.geom.Rectangle2D.Float getLayoutArea()
          Gets the size of the layout area.
 double getNodeEdgeCrossingCost()
          Gets a value specifying how important the low number of crossings of arrows with edges is relatively to the other criteria considered by the algorithm.
 double getNodeEdgeDistFactor()
          Gets a value specifying the importance of the distance between nodes and arrows relative to the other criteria considered by the algorithm.
 double getPrecision()
          Gets the cost calculations precision.
 boolean getRandomize()
          Gets a value indicating whether the nodes should be placed at random positions when the layout routine starts.
 int getStages()
          Gets how many cooling stages the algorithm should simulate.
 double getTemperature()
          Gets the initial temperature of the simulated annealing process.
 double getTemperatureScale()
          Gets how much the simulated temperature is decreased at each stage of the algorithm.
 double getWidthHeightRatio()
          Gets what width / height ratio the layout area should have.
 void setBoundaryFactor(double boundaryFactor)
          Sets a value indicating how important the distance from nodes to the layout area boundaries is relatively to the other criteria considered by the algorithm.
 void setCrossingEdgesCost(double crossingEdgesCost)
          Sets a value specifying how important the low number of arrow crossings is relatively to the other criteria considered by the algorithm.
 void setDistributionFactor(double distributionFactor)
          Sets a value indicating the importance of node distribution relatively to the other criteria considered by the algorithm.
 void setEdgeLengthFactor(double edgeLengthFactor)
          Sets a value specifying how important the short length of arrows is relatively to the other criteria considered by the algorithm.
 void setIterationsPerStage(int iterationsPerStage)
          Sets how many node shift iterations to perform at each stage of the algorithm.
 void setLayoutArea(java.awt.geom.Rectangle2D.Float layoutArea)
          Sets the size of the layout area.
 void setNodeEdgeCrossingCost(double nodeEdgeCrossingCost)
          Sets a value specifying how important the low number of crossings of arrows with edges is relatively to the other criteria considered by the algorithm.
 void setNodeEdgeDistFactor(double nodeEdgeDistFactor)
          Sets a value specifying the importance of the distance between nodes and arrows relative to the other criteria considered by the algorithm.
 void setPrecision(double precision)
          Sets the cost calculations precision.
 void setRandomize(boolean randomize)
          Sets a value indicating whether the nodes should be placed at random positions when the layout routine starts.
 void setStages(int stages)
          Sets how many cooling stages the algorithm should simulate.
 void setTemperature(double temperature)
          Sets the initial temperature of the simulated annealing process.
 void setTemperatureScale(double temperatureScale)
          Sets how much the simulated temperature is decreased at each stage of the algorithm.
 void setWidthHeightRatio(double widthHeightRatio)
          Sets what width / height ratio the layout area should have.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnealLayoutInfo

public AnnealLayoutInfo()
Method Detail

getBoundaryFactor

public double getBoundaryFactor()
Gets a value indicating how important the distance from nodes to the layout area boundaries is relatively to the other criteria considered by the algorithm.

Returns:
A multiplier applied to the node-to-boundary distance cost when evaluating the total cost of a graph configuration.

setBoundaryFactor

public void setBoundaryFactor(double boundaryFactor)
Sets a value indicating how important the distance from nodes to the layout area boundaries is relatively to the other criteria considered by the algorithm.

Parameters:
boundaryFactor - A multiplier applied to the node-to-boundary distance cost when evaluating the total cost of a graph configuration. The default is 3000.

getNodeEdgeCrossingCost

public double getNodeEdgeCrossingCost()
Gets a value specifying how important the low number of crossings of arrows with edges is relatively to the other criteria considered by the algorithm.

Returns:
A value added to the total cost of a graph configuration for each crossing of arrow and node.

setNodeEdgeCrossingCost

public void setNodeEdgeCrossingCost(double nodeEdgeCrossingCost)
Sets a value specifying how important the low number of crossings of arrows with edges is relatively to the other criteria considered by the algorithm.

Parameters:
nodeEdgeCrossingCost - A value added to the total cost of a graph configuration for each crossing of arrow and node. The default is 100000.

getCrossingEdgesCost

public double getCrossingEdgesCost()
Gets a value specifying how important the low number of arrow crossings is relatively to the other criteria considered by the algorithm.

Returns:
A value added to the total cost of a graph configuration for each pair of crossing arrows.

setCrossingEdgesCost

public void setCrossingEdgesCost(double crossingEdgesCost)
Sets a value specifying how important the low number of arrow crossings is relatively to the other criteria considered by the algorithm.

Parameters:
crossingEdgesCost - A value added to the total cost of a graph configuration for each pair of crossing arrows. The default is 100000.

getDistributionFactor

public double getDistributionFactor()
Gets a value indicating the importance of node distribution relatively to the other criteria considered by the algorithm.

Returns:
A multiplier applied to the node distribution cost when evaluating the total cost of a graph configuration.

setDistributionFactor

public void setDistributionFactor(double distributionFactor)
Sets a value indicating the importance of node distribution relatively to the other criteria considered by the algorithm.

Parameters:
distributionFactor - A multiplier applied to the node distribution cost when evaluating the total cost of a graph configuration. The default is 40000.

getEdgeLengthFactor

public double getEdgeLengthFactor()
Gets a value specifying how important the short length of arrows is relatively to the other criteria considered by the algorithm.

Returns:
A multiplier applied to the arrow length cost when evaluating the total cost of a graph configuration.

setEdgeLengthFactor

public void setEdgeLengthFactor(double edgeLengthFactor)
Sets a value specifying how important the short length of arrows is relatively to the other criteria considered by the algorithm.

Parameters:
edgeLengthFactor - A multiplier applied to the arrow length cost when evaluating the total cost of a graph configuration. The default is 0.25.

getIterationsPerStage

public int getIterationsPerStage()
Gets how many node shift iterations to perform at each stage of the algorithm.

Returns:
An integer value specifying the number of iterations.

setIterationsPerStage

public void setIterationsPerStage(int iterationsPerStage)
Sets how many node shift iterations to perform at each stage of the algorithm.

Parameters:
iterationsPerStage - An integer value specifying the number of iterations. The default is 50

getLayoutArea

public java.awt.geom.Rectangle2D.Float getLayoutArea()
Gets the size of the layout area.

Returns:
The layout area coordinates.

setLayoutArea

public void setLayoutArea(java.awt.geom.Rectangle2D.Float layoutArea)
Sets the size of the layout area.

Parameters:
layoutArea - The layout area coordinates.

getNodeEdgeDistFactor

public double getNodeEdgeDistFactor()
Gets a value specifying the importance of the distance between nodes and arrows relative to the other criteria considered by the algorithm.

Returns:
A multiplier applied to the node-to-link distance cost when evaluating the total cost of a graph configuration.

setNodeEdgeDistFactor

public void setNodeEdgeDistFactor(double nodeEdgeDistFactor)
Sets a value specifying the importance of the distance between nodes and arrows relative to the other criteria considered by the algorithm.

Parameters:
nodeEdgeDistFactor - A multiplier applied to the node-to-link distance cost when evaluating the total cost of a graph configuration. The default is 20000.

getRandomize

public boolean getRandomize()
Gets a value indicating whether the nodes should be placed at random positions when the layout routine starts.


setRandomize

public void setRandomize(boolean randomize)
Sets a value indicating whether the nodes should be placed at random positions when the layout routine starts.


getStages

public int getStages()
Gets how many cooling stages the algorithm should simulate.

Returns:
The number of cooling stages

setStages

public void setStages(int stages)
Sets how many cooling stages the algorithm should simulate.

Parameters:
stages - The number of cooling stages

getTemperature

public double getTemperature()
Gets the initial temperature of the simulated annealing process.

Returns:
A double value specifying the initial temperature of the simulated process.

setTemperature

public void setTemperature(double temperature)
Sets the initial temperature of the simulated annealing process.

Parameters:
temperature - A double value specifying the initial temperature of the simulated process.

getTemperatureScale

public double getTemperatureScale()
Gets how much the simulated temperature is decreased at each stage of the algorithm.

Returns:
A multipler applied to the current temperature at the end of each cooling stage.

setTemperatureScale

public void setTemperatureScale(double temperatureScale)
Sets how much the simulated temperature is decreased at each stage of the algorithm.

Parameters:
temperatureScale - A multipler applied to the current temperature at the end of each cooling stage. The default value is 0.75

getWidthHeightRatio

public double getWidthHeightRatio()
Gets what width / height ratio the layout area should have.


setWidthHeightRatio

public void setWidthHeightRatio(double widthHeightRatio)
Sets what width / height ratio the layout area should have.


getPrecision

public double getPrecision()
Gets the cost calculations precision.


setPrecision

public void setPrecision(double precision)
Sets the cost calculations precision. 1 speicifes highest precision. Accepted values are between 0.9 and 1. The algorithm completes faster when running with a lower precision, but produces slightly worse results.