RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDPickers::DistPicker Class Referenceabstract

Abstract base class to do perform item picking (typically molecules) using a distance matrix. More...

#include <DistPicker.h>

Inheritance diagram for RDPickers::DistPicker:
RDPickers::HierarchicalClusterPicker RDPickers::LeaderPicker RDPickers::MaxMinPicker

Public Member Functions

 DistPicker ()
 Default constructor.
 
virtual ~DistPicker ()
 
virtual RDKit::INT_VECT pick (const double *distMat, unsigned int poolSize, unsigned int pickSize) const =0
 this is a virtual function specific to the type of algorihtm used
 

Detailed Description

Abstract base class to do perform item picking (typically molecules) using a distance matrix.

This class should never be instantiated by itself. One of the child classes need to be used. The picking algorithm itself is missing here and only the child classes implement that This class contains a pointer to a distance matrix, but it is not responsible for cleaning it up

Definition at line 46 of file DistPicker.h.

Constructor & Destructor Documentation

◆ DistPicker()

RDPickers::DistPicker::DistPicker ( )
inline

Default constructor.

Definition at line 51 of file DistPicker.h.

◆ ~DistPicker()

virtual RDPickers::DistPicker::~DistPicker ( )
inlinevirtual

Definition at line 52 of file DistPicker.h.

Member Function Documentation

◆ pick()

virtual RDKit::INT_VECT RDPickers::DistPicker::pick ( const double *  distMat,
unsigned int  poolSize,
unsigned int  pickSize 
) const
pure virtual

this is a virtual function specific to the type of algorihtm used

The child classes need to implement this function

ARGUMENTS:

Parameters
distMat- distance matrix - a vector of double. It is assumed that only the lower triangle elements of the matrix are supplied in a 1D array
poolSize- the size of the pool to pick the items from. It is assumed that the distance matrix above contains the right number of elements; i.e. poolSize*(poolSize-1)
pickSize- the number items to pick from pool (<= poolSize)
Returns
a vector with indices of the picked items.

Implemented in RDPickers::HierarchicalClusterPicker, RDPickers::LeaderPicker, and RDPickers::MaxMinPicker.


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