de.fuberlin.wiwiss.semmf.taxon
Class ExpMilestCalc

java.lang.Object
  extended by de.fuberlin.wiwiss.semmf.taxon.ExpMilestCalc
All Implemented Interfaces:
MilestoneCalculator

public class ExpMilestCalc
extends java.lang.Object
implements MilestoneCalculator

This class is a milestone calculator using an exponential function m(level) = 0.5 * pow (k, level), where k is a parameter passed to the constructor. The milestone values decrease exponentially allong the hierarchy levels.

Version:
1.0 last modified 29.11.2006
Author:
Radoslaw Oldakowski

Field Summary
private  float k
          Parameter used in the milestone formula (0.5 / Math.pow(k, conceptLevel)) K is a factor larger than 1 that indicates the rate at which the milestone value decreases along the hierarchy.
 
Constructor Summary
ExpMilestCalc(float k)
          Constructor
 
Method Summary
 float[] calculateMilestones(int deepestLevel)
          The implementation of this method must return an array of float values for all taxonomy levels starting from 0 and ending at the deepest level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

k

private float k
Parameter used in the milestone formula (0.5 / Math.pow(k, conceptLevel)) K is a factor larger than 1 that indicates the rate at which the milestone value decreases along the hierarchy.

Constructor Detail

ExpMilestCalc

public ExpMilestCalc(float k)
Constructor

Parameters:
k - indicates the rate at which the milestone value decreases along the hierarchy.
Method Detail

calculateMilestones

public float[] calculateMilestones(int deepestLevel)
Description copied from interface: MilestoneCalculator
The implementation of this method must return an array of float values for all taxonomy levels starting from 0 and ending at the deepest level.

Specified by:
calculateMilestones in interface MilestoneCalculator
Parameters:
deepestLevel - index of the deepest level (= number of levels - 1)
Returns:
an array of float values for all taxonomy levels starting from 0 (root element) and ending at the deepest level.