Loading...
Searching...
No Matches
RDKit::RealValueVect Class Reference

`#include <RealValueVect.h>`

## Public Member Functions

| RealValueVect ()=default
| RealValueVect (unsigned int length)
| initialize with a particular size
| RealValueVect (unsigned int length, double val)
| initialize with a particular size and initial value
| RealValueVect (const std::string &pkl)
| constructor from a pickle
| RealValueVect (const char *pkl, unsigned int len)
| constructor from a pickle
double | getVal (unsigned int i) const
| return the value at an index
double | operator[] (unsigned int idx) const
| support indexing using []
void | setVal (unsigned int i, double val)
| set the value at an index
double | getTotalVal () const
| returns the sum of all the elements in the vect
unsigned int | getLength () const
| returns the length
unsigned int | size () const
| returns the length
bool | compareVectors (const RealValueVect &other) const
| compares 2 vectors and returns false if different
RealValueVect & | operator&= (const RealValueVect &other)
| in-place operator&
RealValueVect & | operator|= (const RealValueVect &other)
| in-place operator|
RealValueVect & | operator+= (const RealValueVect &other)
| in-place operator+
RealValueVect & | operator-= (const RealValueVect &other)
| in-place operator-
std::string | toString () const
| returns a binary string representation (pickle)
void | setLength (unsigned int sz)
void | setToVal (double val)
const std::vector< double > & | getData () const
std::vector< double > & | getData ()

## Detailed Description

a class for efficiently storing vectors of double values Has additional features compared to std::vector<double>: construct from and write to pickle

Definition at line 27 of file RealValueVect.h.

## Constructor & Destructor Documentation

## RealValueVect() [1/5]

RDKit::RealValueVect::RealValueVect | ( |  | ) |

default

Referenced by compareVectors(), operator&=(), operator+=(), operator-=(), and operator|=().

## RealValueVect() [2/5]

RDKit::RealValueVect::RealValueVect | ( | unsigned int | length | ) |

inline

initialize with a particular size

Definition at line 31 of file RealValueVect.h.

## RealValueVect() [3/5]

RDKit::RealValueVect::RealValueVect | ( | unsigned int | length,
|  | double | val )

inline

initialize with a particular size and initial value

Definition at line 36 of file RealValueVect.h.

## RealValueVect() [4/5]

RDKit::RealValueVect::RealValueVect | ( | const std::string & | pkl | ) |

inline

constructor from a pickle

Definition at line 41 of file RealValueVect.h.

## RealValueVect() [5/5]

RDKit::RealValueVect::RealValueVect | ( | const char * | pkl,
|  | unsigned int | len )

inline

constructor from a pickle

Definition at line 46 of file RealValueVect.h.

## Member Function Documentation

## compareVectors()

bool RDKit::RealValueVect::compareVectors | ( | const RealValueVect & | other | ) | const

compares 2 vectors and returns false if different

References RealValueVect().

## getData() [1/2]

std::vector< double > & RDKit::RealValueVect::getData | ( |  | ) |

inline

Definition at line 91 of file RealValueVect.h.

## getData() [2/2]

const std::vector< double > & RDKit::RealValueVect::getData | ( |  | ) | const

inline

Definition at line 90 of file RealValueVect.h.

## getLength()

unsigned int RDKit::RealValueVect::getLength | ( |  | ) | const

inline

returns the length

Definition at line 61 of file RealValueVect.h.

Referenced by size().

## getTotalVal()

double RDKit::RealValueVect::getTotalVal | ( |  | ) | const

returns the sum of all the elements in the vect

## getVal()

double RDKit::RealValueVect::getVal | ( | unsigned int | i | ) | const

return the value at an index

Referenced by operator[]().

## operator&=()

RealValueVect & RDKit::RealValueVect::operator&= | ( | const RealValueVect & | other | ) |

in-place operator&

References RealValueVect().

## operator+=()

RealValueVect & RDKit::RealValueVect::operator+= | ( | const RealValueVect & | other | ) |

in-place operator+

References RealValueVect().

## operator-=()

RealValueVect & RDKit::RealValueVect::operator-= | ( | const RealValueVect & | other | ) |

in-place operator-

References RealValueVect().

## operator[]()

double RDKit::RealValueVect::operator[] | ( | unsigned int | idx | ) | const

inline

support indexing using []

Definition at line 52 of file RealValueVect.h.

References getVal().

## operator|=()

RealValueVect & RDKit::RealValueVect::operator|= | ( | const RealValueVect & | other | ) |

in-place operator|

References RealValueVect().

## setLength()

void RDKit::RealValueVect::setLength | ( | unsigned int | sz | ) |

inline

Definition at line 84 of file RealValueVect.h.

## setToVal()

void RDKit::RealValueVect::setToVal | ( | double | val | ) |

inline

Definition at line 88 of file RealValueVect.h.

## setVal()

void RDKit::RealValueVect::setVal | ( | unsigned int | i,
|  | double | val )

set the value at an index

## size()

unsigned int RDKit::RealValueVect::size | ( |  | ) | const

inline

returns the length

Definition at line 64 of file RealValueVect.h.

References getLength().

## toString()

std::string RDKit::RealValueVect::toString | ( |  | ) | const

returns a binary string representation (pickle)

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

- RealValueVect.h