IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP::core::Linear Class Reference

Linear function More...

#include <IMP/core/Linear.h>

Inheritance diagram for IMP::core::Linear:

Detailed Description

Linear function

Note
The offset is not meaningful for optimization, but does make the displayed energies nicer.

Definition at line 22 of file Linear.h.

Public Member Functions

 Linear (double offset, double slope)
 Create with the given offset and slope.
virtual double evaluate (double feature) const override
 Calculate score with respect to the given feature.
virtual DerivativePair evaluate_with_derivative (double feature) const override
 Calculate score and derivative with respect to the given feature.
double get_offset () const
double get_slope () const
virtual std::string get_type_name () const override
virtual ::IMP::VersionInfo get_version_info () const override
 Get information about the module and version of the object.
void set_offset (double f)
void set_slope (double f)
Public Member Functions inherited from IMP::UnaryFunction
 UnaryFunction (std::string name="UnaryFunction%1%")
Public Member Functions inherited from IMP::Object
CheckLevel get_check_level () const
 get_derived_object (self)
 Return this object cast to the most derived subclass.
LogLevel get_log_level () const
void set_check_level (CheckLevel l)
void set_log_level (LogLevel l)
 Set the logging level used in this object.
const std::string & get_name () const
 Get the (not necessarily unique) name of this object.
void set_name (std::string name)
void set_was_used (bool tf) const
void show (std::ostream &out=std::cout) const
virtual void clear_caches ()

Additional Inherited Members

Protected Member Functions inherited from IMP::Object
 Object (std::string name)
 Construct an object with the given name.
virtual void do_destroy ()

Constructor & Destructor Documentation

◆ Linear() [1/2]

IMP::core::Linear::Linear ( double offset,
double slope )

Create with the given offset and slope.

Definition at line 25 of file Linear.h.

◆ Linear() [2/2]

IMP::core::Linear::Linear ( )

Definition at line 26 of file Linear.h.

◆ ~Linear()

virtual IMP::core::Linear::~Linear ( )
virtual

Definition at line 45 of file Linear.h.

Member Function Documentation

◆ evaluate()

virtual double IMP::core::Linear::evaluate ( double feature) const
overridevirtual

Calculate score with respect to the given feature.

Parameters
[in]featureValue of feature being tested.
Returns
Score

Reimplemented from IMP::UnaryFunction.

Definition at line 36 of file Linear.h.

◆ evaluate_with_derivative()

virtual DerivativePair IMP::core::Linear::evaluate_with_derivative ( double feature) const
overridevirtual

Calculate score and derivative with respect to the given feature.

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

Reimplemented from IMP::UnaryFunction.

Definition at line 40 of file Linear.h.

Here is the call graph for this function:

◆ get_offset()

double IMP::core::Linear::get_offset ( ) const

Definition at line 34 of file Linear.h.

◆ get_slope()

double IMP::core::Linear::get_slope ( ) const

Definition at line 30 of file Linear.h.

◆ get_type_name()

virtual std::string IMP::core::Linear::get_type_name ( ) const
overridevirtual

Reimplemented from IMP::Object.

Definition at line 45 of file Linear.h.

◆ get_version_info()

virtual ::IMP::VersionInfo IMP::core::Linear::get_version_info ( ) const
overridevirtual

Get information about the module and version of the object.

Reimplemented from IMP::Object.

Definition at line 45 of file Linear.h.

Here is the call graph for this function:

◆ set_offset()

void IMP::core::Linear::set_offset ( double f)

Definition at line 32 of file Linear.h.

◆ set_slope()

void IMP::core::Linear::set_slope ( double f)

Definition at line 28 of file Linear.h.


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