SDSL 3.0.3
Succinct Data Structure Library
Loading...
Searching...
No Matches
sdsl::select_support Class Referenceabstract

The base class of classes supporting select queries for a sdsl::bit_vector in constant time. More...

#include <select_support.hpp>

Inheritance diagram for sdsl::select_support:
sdsl::select_support_mcl< 1, 1 > sdsl::select_support_mcl< 0, 1 > sdsl::select_support_mcl< 10, 2 > sdsl::select_support_mcl< t_b, t_pat_len > sdsl::select_support_scan< t_b, t_pat_len >

Public Types

typedef int_vector< 1 >::size_type size_type
 

Public Member Functions

 select_support (int_vector< 1 > const *f_v=nullptr)
 Constructor of select_support.
 
 select_support (select_support const &f_v)
 Copy constructor.
 
virtual ~select_support ()
 Destructor of select_support.
 
virtual size_type select (size_type i) const =0
 Select returns the index of the i-th 1-bit in the supported bit_vector.
 
virtual size_type operator() (size_type i) const =0
 Alias for select.
 
virtual size_type serialize (std::ostream &out, structure_tree_node *v, std::string name) const =0
 Serialize the select_support to an out file stream.
 
virtual void load (std::istream &in, int_vector< 1 > const *v=nullptr)=0
 Load the select_support from an in file stream.
 
virtual void set_vector (int_vector< 1 > const *v=nullptr)=0
 This method sets the supported bit_vector.
 

Public Attributes

bit_vector const * vv
 

Protected Attributes

int_vector< 1 > const * m_v
 Pointer to the select supported sdsl::bit_vector.
 

Detailed Description

The base class of classes supporting select queries for a sdsl::bit_vector in constant time.

Abstract base class for classes supporting select queries.

Definition at line 32 of file select_support.hpp.

Member Typedef Documentation

◆ size_type

Definition at line 38 of file select_support.hpp.

Constructor & Destructor Documentation

◆ select_support() [1/2]

sdsl::select_support::select_support ( int_vector< 1 > const * f_v = nullptr)
inline

Constructor of select_support.

Parameters
vThe bit_vector to support rank queries.

Definition at line 44 of file select_support.hpp.

◆ select_support() [2/2]

sdsl::select_support::select_support ( select_support const & f_v)

Copy constructor.

Copy the whole select_support including the pointer to the supported bit_vector.

◆ ~select_support()

virtual sdsl::select_support::~select_support ( )
inlinevirtual

Destructor of select_support.

Definition at line 54 of file select_support.hpp.

Member Function Documentation

◆ load()

virtual void sdsl::select_support::load ( std::istream & in,
int_vector< 1 > const * v = nullptr )
pure virtual

Load the select_support from an in file stream.

Load an previously serialized select_support from a std::istream.

Parameters
inThe std::istream to load the select_support.
vThe bit_vector to be supported.
See also
init, select.

Implemented in sdsl::select_support_mcl< t_b, t_pat_len >, sdsl::select_support_mcl< 0, 1 >, sdsl::select_support_mcl< 0, 1 >, sdsl::select_support_mcl< 1, 1 >, sdsl::select_support_mcl< 1, 1 >, and sdsl::select_support_mcl< 10, 2 >.

◆ operator()()

◆ select()

virtual size_type sdsl::select_support::select ( size_type i) const
pure virtual

Select returns the index of the i-th 1-bit in the supported bit_vector.

Parameters
iArgument to calculate the index of the i-th 1-bit in the supported bit_vector.
Returns
The index $\in [0..v.size()-1]$ of the i-th 1-bit in the supported bit_vector. Call init or load to initialize the data structure before the first call of this method.
See also
init, load.

Implemented in sdsl::select_support_mcl< t_b, t_pat_len >, sdsl::select_support_mcl< 0, 1 >, sdsl::select_support_mcl< 0, 1 >, sdsl::select_support_mcl< 1, 1 >, sdsl::select_support_mcl< 1, 1 >, sdsl::select_support_mcl< 10, 2 >, and sdsl::select_support_scan< t_b, t_pat_len >.

◆ serialize()

◆ set_vector()

Member Data Documentation

◆ m_v

int_vector<1> const* sdsl::select_support::m_v
protected

Pointer to the select supported sdsl::bit_vector.

Definition at line 35 of file select_support.hpp.

◆ vv

bit_vector const* sdsl::select_support::vv

Definition at line 39 of file select_support.hpp.


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