Interface SingleDimensionResampler<C,V>
-
- Type Parameters:
C
- the type of the coordinates in the direction to resampleV
- the type of the values of the tensors
- All Known Implementing Classes:
LinearInterpolationResampler
,RepeatingResampler
public interface SingleDimensionResampler<C,V>
Defines a strategy how to resample in one single dimension of a tensor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canResample(java.util.Set<C> supportCoordinates, C resampleCoordinate)
Has to returntrue
if the resampling will be possible, provided the the given parameters.V
resample(java.util.Set<C> supportCoordinates, java.util.function.Function<C,V> valuesCallback, C resampleCoordinate)
Performs the actual resampling using the provided input.
-
-
-
Method Detail
-
canResample
boolean canResample(java.util.Set<C> supportCoordinates, C resampleCoordinate)
Has to returntrue
if the resampling will be possible, provided the the given parameters.- Parameters:
supportCoordinates
- the supporting points, which can be used as input to resampleresampleCoordinate
- the coordinate at which the resampling shall be performed- Returns:
true
if the resampling will be possible with the provided input,false
if not.
-
resample
V resample(java.util.Set<C> supportCoordinates, java.util.function.Function<C,V> valuesCallback, C resampleCoordinate)
Performs the actual resampling using the provided input.- Parameters:
supportCoordinates
- the supporting points, which can be used as input to resamplevaluesCallback
- a function providing values of type V for all given coordinatesresampleCoordinate
- the coordinate at which the resampling shall be performed- Returns:
true
if the resampling will be possible with the provided input,false
if not.- Throws:
java.util.NoSuchElementException
- if the resampling cannot be performed for any reason
-
-