public class AreaOverlapMetric
extends java.lang.Object
Constructor and Description |
---|
AreaOverlapMetric(java.util.List<PlacementFrame.PlacementNode> allNodes,
SimulatedAnnealing.IncrementalState incrementalState)
Method to create a AreaOverlapMetric object.
|
Modifier and Type | Method and Description |
---|---|
double |
computeOverlapForNode(PlacementFrame.PlacementNode theOne)
Method that computes all overlapping areas caused by the given
PlacementNode . |
double |
getCurrentScore()
Get current score.
|
double |
init(java.util.List<PlacementFrame.PlacementNode> allNodes)
Initialises this metric.
|
double |
update(int index)
Updates the metric score.
|
public AreaOverlapMetric(java.util.List<PlacementFrame.PlacementNode> allNodes, SimulatedAnnealing.IncrementalState incrementalState)
allNodes
- a list containing all PlacementNode
objects.incrementalState
- an IncremetntalState
object describing the current state.public double init(java.util.List<PlacementFrame.PlacementNode> allNodes)
allNodes
- a list containing all PlacementNode
objects.public double getCurrentScore()
public double computeOverlapForNode(PlacementFrame.PlacementNode theOne)
PlacementNode
.theOne
- PlacementNode
object for which the overlapping is to be computed.public double update(int index)
index
- the index of the node that was moved or swapped.