IMP logo
Public Member Functions

IMP::UnaryFunction Class Reference


Detailed Description

Abstract single variable functor class for score functions.

These functors take a single feature value, and return a corresponding score (and optionally also the first derivative).

Implementers should check out IMP_UNARY_FUNCTION() and IMP_UNARY_FUNCTION_INLINE().

Inheritance diagram for IMP::UnaryFunction:

Public Member Functions

virtual double evaluate (double feature) const =0
 Calculate score with respect to the given feature.
virtual DerivativePair evaluate_with_derivative (double feature) const =0
 Calculate score and derivative with respect to the given feature.

Member Function Documentation

virtual double IMP::UnaryFunction::evaluate ( double  feature) const [pure virtual]

Calculate score with respect to the given feature.

Parameters:
[in]featureValue of feature being tested.
Returns:
Score
virtual DerivativePair IMP::UnaryFunction::evaluate_with_derivative ( double  feature) const [pure virtual]

Calculate score and derivative with respect to the given feature.

Parameters:
[in]featureValue of feature being tested.
Returns:
a FloatPair containing the score and its partial derivative with respect to the given feaure.

The documentation for this class was generated from the following file:

Generated on Thu Mar 24 2011 02:01:44 for IMP by doxygen 1.7.3