phasedb v0.0.2 PhaseDB.Interpolator.NearestNeighbour

Implements a simple nearest-neighbour interpolation.

Sometimes also called: - proximal interpolation - point sampling - piecewise constant

Note: in the unlikely event that both neighbouring samples are equidistant this interpolator will fall-back to using the Linear interpolator.

See also: https://en.wikipedia.org/wiki/Nearest-neighbor_interpolation

Summary

Functions

generate_sample(at, list1, list2)

Callback implementation for PhaseDB.Interpolator.generate_sample/3.

sample_distance()

Callback implementation for PhaseDB.Interpolator.sample_distance/0.