HOG2
Public Member Functions | Private Attributes | List of all members
BitVector Class Reference

#include <BitVector.h>

Public Member Functions

 BitVector (uint64_t size)
 
 BitVector (uint64_t size, const char *)
 
 ~BitVector ()
 
void clear ()
 
uint64_t GetSize ()
 
bool Get (uint64_t index) const
 
void Set (uint64_t index, bool value)
 
void SetTrue (uint64_t index)
 
void Save (const char *)
 
void Load (const char *)
 
bool Equals (BitVector *)
 
uint64_t GetNumSetBits ()
 

Private Attributes

uint64_t size
 
uint64_t true_size
 
storageElementstorage
 
int fd
 

Detailed Description

Definition at line 34 of file BitVector.h.

Constructor & Destructor Documentation

◆ BitVector() [1/2]

BitVector::BitVector ( uint64_t  size)

Definition at line 18 of file BitVector.cpp.

References size, storage, storageBitsPower, and true_size.

◆ BitVector() [2/2]

BitVector::BitVector ( uint64_t  size,
const char *  fname 
)

Definition at line 27 of file BitVector.cpp.

References Load(), size, and true_size.

◆ ~BitVector()

BitVector::~BitVector ( )

Definition at line 33 of file BitVector.cpp.

References storage.

Member Function Documentation

◆ clear()

void BitVector::clear ( )

Definition at line 75 of file BitVector.cpp.

References size, and storage.

◆ Equals()

bool BitVector::Equals ( BitVector bv)

Definition at line 111 of file BitVector.cpp.

References size, and storage.

◆ Get()

bool BitVector::Get ( uint64_t  index) const
inline

◆ GetNumSetBits()

uint64_t BitVector::GetNumSetBits ( )

Definition at line 120 of file BitVector.cpp.

References size, and storage.

Referenced by BloomFilter::Analyze().

◆ GetSize()

uint64_t BitVector::GetSize ( )
inline

Definition at line 40 of file BitVector.h.

References true_size.

Referenced by BloomFilter::Analyze().

◆ Load()

void BitVector::Load ( const char *  file)

Definition at line 51 of file BitVector.cpp.

References size, storage, storageBitsPower, and true_size.

Referenced by BitVector(), BloomFilter::BloomFilter(), and BloomFilter::Load().

◆ Save()

void BitVector::Save ( const char *  file)

Definition at line 38 of file BitVector.cpp.

References size, storage, and true_size.

Referenced by BloomFilter::~BloomFilter().

◆ Set()

void BitVector::Set ( uint64_t  index,
bool  value 
)

Definition at line 88 of file BitVector.cpp.

References size, storage, storageBitsPower, and storageMask.

Referenced by SharedAMapGroup::UpdateLocation().

◆ SetTrue()

void BitVector::SetTrue ( uint64_t  index)
inline

Definition at line 59 of file BitVector.h.

References storage, storageBitsPower, and storageMask.

Referenced by BloomFilter::Insert().

Member Data Documentation

◆ fd

int BitVector::fd
private

Definition at line 51 of file BitVector.h.

◆ size

uint64_t BitVector::size
private

Definition at line 49 of file BitVector.h.

Referenced by BitVector(), clear(), Equals(), GetNumSetBits(), Load(), Save(), and Set().

◆ storage

storageElement* BitVector::storage
private

Definition at line 50 of file BitVector.h.

Referenced by BitVector(), clear(), Equals(), Get(), GetNumSetBits(), Load(), Save(), Set(), SetTrue(), and ~BitVector().

◆ true_size

uint64_t BitVector::true_size
private

Definition at line 49 of file BitVector.h.

Referenced by BitVector(), GetSize(), Load(), and Save().


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