This function can be used for example to separate labels that are too close to one another.
The resulting vector will create enough space, such that the labels do not overlap any more, yet are still close to their original values.
The output vector has the following properties. For all elements e_i
, min <= e_i <= max
.
For the distance D
between e_i
and e_(i+1)
, D >= max(d_i, d_(i+1))
. And finally, the distance
between e_i
and X_i
is minimized for all e_i
.