RDKit: RDKit::CIPLabeler::PairList Class Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
RDKit::CIPLabeler::PairList Class Reference

`#include <Pairlist.h>`

## Public Types
using | pairing_t = std::uint64_t

## Public Member Functions
| PairList ()=default
| PairList (Descriptor ref)
| PairList (const PairList &head, const PairList &tail)
Descriptor | getRefDescriptor () const
bool | add (Descriptor descriptor)
template<typename T>
void | addAll (const T &descriptors)
pairing_t | getPairing () const
int | compareTo (const PairList &that) const
bool | operator< (const PairList &that) const
std::string | toString () const

## Static Public Member Functions
static Descriptor | ref (Descriptor descriptor)

## Static Public Attributes
static constexpr int | numPairingBits = sizeof(pairing_t) * 8

## Detailed Description

Implementation of a descriptor list that allows descriptors to be added and ignored. The list maintains an integer value throughout which stores the pairing of descriptors and allows easy comparison between descriptor lists in that higher priority descriptor pairing will always have a higher integer value. The integer value can be access via the `getPairing()` method.

See also
  Descriptor

Definition at line 32 of file Pairlist.h.

## Member Typedef Documentation

## ◆ pairing_t

using RDKit::CIPLabeler::PairList::pairing_t = std::uint64_t

Definition at line 34 of file Pairlist.h.

## Constructor & Destructor Documentation

## ◆ PairList() [1/3]

RDKit::CIPLabeler::PairList::PairList | ( |  | ) |
| default

Referenced by compareTo(), operator<(), and PairList().

## ◆ PairList() [2/3]

RDKit::CIPLabeler::PairList::PairList | ( | Descriptor | ref | ) |
| inline

Definition at line 54 of file Pairlist.h.

References add(), and ref().

## ◆ PairList() [3/3]

RDKit::CIPLabeler::PairList::PairList | ( | const PairList & | head,
|  | const PairList & | tail )
| inline

Creates a new list from a provided head and tail. The head and tail ignored descriptors are first transferred and then their descriptors. In either list, descriptors that are ignored by the other will be not be added to the new instance.

Parameters

  head | the head of the list (prefix)
  tail | the tail of the list (suffix)

Definition at line 65 of file Pairlist.h.

References addAll(), and PairList().

## Member Function Documentation

## ◆ add()

bool RDKit::CIPLabeler::PairList::add | ( | Descriptor | descriptor | ) |
| inline

Adds a descriptor to the descriptor list. If the provided descriptor is present in the ignore set the descriptor will not be added.

Parameters

  descriptor | the descriptor to add.

Returns
  whether the descriptor was added to the list

Definition at line 81 of file Pairlist.h.

References RDKit::CIPLabeler::M, RDKit::CIPLabeler::P, RDKit::CIPLabeler::R, RDKit::CIPLabeler::S, RDKit::CIPLabeler::seqCis, and RDKit::CIPLabeler::seqTrans.

Referenced by addAll(), and PairList().

## ◆ addAll()

template<typename T>

void RDKit::CIPLabeler::PairList::addAll | ( | const T & | descriptors | ) |
| inline

Adds multiple descriptors to the descriptor list. If the descriptor is present in the ignore set it will not be added to the list.

Parameters

  descriptors | a collection of descriptors to be added

Definition at line 103 of file Pairlist.h.

References add().

Referenced by PairList().

## ◆ compareTo()

int RDKit::CIPLabeler::PairList::compareTo | ( | const PairList & | that | ) | const
| inline

Definition at line 119 of file Pairlist.h.

References PairList().

Referenced by operator<().

## ◆ getPairing()

pairing_t RDKit::CIPLabeler::PairList::getPairing | ( |  | ) | const
| inline

Access a positive integer that represents the like/unlike pairings of this descriptor list. The like/unlike is represented by set bits in an integer value and means larger integer values indicates a higher descriptor pairing preference.

Returns
  an integer representing the descriptor pairings

Definition at line 117 of file Pairlist.h.

## ◆ getRefDescriptor()

Descriptor RDKit::CIPLabeler::PairList::getRefDescriptor | ( |  | ) | const
| inline

Definition at line 71 of file Pairlist.h.

References ref().

## ◆ operator<()

bool RDKit::CIPLabeler::PairList::operator< | ( | const PairList & | that | ) | const
| inline

Definition at line 136 of file Pairlist.h.

References compareTo(), and PairList().

## ◆ ref()

static Descriptor RDKit::CIPLabeler::PairList::ref | ( | Descriptor | descriptor | ) |
| inlinestatic

Definition at line 37 of file Pairlist.h.

References RDKit::CIPLabeler::M, RDKit::CIPLabeler::NONE, RDKit::CIPLabeler::P, RDKit::CIPLabeler::R, RDKit::CIPLabeler::S, RDKit::CIPLabeler::seqCis, and RDKit::CIPLabeler::seqTrans.

Referenced by getRefDescriptor(), PairList(), and toString().

## ◆ toString()

std::string RDKit::CIPLabeler::PairList::toString | ( |  | ) | const
| inline

Definition at line 138 of file Pairlist.h.

References RDKit::CIPLabeler::NONE, ref(), and RDKit::CIPLabeler::to_string().

## Member Data Documentation

## ◆ numPairingBits

int RDKit::CIPLabeler::PairList::numPairingBits = sizeof(pairing_t) * 8
| staticconstexpr

Definition at line 35 of file Pairlist.h.

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

- Pairlist.h