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

Composite feature-interaction constraint that combines two underlying constraint functions via a logical conjunction or disjunction. More...

#include <InteractionConstraintConnector.hpp>

Public Types

typedef std::function< bool(const Feature &, const Feature &)> ConstraintFunction
 Generic wrapper class used to store feature interaction constraint test functions. More...
 

Public Member Functions

 InteractionConstraintConnector (bool and_expr, const ConstraintFunction &func1, const ConstraintFunction &func2)
 Constructs a InteractionConstraintConnector that serves as a logical connective for the two specified constraint functions. More...
 
bool operator() (const Feature &ftr1, const Feature &ftr2) const
 Evaluates the combined constraint between features ftr1 and ftr2. More...
 

Detailed Description

Composite feature-interaction constraint that combines two underlying constraint functions via a logical conjunction or disjunction.

Member Typedef Documentation

◆ ConstraintFunction

Generic wrapper class used to store feature interaction constraint test functions.

Constructor & Destructor Documentation

◆ InteractionConstraintConnector()

CDPL::Pharm::InteractionConstraintConnector::InteractionConstraintConnector ( bool  and_expr,
const ConstraintFunction func1,
const ConstraintFunction func2 
)
inline

Constructs a InteractionConstraintConnector that serves as a logical connective for the two specified constraint functions.

Parameters
and_exprtrue for a logical conjuction of the function results, and false for a disjunction.
func1The first interaction constraint function.
func2The second interaction constraint function.

Member Function Documentation

◆ operator()()

bool CDPL::Pharm::InteractionConstraintConnector::operator() ( const Feature ftr1,
const Feature ftr2 
) const

Evaluates the combined constraint between features ftr1 and ftr2.

Parameters
ftr1The first feature.
ftr2The second feature.
Returns
true if the combined constraint is satisfied, and false otherwise.

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