SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
|
A class supporting rank queries in constant time. The implementation is a lightweight version of the data structure proposed by Jacobson (1989), Munro (1996), and Clark (1996). More...
#include <rank_support_jmc.hpp>
Inherits sdsl::rank_support.
Public Types | |
typedef bit_vector | bit_vector_type |
Public Member Functions | |
rank_support_jmc (const int_vector< 1 > *v=NULL) | |
rank_support_jmc (const rank_support_jmc &rs) | |
void | init (const int_vector< 1 > *v=NULL) |
Initializes the data structure. | |
const size_type | rank (size_type idx) const |
Answers rank queries for the supported bit_vector if init() was called before. | |
const size_type | operator() (size_type idx) const |
Alias for rank(i) | |
size_type | serialize (std::ostream &out, structure_tree_node *v=NULL, std::string name="") const |
Serializes rank_support. | |
void | load (std::istream &in, const int_vector< 1 > *v=NULL) |
Loads the rank_support. | |
void | set_vector (const int_vector< 1 > *v) |
Sets the supported bit_vector to the given pointer. | |
rank_support_jmc & | operator= (const rank_support_jmc &rs) |
Assign Operator. | |
void | swap (rank_support_jmc &rs) |
swap Operator | |
bool | operator== (const rank_support_jmc &rs) const |
Equality Operator. | |
bool | operator!= (const rank_support_jmc &rs) const |
Unequality Operator. |
A class supporting rank queries in constant time. The implementation is a lightweight version of the data structure proposed by Jacobson (1989), Munro (1996), and Clark (1996).
void sdsl::rank_support_jmc::init | ( | const int_vector< 1 > * | v = NULL | ) | [inline, virtual] |
Initializes the data structure.
v | The supported bit_vector. If v equals NULL the previous set bit_vector is supported. Otherwise v will be supported. |
Implements sdsl::rank_support.
void sdsl::rank_support_jmc::load | ( | std::istream & | in, |
const int_vector< 1 > * | v = NULL |
||
) | [inline, virtual] |
Loads the rank_support.
in | In-Stream to load the rank_support data from. |
v | The supported bit_vector. |
Implements sdsl::rank_support.
bool sdsl::rank_support_jmc::operator!= | ( | const rank_support_jmc & | rs | ) | const [inline] |
Unequality Operator.
Two rank_support_jmcs are not equal if any member variable are not equal.
Required for the Equality Comparable Concept of the STL.
rank_support_jmc & sdsl::rank_support_jmc::operator= | ( | const rank_support_jmc & | rs | ) | [inline] |
Assign Operator.
Required for the Assignable Concept of the STL.
bool sdsl::rank_support_jmc::operator== | ( | const rank_support_jmc & | rs | ) | const [inline] |
Equality Operator.
Two rank_support_jmcs are equal if all member variables are equal.
Required for the Equality Comparable Concept of the STL.
const rank_support_jmc::size_type sdsl::rank_support_jmc::rank | ( | size_type | i | ) | const [inline, virtual] |
Answers rank queries for the supported bit_vector if init() was called before.
i | Argument for the length of the prefix v[0..i-1]. |
Implements sdsl::rank_support.
rank_support_jmc::size_type sdsl::rank_support_jmc::serialize | ( | std::ostream & | out, |
structure_tree_node * | v = NULL , |
||
std::string | name = "" |
||
) | const [inline, virtual] |
Serializes rank_support.
out | Out-Stream to serialize the data to. |
Implements sdsl::rank_support.
void sdsl::rank_support_jmc::set_vector | ( | const int_vector< 1 > * | v | ) | [inline, virtual] |
Sets the supported bit_vector to the given pointer.
v | The new bit_vector to support. |
Implements sdsl::rank_support.
void sdsl::rank_support_jmc::swap | ( | rank_support_jmc & | rs | ) | [inline] |
swap Operator
Swap two rank_support_jmc in constant time. Required for the Container Concept of the STL.