Class StepEnhancement

All Implemented Interfaces:
Serializable, Cloneable, Encodable

public class StepEnhancement extends LinearEnhancement
A step enhancement is an enhancement function formed by a number of discrete steps.
Since:
3.1.1
Author:
Peter Hollemans
See Also:
  • Constructor Details

    • StepEnhancement

      public StepEnhancement(double[] range, double step)
      Constructs a step enhancement from the specified parameters. The minimum and maximum data values are mapped to [0..1].
      Parameters:
      range - the enhancement range as [min, max].
      step - the data value step size. The range between the minimum and maximum is divided up into discrete steps of this size.
    • StepEnhancement

      public StepEnhancement(double[] range, int steps)
      Constructs a step enhancement from the specified parameters. The minimum and maximum data values are mapped to the range [0..1].
      Parameters:
      range - the enhancement range as [min, max].
      steps - the number of data steps in the range.
  • Method Details

    • evaluate

      public double evaluate(double[] variables)
      Description copied from class: LinearEnhancement
      Evaluates the enhancement at the specified data value. The EnhancementFunction.getValue(double) method should be used instead of this method for evaluating enhancement values.
      Overrides:
      evaluate in class LinearEnhancement
      Parameters:
      variables - a double[1] specifying the data value.
      Returns:
      the enhancement value.
    • getSteps

      public int getSteps()
      Gets the number of steps in the enhancement.
    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one.
      Overrides:
      equals in class EnhancementFunction
    • describe

      public String describe()
      Description copied from class: EnhancementFunction
      Gets a description of the function.
      Overrides:
      describe in class LinearEnhancement