PearsonNP: abstract cost function. TODO collision tree
rename a var, fix one testcount