7 #ifndef IMPKERNEL_UNARY_FUNCTION_H
8 #define IMPKERNEL_UNARY_FUNCTION_H
10 #include <IMP/kernel_config.h>
11 #include "base_types.h"
14 IMPKERNEL_BEGIN_NAMESPACE
39 return evaluate(feature);
50 return evaluate_with_derivative(feature);
58 IMPKERNEL_END_NAMESPACE
virtual double evaluate(double feature) const
Calculate score with respect to the given feature.
#define IMP_REF_COUNTED_DESTRUCTOR(Name)
Ref counted objects should have private destructors.
Common base class for heavy weight IMP objects.
std::pair< double, double > DerivativePair
A pair representing a function value with its first derivative.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
A shared base class to help in debugging and things.
virtual DerivativePair evaluate_with_derivative(double feature) const
Calculate score and derivative with respect to the given feature.
Abstract single variable functor class for score functions.