8 #ifndef IMPSCORE_FUNCTOR_ADD_SCORES_H
9 #define IMPSCORE_FUNCTOR_ADD_SCORES_H
11 #include <IMP/score_functor/score_functor_config.h>
14 IMPSCOREFUNCTOR_BEGIN_NAMESPACE
18 template <
class BaseDistanceScore0,
class BaseDistanceScore1>
20 typedef BaseDistanceScore0 P0;
21 typedef BaseDistanceScore1 P1;
26 BaseDistanceScore1 p1): p0_(p0), p1_(p1){}
27 template <
unsigned int D>
29 double distance)
const {
30 return p0_.get_score(m,pi, distance)
31 + p1_.get_score(m, pi, distance);
33 template <
unsigned int D>
36 double distance)
const {
40 ret0.second+ret1.second);
42 template <
unsigned int D>
44 double squared_distance)
const {
45 return p0_.get_is_trivially_zero(m, p, squared_distance)
46 && p1_.get_is_trivially_zero(m, p, squared_distance);
50 template <
unsigned int D>
51 double get_maximum_range(
Model *m,
53 return std::max(p0_.get_maximum_range(m, p),
54 p1_.get_maximum_range(m, p));
56 ModelObjectsTemp get_inputs(
Model *m,
58 return p0_.get_inputs(m, pis)
59 + p1_.get_inputs(m, pis);
61 void show(std::ostream &out)
const{
67 IMPSCOREFUNCTOR_END_NAMESPACE