The points are in the euclidean plane, let $\mathbb{P}$ be the set containing all the finite sets of $\mathbb{R}^2$ points.
I am looking for a function $m : \mathbb{P} \to \mathbb{R}^+$ in order to measure misalignment :
- If $P \in \mathbb{P}$ contains 3 aligned points then $m(P)=0$
- If $P \in \mathbb{P}$ doesn't contain 3 aligned points then $m(P)>0$
- $m$ continuous according to a shifting of the points (not fully defined)
- Bonus : $m$ should be easy to compute for small inputs.
My only idea is to take the minimum of the hausdorff distance (or any other distance) between the input and any set containing 3 aligned points. But it's not easy to compute, even for small examples.