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

java.lang.Object
  extended by br.usp.ime.klava.segmentit.metrics.AbstractMetric
Direct Known Subclasses:
Area, Depth, MeanValue, MergingLevel, Volume

public abstract class AbstractMetric
extends java.lang.Object

Abstract metric used to build hierarchies of nested partitions.

Author:
Bruno Klava

Constructor Summary
AbstractMetric()
           
 
Method Summary
abstract  void calculateMetric(HierarchyInternalNode hierarchyInternalNode)
          Computes the value of this metric for the given hierarchyInternalNode.
abstract  void calculateMetric(HierarchyLeaf hierarchyLeaf)
          Computes the value of this metric for the given hierarchyLeaf.
abstract  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

AbstractMetric

public AbstractMetric()
Method Detail

calculateMetric

public abstract void calculateMetric(HierarchyLeaf hierarchyLeaf)
Computes the value of this metric for the given hierarchyLeaf.

Parameters:
hierarchyLeaf - a HierarchyLeaf

calculateMetric

public abstract void calculateMetric(HierarchyInternalNode hierarchyInternalNode)
Computes the value of this metric for the given hierarchyInternalNode.

Parameters:
hierarchyInternalNode - a HierarchyInternalNode

getValue

public abstract int getValue(int waterLevel)
Returns the value of this metric given the waterLevel.

Parameters:
waterLevel - the current water level in the flooding simulation
Returns:
the value of this metric given the waterLevel