9 #ifndef IMPKERNEL_UNARY_FUNCTION_MACROS_H
10 #define IMPKERNEL_UNARY_FUNCTION_MACROS_H
11 #include <IMP/kernel/kernel_config.h>
15 #define IMP_UNARY_FUNCTION(Name) \
16 IMPKERNEL_DEPRECATED_MACRO(2.1, "Declare the methods directly."); \
18 virtual DerivativePair evaluate_with_derivative(double feature) const); \
19 IMP_IMPLEMENT(virtual double evaluate(double feature) const); \
20 IMP_OBJECT_NO_WARNING(Name)
23 #define IMP_UNARY_FUNCTION_INLINE(Name, value_expression, \
24 derivative_expression, show_expression) \
25 IMPKERNEL_DEPRECATED_MACRO(2.1, "Declare the methods directly."); \
26 IMP_IMPLEMENT_INLINE( \
27 virtual DerivativePair evaluate_with_derivative(double feature) const, { \
28 return DerivativePair((value_expression), (derivative_expression)); \
30 IMP_IMPLEMENT_INLINE(virtual double evaluate(double feature) const, \
31 { return (value_expression); }); \
32 IMP_OBJECT_METHODS(Name)
Single variable function.