Implementation of adaptive knot selection scheme from He, Shen and Shen (IEEE Sig Proc Letters, 2001)