Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::BitQueue64 Class Reference

#include <bitset.h>

Public Member Functions

 BitQueue64 ()
 
 BitQueue64 (int size)
 
 BitQueue64 (const BitQueue64 &)=delete
 This type is neither copyable nor movable.
 
BitQueue64operator= (const BitQueue64 &)=delete
 
void IncreaseSize (int size)
 
void ClearAndResize (int size)
 
void Set (int i)
 
void SetAllBefore (int i)
 Sets all the bits from 0 up to i-1 to 1.
 
int Top () const
 Returns the position of the highest bit set in O(1) or -1 if no bit is set.
 
void ClearTop ()
 Clears the Top() bit and recomputes the position of the next Top().
 

Detailed Description

Specialized version of Bitset64 that allows to query the last bit set more efficiently.

Definition at line 732 of file bitset.h.

Constructor & Destructor Documentation

◆ BitQueue64() [1/3]

operations_research::BitQueue64::BitQueue64 ( )
inline

Definition at line 734 of file bitset.h.

◆ BitQueue64() [2/3]

operations_research::BitQueue64::BitQueue64 ( int size)
inlineexplicit

Definition at line 735 of file bitset.h.

◆ BitQueue64() [3/3]

operations_research::BitQueue64::BitQueue64 ( const BitQueue64 & )
delete

This type is neither copyable nor movable.

Member Function Documentation

◆ ClearAndResize()

void operations_research::BitQueue64::ClearAndResize ( int size)
inline

Definition at line 748 of file bitset.h.

◆ ClearTop()

void operations_research::BitQueue64::ClearTop ( )
inline

Clears the Top() bit and recomputes the position of the next Top().

Note(user): I experimented with reversing the bit order in a bucket to use LeastSignificantBitPosition64() and it is only slightly faster at the cost of a lower Set() speed. So I preferred this version.

Definition at line 777 of file bitset.h.

◆ IncreaseSize()

void operations_research::BitQueue64::IncreaseSize ( int size)
inline

Definition at line 742 of file bitset.h.

◆ operator=()

BitQueue64 & operations_research::BitQueue64::operator= ( const BitQueue64 & )
delete

◆ Set()

void operations_research::BitQueue64::Set ( int i)
inline

Definition at line 754 of file bitset.h.

◆ SetAllBefore()

void operations_research::BitQueue64::SetAllBefore ( int i)
inline

Sets all the bits from 0 up to i-1 to 1.

Definition at line 762 of file bitset.h.

◆ Top()

int operations_research::BitQueue64::Top ( ) const
inline

Returns the position of the highest bit set in O(1) or -1 if no bit is set.

Definition at line 774 of file bitset.h.


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