Rank [Obj,Double]

Description

Rank objects by the value of a double property compared to a given value.

Input

  • SOURCE [OBJ,Double]: list of pairs to rank

Output

  • CLOSE [OBJ]: ranked objects, closest to the given value on top

  • FAR [OBJ]: ranked objects, farthest from the given value on top

Parameters

  • Value: the value to compare each object’s value against

  • Ranking Function:

    • Constant: the input value becomes the score

    • Normalised

      • Slope: positive value determining the slope of the ranking curve (which is a convex cusp). The higher the slope, the wider the ranking (i.e. the closer together the resulting scores). Explicitly, at distance Slope away from the given value, the new rank is 0.5.

  • Hard filter: optional hard filters to apply before ranking

    • No filter

    • Not greater than Value

    • Not smaller than Value