Class LinearEnhancement

All Implemented Interfaces:
Serializable, Cloneable, Encodable
Direct Known Subclasses:
StepEnhancement

public class LinearEnhancement extends EnhancementFunction
A linear enhancement is an enhancement function formed by a linear y = mx + b relationship.
Since:
3.1.1
Author:
Peter Hollemans
See Also:
  • Constructor Details

    • LinearEnhancement

      public LinearEnhancement(double[] range)
      Constructs a linear enhancement from the data value range. The minimum and maximum data values are mapped to [0..1].
      Parameters:
      range - the enhancement range as [min, max].
  • Method Details

    • getInverse

      public double getInverse(double normValue)
      Description copied from class: EnhancementFunction
      Gets the inverse enhancement value.
      Specified by:
      getInverse in class EnhancementFunction
      Parameters:
      normValue - the normalized data value.
      Returns:
      the unnormalized data value.
    • evaluate

      public double evaluate(double[] variables)
      Evaluates the enhancement at the specified data value. The EnhancementFunction.getValue(double) method should be used instead of this method for evaluating enhancement values.
      Specified by:
      evaluate in class Function
      Parameters:
      variables - a double[1] specifying the data value.
      Returns:
      the enhancement value.
    • reset

      protected void reset()
      Resets the enhancement function.
      Overrides:
      reset in class EnhancementFunction
    • describe

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