This function is harmonic between center and threshold and then asymptotically converges to the limit value.
The function form above the threshold is currently limit-b/(x-o) where x is the offset from the center and b,o are constants chosen to make the function smooth and continuous. This form may change without notice unless someone tells us it is important that it does not.
[in] | DIRECTION | Whether to be an upper bound, lower bound, or both directions. It should be one of the BoundDirection enum values. If it is LOWER, than the function is 0 for all values above the passed center. |
Public Member Functions | |
virtual double | evaluate (double feature) const |
virtual DerivativePair | evaluate_with_derivative (double feature) const |
virtual std::string | get_type_name () const |
virtual ::IMP::VersionInfo | get_version_info () const |
TruncatedHarmonic (Float center, Float k, Float threshold) | |
TruncatedHarmonic (Float center, Float k, Float threshold, Float limit) |
IMP::core::TruncatedHarmonic< DIRECTION >::TruncatedHarmonic | ( | Float | center, | |
Float | k, | |||
Float | threshold, | |||
Float | limit | |||
) |
[in] | center | The center point for the harmonic. |
[in] | k | The spring constant for the harmonic. |
[in] | threshold | How far the harmonic term extends from the center. |
[in] | limit | The value to which the function converges above the threshold. |
IMP::core::TruncatedHarmonic< DIRECTION >::TruncatedHarmonic | ( | Float | center, | |
Float | k, | |||
Float | threshold | |||
) |
Set limit to a reasonable value.