How do you encode an ascending sequence as a periodic function?

36 Views Asked by At

Say I have a set of numbers in random order $A=\{2.3, 5.6, 1.2, 19.4\}$

I want to save these as a periodic function but where the `natural ordering' of the function is ascending. I could save them as a Fourier function as in:

$f(x) = \sum\limits_n A_n \cos(n \pi x)$

but this gives the wrong ordering. What I mean is it has a natural order.

I could save them as a function:

$f(x) = \sum\limits_n e^{-(x-A_n)^2}$

This would give a function that looks like it has the right ordering. But is not periodic.

By natural ordering I mean that given the function $f$ when trying to get back out the values by some means the natural algorithm would give the values back in ascending order of magnitude.