Package org.tensorics.core.function
Class DefaultInterpolatedFunction<X,Y>
- java.lang.Object
-
- org.tensorics.core.function.DefaultInterpolatedFunction<X,Y>
-
- Type Parameters:
X- the type of the independent variable must be comparable. Otherwise is not possible to interpolate.
- All Implemented Interfaces:
java.util.function.Function<X,Y>,ContinuousFunction<X,Y>,DiscreteFunction<X,Y>,InterpolatedFunction<X,Y>,MathFunction<X,Y>
public class DefaultInterpolatedFunction<X,Y> extends java.lang.Object implements InterpolatedFunction<X,Y>
Encodes aInterpolatedFunctionas a combination of aDiscreteFunctionplus anInterpolationStrategy.The obtaining of y-values associated with x-values not defined by the
DiscreteFunctionis delegated to theInterpolationStrategy.- See Also:
InterpolatedFunction
-
-
Constructor Summary
Constructors Constructor Description DefaultInterpolatedFunction(DiscreteFunction<X,Y> function, InterpolationStrategy<Y> strategy, Conversion<X,Y> conversion, java.util.Comparator<X> comparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Yapply(X input)java.util.Set<X>definedXValues()
-
-
-
Constructor Detail
-
DefaultInterpolatedFunction
public DefaultInterpolatedFunction(DiscreteFunction<X,Y> function, InterpolationStrategy<Y> strategy, Conversion<X,Y> conversion, java.util.Comparator<X> comparator)
-
-
Method Detail
-
definedXValues
public java.util.Set<X> definedXValues()
- Specified by:
definedXValuesin interfaceDiscreteFunction<X,Y>- Returns:
- values for which the function is defined
-
-