Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::Shape::ExactGaussianShapeOverlapFunction Class Reference

Shape::GaussianShapeOverlapFunction implementation that evaluates the overlap analytically using the full Gaussian-product expansion (no approximations). More...

#include <ExactGaussianShapeOverlapFunction.hpp>

+ Inheritance diagram for CDPL::Shape::ExactGaussianShapeOverlapFunction:

Public Types

typedef std::shared_ptr< ExactGaussianShapeOverlapFunctionSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated ExactGaussianShapeOverlapFunction instances. More...
 
- Public Types inherited from CDPL::Shape::GaussianShapeOverlapFunction
typedef std::shared_ptr< GaussianShapeOverlapFunctionSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated GaussianShapeOverlapFunction instances. More...
 
typedef std::function< bool(std::size_t)> ColorFilterFunction
 Type of the function used to filter color (pharmacophore) features by type. More...
 
typedef std::function< bool(std::size_t, std::size_t)> ColorMatchFunction
 Type of the function used to decide whether two color features match. More...
 

Public Member Functions

 ExactGaussianShapeOverlapFunction ()
 Constructs the ExactGaussianShapeOverlapFunction instance without associated shape functions. More...
 
 ExactGaussianShapeOverlapFunction (const ExactGaussianShapeOverlapFunction &func)
 Constructs a copy of the ExactGaussianShapeOverlapFunction instance func. More...
 
 ExactGaussianShapeOverlapFunction (const GaussianShapeFunction &ref_shape_func, const GaussianShapeFunction &ovl_shape_func)
 Constructs the ExactGaussianShapeOverlapFunction instance with the given reference and aligned shape functions. More...
 
 ~ExactGaussianShapeOverlapFunction ()
 Destructor. More...
 
void setShapeFunction (const GaussianShapeFunction &func, bool is_ref)
 Specifies the reference or aligned shape function used by the overlap evaluation. More...
 
const GaussianShapeFunctiongetShapeFunction (bool ref) const
 Returns the reference or aligned shape function. More...
 
void setColorMatchFunction (const ColorMatchFunction &func)
 Specifies the function used to decide whether two color features match. More...
 
const ColorMatchFunctiongetColorMatchFunction () const
 Returns the currently configured color-match function. More...
 
void setColorFilterFunction (const ColorFilterFunction &func)
 Specifies the function used to filter color features by type. More...
 
const ColorFilterFunctiongetColorFilterFunction () const
 Returns the currently configured color-filter function. More...
 
double calcSelfOverlap (bool ref) const
 Calculates the shape-only self-overlap of the reference or aligned shape function. More...
 
double calcColorSelfOverlap (bool ref) const
 Calculates the color self-overlap of the reference or aligned shape function. More...
 
double calcOverlap () const
 Calculates the shape-only overlap of the reference and aligned shape functions. More...
 
double calcColorOverlap () const
 Calculates the color overlap of the reference and aligned shape functions. More...
 
double calcOverlap (const Math::Vector3DArray &coords) const
 Calculates the shape-only overlap with the aligned shape element positions taken from coords. More...
 
double calcColorOverlap (const Math::Vector3DArray &coords) const
 Calculates the color overlap with the aligned shape element positions taken from coords. More...
 
double calcOverlapGradient (const Math::Vector3DArray &coords, Math::Vector3DArray &grad) const
 Calculates the shape overlap with the aligned shape element positions taken from coords and returns the gradient with respect to those positions. More...
 
ExactGaussianShapeOverlapFunctionoperator= (const ExactGaussianShapeOverlapFunction &func)
 Copy assignment operator. More...
 
- Public Member Functions inherited from CDPL::Shape::GaussianShapeOverlapFunction
virtual ~GaussianShapeOverlapFunction ()
 Virtual destructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CDPL::Shape::GaussianShapeOverlapFunction
 GaussianShapeOverlapFunction ()
 
 GaussianShapeOverlapFunction (const GaussianShapeOverlapFunction &func)
 
GaussianShapeOverlapFunctionoperator= (const GaussianShapeOverlapFunction &func)
 

Detailed Description

Shape::GaussianShapeOverlapFunction implementation that evaluates the overlap analytically using the full Gaussian-product expansion (no approximations).

The exact evaluation is more accurate but typically slower than Shape::FastGaussianShapeOverlapFunction.

Member Typedef Documentation

◆ SharedPointer

A reference-counted smart pointer [SHPTR] for dynamically allocated ExactGaussianShapeOverlapFunction instances.

Constructor & Destructor Documentation

◆ ExactGaussianShapeOverlapFunction() [1/3]

CDPL::Shape::ExactGaussianShapeOverlapFunction::ExactGaussianShapeOverlapFunction ( )

Constructs the ExactGaussianShapeOverlapFunction instance without associated shape functions.

◆ ExactGaussianShapeOverlapFunction() [2/3]

CDPL::Shape::ExactGaussianShapeOverlapFunction::ExactGaussianShapeOverlapFunction ( const ExactGaussianShapeOverlapFunction func)

Constructs a copy of the ExactGaussianShapeOverlapFunction instance func.

Parameters
funcThe ExactGaussianShapeOverlapFunction to copy.

