Package org.tensorics.core.reduction
Class LinearInterpolation<C,V>
- java.lang.Object
-
- org.tensorics.core.reduction.AbstractInterpolationStrategy<C,V>
-
- org.tensorics.core.reduction.LinearInterpolation<C,V>
-
- Type Parameters:
C
- the coordinate typeV
- the value type
- All Implemented Interfaces:
InterpolationStrategy<C,V>
public class LinearInterpolation<C,V> extends AbstractInterpolationStrategy<C,V>
Generalized linear interpolation, provided a field for the values of a tensor, and a mapper from the coordinate to interpolate to the value.
-
-
Constructor Summary
Constructors Constructor Description LinearInterpolation(ExtendedField<V> field, java.util.function.Function<C,V> fieldMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
getInterpolatedValue(Tensor<V> tensorWithTheOnlyOneCoordinateOfC, C coordinateToInterpolate)
Returns interpolated value for coordinate C.-
Methods inherited from class org.tensorics.core.reduction.AbstractInterpolationStrategy
findIndex, getOrderedListOfComparableCoordinate
-
-
-
-
Constructor Detail
-
LinearInterpolation
public LinearInterpolation(ExtendedField<V> field, java.util.function.Function<C,V> fieldMapper)
-
-
Method Detail
-
getInterpolatedValue
public V getInterpolatedValue(Tensor<V> tensorWithTheOnlyOneCoordinateOfC, C coordinateToInterpolate)
Description copied from interface:InterpolationStrategy
Returns interpolated value for coordinate C.- Parameters:
tensorWithTheOnlyOneCoordinateOfC
- the tensor where only C coordinates are kept- Returns:
- the interpolated value
-
-