IMP logo

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:

Inheritance graph
[legend]

Public Member Functions

def __disown__
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.

Friends

template<class T >
void IMP::internal::unref (T *)

Member Function Documentation

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

Calculate score with respect to the given feature.

Parameters:
[in] feature Value 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] feature Value 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 files:

Generated on Mon Mar 8 23:08:46 2010 for IMP by doxygen 1.5.8