C
- the type of the coordinate in whos direction to resampleV
- the type of the tensor valuespublic class RepeatingResampler<C,V> extends java.lang.Object implements SingleDimensionResampler<C,V>
Constructor and Description |
---|
RepeatingResampler(java.util.Comparator<C> comparator)
Constructs a new resampler, given a comparator for the relevant coordinates
|
Modifier and Type | Method and Description |
---|---|
boolean |
canResample(java.util.Set<C> coordinates,
C coordinate)
Has to return
true if the resampling will be possible, provided the the given parameters. |
V |
resample(java.util.Set<C> coordinates,
java.util.function.Function<C,V> valuesCallback,
C coordinate)
Performs the actual resampling using the provided input.
|
public RepeatingResampler(java.util.Comparator<C> comparator)
comparator
- the comparator for the coordinates in questionpublic V resample(java.util.Set<C> coordinates, java.util.function.Function<C,V> valuesCallback, C coordinate)
SingleDimensionResampler
resample
in interface SingleDimensionResampler<C,V>
coordinates
- the supporting points, which can be used as input to resamplevaluesCallback
- a function providing values of type V for all given coordinatescoordinate
- the coordinate at which the resampling shall be performedtrue
if the resampling will be possible with the provided input, false
if not.public boolean canResample(java.util.Set<C> coordinates, C coordinate)
SingleDimensionResampler
true
if the resampling will be possible, provided the the given parameters.canResample
in interface SingleDimensionResampler<C,V>
coordinates
- the supporting points, which can be used as input to resamplecoordinate
- the coordinate at which the resampling shall be performedtrue
if the resampling will be possible with the provided input, false
if not.