SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
 All Classes Namespaces Files Functions Variables Typedefs Friends
Public Types | Public Member Functions
sdsl::rrr_rank_support< b, 15, wt_type > Class Template Reference

rank_support for the specialized rrr_vector class of block size 15. More...

#include <rrr_vector_15.hpp>

List of all members.

Public Types

typedef rrr_vector< 15, wt_type > bit_vector_type
typedef bit_vector_type::size_type size_type
typedef bit_vector_type::bi_type bi_type

Public Member Functions

 rrr_rank_support (const bit_vector_type *v=NULL)
 Standard constructor.
void init (const bit_vector_type *v=NULL)
 Initialize the data structure with a rrr_vector, which should be supported.
const size_type rank (size_type i) const
 Answers rank queries.
const size_type operator() (size_type i) const
 Short hand for rank(i)
const size_type size () const
 Returns the size of the original vector.
void set_vector (const bit_vector_type *v=NULL)
 Set the supported vector.
rrr_rank_supportoperator= (const rrr_rank_support &rs)
void swap (rrr_rank_support &rs)
bool operator== (const rrr_rank_support &rs) const
bool operator!= (const rrr_rank_support &rs) const
void load (std::istream &in, const bit_vector_type *v=NULL)
 Load the data structure from a stream and set the supported vector.
size_type serialize (std::ostream &out, structure_tree_node *v=NULL, std::string name="") const
 Serializes the data structure into a stream.

Detailed Description

template<uint8_t b, class wt_type>
class sdsl::rrr_rank_support< b, 15, wt_type >

rank_support for the specialized rrr_vector class of block size 15.

The first template parameter is the bit pattern of size one.


Constructor & Destructor Documentation

template<uint8_t b, class wt_type >
sdsl::rrr_rank_support< b, 15, wt_type >::rrr_rank_support ( const bit_vector_type v = NULL) [inline, explicit]

Standard constructor.

Parameters:
vPointer to the rrr_vector, which should be supported

Member Function Documentation

template<uint8_t b, class wt_type >
const size_type sdsl::rrr_rank_support< b, 15, wt_type >::rank ( size_type  i) const [inline]

Answers rank queries.

Parameters:
iArgument for the length of the prefix v[0..i-1], with $0\leq i \leq size()$.
Returns:
Number of 1-bits in the prefix [0..i-1] of the original bit_vector.
Time complexity
$ \Order{ sample\_rate of the rrr\_vector} $

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