Package gda.function

Class InterpolationFunction<T extends javax.measure.Quantity<T>,R extends javax.measure.Quantity<R>>

java.lang.Object
gda.factory.FindableBase
gda.function.FindableFunction<T,R>
gda.function.InterpolationFunction<T,R>
All Implemented Interfaces:
Configurable, Findable, Function<javax.measure.Quantity<T>,javax.measure.Quantity<R>>
Direct Known Subclasses:
InterpolationWithoutExtrapolationFunction

public class InterpolationFunction<T extends javax.measure.Quantity<T>,R extends javax.measure.Quantity<R>> extends FindableFunction<T,R> implements Configurable
  • Constructor Details

    • InterpolationFunction

      public InterpolationFunction()
      FIXME remove empty constructor
    • InterpolationFunction

      public InterpolationFunction(double[] xvalues, double[] yvalues, javax.measure.Unit<T> xunits, javax.measure.Unit<R> yunits, int decimal)
      Create an interpolation function for a series of x and y values
      Parameters:
      xvalues - the x values
      yvalues - the y values
      xunits - the x units
      yunits - the y units
      decimal - number of decimal places . Use InterpolationFunction.decimalPlacesToPreventRounding to prevent rounding. Or use other constructor
    • InterpolationFunction

      public InterpolationFunction(double[] xvalues, double[] yvalues, javax.measure.Unit<T> xunits, javax.measure.Unit<R> yunits)
      Create an interpolation function for a series of x and y values with no rounding
      Parameters:
      xvalues - the x values
      yvalues - the y values
      xunits - the x units
      yunits - the y units
  • Method Details

    • configure

      public void configure() throws FactoryException
      Description copied from interface: Configurable
      Perform operations that must be done after Spring initialisation i.e. anything that goes beyond setting member variables.
      Specified by:
      configure in interface Configurable
      Throws:
      FactoryException - if there is an error in configuration e.g. required variable not set or cannot connect to device
    • reconfigure

      public void reconfigure() throws FactoryException
      Description copied from interface: Configurable
      Re-initialisation of values and states.

      Moved from Reconfigurable which has been deleted

      Specified by:
      reconfigure in interface Configurable
      Throws:
      FactoryException
    • isConfigured

      public boolean isConfigured()
      Description copied from interface: Configurable
      Checks to see if the object is already configured.
      Specified by:
      isConfigured in interface Configurable
      Returns:
      return true if configured false otherwise
    • isConfigureAtStartup

      public boolean isConfigureAtStartup()
      Description copied from interface: Configurable
      Indicates whether this object should be configured at startup.

      Moved from ConditionallyConfigurable which has been deleted

      Specified by:
      isConfigureAtStartup in interface Configurable
    • getCdfName

      public String getCdfName()
      Returns:
      Returns the cdf.
    • setCdfName

      @Deprecated(since="GDA 9.18") public void setCdfName(String cdfName)
      Deprecated.
      Set the CDF instance directly instead of using the name
      Parameters:
      cdfName - The cdf to set.
    • getXColumn

      public int getXColumn()
      Returns:
      Returns the xColumn.
    • setXColumn

      public void setXColumn(int column)
      Parameters:
      column - The xColumn to set.
    • getYColumn

      public int getYColumn()
      Returns:
      Returns the yColumn.
    • setYColumn

      public void setYColumn(int column)
      Parameters:
      column - The yColumn to set.
    • calculateBeforeAfterPair

      protected int[] calculateBeforeAfterPair(double x, boolean isAscending, boolean isDescending, double[] xValues, int numberOfXValues)
    • apply

      public javax.measure.Quantity<R> apply(javax.measure.Quantity<T> xValue)
      Specified by:
      apply in interface Function<T extends javax.measure.Quantity<T>,R extends javax.measure.Quantity<R>>
    • setCdf

      public void setCdf(ColumnDataFile cdf)