12 namespace scaffold{
namespace scoring {
15 template<
typename Element>
17 unsigned operator()(
const std::pair<Element, unsigned>& e)
const
24 template<
typename Element>
26 const unsigned reference_point;
28 DistanceScore(
const unsigned _reference_point): reference_point(_reference_point) {}
29 unsigned operator()(
const std::pair<Element, unsigned>& e)
const
31 return (
unsigned)abs((
long)e.second - (
long)reference_point);
36 template<
typename Element,
class Predicate>
44 unsigned operator()(
const std::pair<Element, unsigned>& e)
const
46 if(predicate(e.first))
a scoring returning the distance to a reference score if a predicate evaluates to true and UINT_MAX o...
Definition: scoring.hpp:37
Definition: read_adj_list.hpp:22
prototype predicate
Definition: predicates.hpp:14
a scoring function for a pair of something and unsigned that just returns the unsigned ...
Definition: scoring.hpp:16
a scoring function returning the distance to a reference score given at construction ...
Definition: scoring.hpp:25