org.askalon.graph.chart
Enum HierarchyMeanFormula

java.lang.Object
  extended by java.lang.Enum<HierarchyMeanFormula>
      extended by org.askalon.graph.chart.HierarchyMeanFormula
All Implemented Interfaces:
Serializable, Comparable<HierarchyMeanFormula>

public enum HierarchyMeanFormula
extends Enum<HierarchyMeanFormula>

Contains various types of supported mean forumals for the hierarchy chart.

Author:
Georg Schild and Franz Endstrasser

Enum Constant Summary
ARITHMETIC
          Arithmetic mean
GEOMETRIC
          Geometric mean
HARMONIC
          Harmonic mean
QUADRATIC
          Quadratic mean
 
Method Summary
abstract  double getMean(double[] values)
          Gets the mean of the given values.
 String toString()
          Gets the name of this mean formula.
static HierarchyMeanFormula valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HierarchyMeanFormula[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ARITHMETIC

public static final HierarchyMeanFormula ARITHMETIC
Arithmetic mean


GEOMETRIC

public static final HierarchyMeanFormula GEOMETRIC
Geometric mean


HARMONIC

public static final HierarchyMeanFormula HARMONIC
Harmonic mean


QUADRATIC

public static final HierarchyMeanFormula QUADRATIC
Quadratic mean

Method Detail

values

public static final HierarchyMeanFormula[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(HierarchyMeanFormula c : HierarchyMeanFormula.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static HierarchyMeanFormula valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getMean

public abstract double getMean(double[] values)
Gets the mean of the given values.

Parameters:
values - an array containg values to calculate the mean value for
Returns:
the mean value of this values

toString

public String toString()
Gets the name of this mean formula.

Overrides:
toString in class Enum<HierarchyMeanFormula>
Returns:
the name of this mean formula


Part of:
Askalon_Logo
ASKALON Visualisation Diagrams