#include <Rank.hpp>
|
virtual | ~Rank ()=default |
|
virtual uint64_t | rank (std::size_t pos)=0 |
|
uint64_t | rank (std::size_t from, std::size_t to) |
|
virtual uint64_t | rankZero (std::size_t pos) |
|
uint64_t | rankZero (std::size_t from, std::size_t to) |
|
virtual std::size_t | size () const =0 |
|
An interface specifying ranking primitives.
This inferface specifies primitives both on ones and on zeroes because ranking on ones automatically makes it possible ranking on zeros, and viceversa. This interface provides template methods for rank(std::size_t, std::size_t), rankZero(std::size_t) and rankZero(std::size_t,std::size_t) using just rank(std::size_t).
◆ ~Rank()
virtual sux::Rank::~Rank |
( |
| ) |
|
|
virtualdefault |
◆ rank() [1/2]
uint64_t sux::Rank::rank |
( |
std::size_t |
from, |
|
|
std::size_t |
to |
|
) |
| |
|
inline |
Returns the number of ones between two given positions.
- Parameters
-
from | A starting position from 0 to size() (included). |
to | An ending position from from to size() (included). |
- Returns
- the number of ones from the starting position (included) to the ending position (excluded).
◆ rank() [2/2]
virtual uint64_t sux::Rank::rank |
( |
std::size_t |
pos | ) |
|
|
pure virtual |
Returns the number of ones before the given posistion.
- Parameters
-
pos | A position from 0 to size() (included). |
- Returns
- the number of ones from the start of the bit vector up to the given position (excluded).
◆ rankZero() [1/2]
uint64_t sux::Rank::rankZero |
( |
std::size_t |
from, |
|
|
std::size_t |
to |
|
) |
| |
|
inline |
Returns the number of zeros between two given positions.
- Parameters
-
from | A starting position from 0 to size() (included). |
to | An ending position from from to size() (included). |
- Returns
- the number of zeros from the starting position (included) to the ending position (excluded).
◆ rankZero() [2/2]
virtual uint64_t sux::Rank::rankZero |
( |
std::size_t |
pos | ) |
|
|
inlinevirtual |
Returns the number of zeros before the given posistion.
- Parameters
-
pos | A position from 0 to size() (included). |
- Returns
- the number of zeros from the start of the bit vector up to the given position (excluded).
◆ size()
virtual std::size_t sux::Rank::size |
( |
| ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: