Loading...
Searching...
No Matches
bitvec.cpp File Reference
`#include <openbabel/babelconfig.h>`
`#include <openbabel/bitvec.h>`
`#include <openbabel/oberror.h>`
`#include <cstdlib>`

## Namespaces

namespace | OpenBabel

## Macros

#define | LowBit(set, bit)

## Functions

OBBitVec | operator| (const OBBitVec &bv1, const OBBitVec &bv2)
OBBitVec | operator& (const OBBitVec &bv1, const OBBitVec &bv2)
OBBitVec | operator^ (const OBBitVec &bv1, const OBBitVec &bv2)
OBBitVec | operator- (const OBBitVec &bv1, const OBBitVec &bv2)
bool | operator== (const OBBitVec &bv1, const OBBitVec &bv2)
bool | operator< (const OBBitVec &bv1, const OBBitVec &bv2)
std::istream & | operator>> (std::istream &is, OBBitVec &bv)
std::ostream & | operator<< (std::ostream &os, const OBBitVec &bv)
double | Tanimoto (const OBBitVec &bv1, const OBBitVec &bv2)

## Variables

static unsigned int | bitsoff [SETWORD]
const unsigned | nibble_bit_count [0x10]

## Detailed Description

Fast and efficient bitstring class.

## Macro Definition Documentation

## LowBit

#define LowBit | ( |  | set,
|  |  | bit )

Value:
{int m; \
if (set != 0) \
{ \
bit = 31; \
if (set != 0x80000000) { \
if ((m = (set & 0x0000ffff))!=0) {set = m; bit -= 16;} \
if ((m = (set & 0x00ff00ff))!=0) {set = m; bit -= 8;} \
if ((m = (set & 0x0f0f0f0f))!=0) {set = m; bit -= 4;} \
if ((m = (set & 0x33333333))!=0) {set = m; bit -= 2;} \
if ((m = (set & 0x55555555))!=0) {set = m; bit -= 1;}}} \
else bit = -1;}

Referenced by OBBitVec::NextBit().