|
SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
|
The base class of classes supporting rank_queries for a sdsl::bit_vector in constant time. More...
#include <rank_support.hpp>
Inherited by sdsl::rank_support_v5<>, sdsl::rank_support_v<>, sdsl::rank_support_jmc, sdsl::rank_support_v< b, pattern_len >, and sdsl::rank_support_v5< b, pattern_len >.
Public Types | |
| typedef int_vector< 1 >::size_type | size_type |
Public Member Functions | |
| rank_support (const int_vector< 1 > *v=NULL) | |
| Constructor. | |
| rank_support (const rank_support &rs) | |
| Copy constructor. | |
| virtual | ~rank_support () |
| Destructor. | |
| virtual void | init (const int_vector< 1 > *v=NULL)=0 |
| Initializes the data structure. | |
| virtual const size_type | rank (size_type i) const =0 |
| Answers rank queries for the supported bit_vector if init() was called before. | |
| virtual const size_type | operator() (size_type idx) const =0 |
| Alias for rank(i) | |
| virtual size_type | serialize (std::ostream &out, structure_tree_node *v, std::string name) const =0 |
| Serializes rank_support. | |
| virtual void | load (std::istream &in, const int_vector< 1 > *v=NULL)=0 |
| Loads the rank_support. | |
| virtual void | set_vector (const int_vector< 1 > *v=NULL)=0 |
| Sets the supported bit_vector to the given pointer. | |
Protected Attributes | |
| const int_vector< 1 > * | m_v |
| Pointer to the rank supported bit_vector. | |
The base class of classes supporting rank_queries for a sdsl::bit_vector in constant time.
| sdsl::rank_support::rank_support | ( | const int_vector< 1 > * | v = NULL | ) | [inline] |
Constructor.
| v | The supported bit_vector. |
| virtual void sdsl::rank_support::init | ( | const int_vector< 1 > * | v = NULL | ) | [pure 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. |
Implemented in sdsl::rank_support_v< b, pattern_len >, sdsl::rank_support_v<>, sdsl::rank_support_v5< b, pattern_len >, sdsl::rank_support_v5<>, and sdsl::rank_support_jmc.
| virtual void sdsl::rank_support::load | ( | std::istream & | in, |
| const int_vector< 1 > * | v = NULL |
||
| ) | [pure virtual] |
Loads the rank_support.
| in | In-Stream to load the rank_support data from. |
| v | The supported bit_vector. |
Implemented in sdsl::rank_support_v< b, pattern_len >, sdsl::rank_support_v<>, sdsl::rank_support_v5< b, pattern_len >, sdsl::rank_support_v5<>, and sdsl::rank_support_jmc.
| virtual const size_type sdsl::rank_support::rank | ( | size_type | i | ) | const [pure 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]. |
Implemented in sdsl::rank_support_v< b, pattern_len >, sdsl::rank_support_v<>, sdsl::rank_support_v5< b, pattern_len >, sdsl::rank_support_v5<>, and sdsl::rank_support_jmc.
| virtual size_type sdsl::rank_support::serialize | ( | std::ostream & | out, |
| structure_tree_node * | v, | ||
| std::string | name | ||
| ) | const [pure virtual] |
Serializes rank_support.
| out | Out-Stream to serialize the data to. |
Implemented in sdsl::rank_support_v< b, pattern_len >, sdsl::rank_support_v<>, sdsl::rank_support_v5< b, pattern_len >, sdsl::rank_support_v5<>, and sdsl::rank_support_jmc.
| virtual void sdsl::rank_support::set_vector | ( | const int_vector< 1 > * | v = NULL | ) | [pure virtual] |
Sets the supported bit_vector to the given pointer.
| v | The new bit_vector to support. |
Implemented in sdsl::rank_support_v< b, pattern_len >, sdsl::rank_support_v<>, sdsl::rank_support_v5< b, pattern_len >, sdsl::rank_support_v5<>, and sdsl::rank_support_jmc.
1.8.0