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 Summary
ConstructorsConstructorDescriptionFIXME remove empty constructorInterpolationFunction(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 roundingInterpolationFunction(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 -
Method Summary
Modifier and TypeMethodDescriptionjavax.measure.Quantity<R> protected int[]calculateBeforeAfterPair(double x, boolean isAscending, boolean isDescending, double[] xValues, int numberOfXValues) voidPerform operations that must be done after Spring initialisation i.e.intintbooleanIndicates whether this object should be configured at startup.booleanChecks to see if the object is already configured.voidRe-initialisation of values and states.voidsetCdf(ColumnDataFile cdf) voidsetCdfName(String cdfName) Deprecated.Set the CDF instance directly instead of using the namevoidsetXColumn(int column) voidsetYColumn(int column) Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
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 valuesyvalues- the y valuesxunits- the x unitsyunits- the y unitsdecimal- 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 valuesyvalues- the y valuesxunits- the x unitsyunits- the y units
-
-
Method Details
-
configure
Description copied from interface:ConfigurablePerform operations that must be done after Spring initialisation i.e. anything that goes beyond setting member variables.- Specified by:
configurein interfaceConfigurable- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
reconfigure
Description copied from interface:ConfigurableRe-initialisation of values and states.Moved from Reconfigurable which has been deleted
- Specified by:
reconfigurein interfaceConfigurable- Throws:
FactoryException
-
isConfigured
public boolean isConfigured()Description copied from interface:ConfigurableChecks to see if the object is already configured.- Specified by:
isConfiguredin interfaceConfigurable- Returns:
- return
trueif configuredfalseotherwise
-
isConfigureAtStartup
public boolean isConfigureAtStartup()Description copied from interface:ConfigurableIndicates whether this object should be configured at startup.Moved from ConditionallyConfigurable which has been deleted
- Specified by:
isConfigureAtStartupin interfaceConfigurable
-
getCdfName
- Returns:
- Returns the cdf.
-
setCdfName
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
-
setCdf
-