◆ ExactGaussianShapeOverlapFunction() [3/3]

CDPL::Shape::ExactGaussianShapeOverlapFunction::ExactGaussianShapeOverlapFunction ( const GaussianShapeFunction ref_shape_func,
const GaussianShapeFunction ovl_shape_func 
)

Constructs the ExactGaussianShapeOverlapFunction instance with the given reference and aligned shape functions.

Parameters
ref_shape_funcThe reference shape function.
ovl_shape_funcThe aligned shape function.

◆ ~ExactGaussianShapeOverlapFunction()

CDPL::Shape::ExactGaussianShapeOverlapFunction::~ExactGaussianShapeOverlapFunction ( )

Destructor.

Member Function Documentation

◆ setShapeFunction()

void CDPL::Shape::ExactGaussianShapeOverlapFunction::setShapeFunction ( const GaussianShapeFunction func,
bool  is_ref 
)
virtual

Specifies the reference or aligned shape function used by the overlap evaluation.

Parameters
funcThe shape function.
is_refIf true, func is the reference shape function; otherwise the aligned shape function.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ getShapeFunction()

const GaussianShapeFunction* CDPL::Shape::ExactGaussianShapeOverlapFunction::getShapeFunction ( bool  ref) const
virtual

Returns the reference or aligned shape function.

Parameters
refIf true, the reference shape function is returned; otherwise the aligned shape function.
Returns
A pointer to the requested shape function (or nullptr if none is associated).

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ setColorMatchFunction()

void CDPL::Shape::ExactGaussianShapeOverlapFunction::setColorMatchFunction ( const ColorMatchFunction func)
virtual

Specifies the function used to decide whether two color features match.

Parameters
funcThe color-match function.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ getColorMatchFunction()

const ColorMatchFunction& CDPL::Shape::ExactGaussianShapeOverlapFunction::getColorMatchFunction ( ) const
virtual

Returns the currently configured color-match function.

Returns
A const reference to the color-match function.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ setColorFilterFunction()

void CDPL::Shape::ExactGaussianShapeOverlapFunction::setColorFilterFunction ( const ColorFilterFunction func)
virtual

Specifies the function used to filter color features by type.

Parameters
funcThe color-filter function.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ getColorFilterFunction()

const ColorFilterFunction& CDPL::Shape::ExactGaussianShapeOverlapFunction::getColorFilterFunction ( ) const
virtual

Returns the currently configured color-filter function.

Returns
A const reference to the color-filter function.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ calcSelfOverlap()

double CDPL::Shape::ExactGaussianShapeOverlapFunction::calcSelfOverlap ( bool  ref) const
virtual

Calculates the shape-only self-overlap of the reference or aligned shape function.

Parameters
refIf true, the reference self-overlap is returned; otherwise the aligned self-overlap.
Returns
The self-overlap value.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ calcColorSelfOverlap()

double CDPL::Shape::ExactGaussianShapeOverlapFunction::calcColorSelfOverlap ( bool  ref) const
virtual

Calculates the color self-overlap of the reference or aligned shape function.

Parameters
refIf true, the reference color self-overlap is returned; otherwise the aligned color self-overlap.
Returns
The color self-overlap value.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ calcOverlap() [1/2]

double CDPL::Shape::ExactGaussianShapeOverlapFunction::calcOverlap ( ) const
virtual

Calculates the shape-only overlap of the reference and aligned shape functions.

Returns
The shape overlap value.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ calcColorOverlap() [1/2]

double CDPL::Shape::ExactGaussianShapeOverlapFunction::calcColorOverlap ( ) const
virtual

Calculates the color overlap of the reference and aligned shape functions.

Returns
The color overlap value.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ calcOverlap() [2/2]

double CDPL::Shape::ExactGaussianShapeOverlapFunction::calcOverlap ( const Math::Vector3DArray coords) const
virtual

Calculates the shape-only overlap with the aligned shape element positions taken from coords.

Parameters
coordsThe element 3D positions of the aligned shape.
Returns
The shape overlap value.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ calcColorOverlap() [2/2]

double CDPL::Shape::ExactGaussianShapeOverlapFunction::calcColorOverlap ( const Math::Vector3DArray coords) const
virtual

Calculates the color overlap with the aligned shape element positions taken from coords.

Parameters
coordsThe element 3D positions of the aligned shape.
Returns
The color overlap value.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ calcOverlapGradient()

double CDPL::Shape::ExactGaussianShapeOverlapFunction::calcOverlapGradient ( const Math::Vector3DArray coords,
Math::Vector3DArray grad 
) const
virtual

Calculates the shape overlap with the aligned shape element positions taken from coords and returns the gradient with respect to those positions.

Parameters
coordsThe element 3D positions of the aligned shape.
gradThe output element-wise gradient of the overlap.
Returns
The shape overlap value.

Implements CDPL::Shape::GaussianShapeOverlapFunction.

◆ operator=()

ExactGaussianShapeOverlapFunction& CDPL::Shape::ExactGaussianShapeOverlapFunction::operator= ( const ExactGaussianShapeOverlapFunction func)

Copy assignment operator.

Parameters
funcThe other ExactGaussianShapeOverlapFunction instance.
Returns
A reference to itself.

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