br.usp.ime.klava.segmentit.metrics
Class Area

java.lang.Object
  extended by br.usp.ime.klava.segmentit.metrics.AbstractMetric
      extended by br.usp.ime.klava.segmentit.metrics.Area

public class Area
extends AbstractMetric

Metric to build hierarchies of nested partitions ranking segments by their areas in synchronous flooding simulation.

Author:
Bruno Klava

Constructor Summary
Area()
           
 
Method Summary
 void calculateMetric(HierarchyInternalNode hierarchyInternalNode)
          Computes the value of this metric for the given hierarchyInternalNode.
 void calculateMetric(HierarchyLeaf hierarchyLeaf)
          Computes the value of this metric for the given hierarchyLeaf.
 int getValue(int waterLevel)
          Returns the value of this metric given the waterLevel.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Area

public Area()
Method Detail

calculateMetric

public void calculateMetric(HierarchyLeaf hierarchyLeaf)
Description copied from class: AbstractMetric
Computes the value of this metric for the given hierarchyLeaf.

Specified by:
calculateMetric in class AbstractMetric
Parameters:
hierarchyLeaf - a HierarchyLeaf

calculateMetric

public void calculateMetric(HierarchyInternalNode hierarchyInternalNode)
Description copied from class: AbstractMetric
Computes the value of this metric for the given hierarchyInternalNode.

Specified by:
calculateMetric in class AbstractMetric
Parameters:
hierarchyInternalNode - a HierarchyInternalNode

getValue

public int getValue(int waterLevel)
Description copied from class: AbstractMetric
Returns the value of this metric given the waterLevel.

Specified by:
getValue in class AbstractMetric
Parameters:
waterLevel - the current water level in the flooding simulation
Returns:
the value of this metric given the waterLevel