SDSL 3.0.1
Succinct Data Structure Library
Loading...
Searching...
No Matches
sdsl::select_support_scan< t_b, t_pat_len > Class Template Reference

A class supporting linear time select queries. More...

#include <select_support_scan.hpp>

Inheritance diagram for sdsl::select_support_scan< t_b, t_pat_len >:
sdsl::select_support

Public Types

enum  { bit_pat = t_b }
 
typedef bit_vector bit_vector_type
 
- Public Types inherited from sdsl::select_support
typedef int_vector< 1 >::size_type size_type
 

Public Member Functions

 select_support_scan (const bit_vector *v=nullptr)
 
 select_support_scan (const select_support_scan< t_b, t_pat_len > &ss)
 
size_type select (size_type i) const
 Select returns the index of the i-th 1-bit in the supported bit_vector. More...
 
size_type operator() (size_type i) const
 Alias for select. More...
 
size_type serialize (std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
 Serialize the select_support to an out file stream. More...
 
void load (std::istream &, SDSL_UNUSED const bit_vector *v=nullptr)
 
template<typename archive_t >
void CEREAL_SAVE_FUNCTION_NAME (archive_t &ar) const
 Serialise (save) via cereal. More...
 
template<typename archive_t >
void CEREAL_LOAD_FUNCTION_NAME (archive_t &ar)
 Serialise (load) via cereal. More...
 
void set_vector (const bit_vector *v=nullptr)
 This method sets the supported bit_vector. More...
 
select_support_scan< t_b, t_pat_len > & operator= (const select_support_scan &ss)
 
bool operator== (select_support_scan const &other) const noexcept
 Equality operator. More...
 
bool operator!= (select_support_scan const &other) const noexcept
 Inequality operator. More...
 
- Public Member Functions inherited from sdsl::select_support
 select_support (const int_vector< 1 > *f_v=nullptr)
 Constructor of select_support. More...
 
 select_support (const select_support &f_v)
 Copy constructor. More...
 
virtual ~select_support ()
 Destructor of select_support. More...
 
virtual size_type select (size_type i) const =0
 Select returns the index of the i-th 1-bit in the supported bit_vector. More...
 
virtual size_type operator() (size_type i) const =0
 Alias for select. More...
 
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. More...
 
virtual void load (std::istream &in, const int_vector< 1 > *v=nullptr)=0
 Load the select_support from an in file stream. More...
 
virtual void set_vector (const int_vector< 1 > *v=nullptr)=0
 This method sets the supported bit_vector. More...
 

Additional Inherited Members

- Public Attributes inherited from sdsl::select_support
const bit_vectorvv
 
- Protected Attributes inherited from sdsl::select_support
const int_vector< 1 > * m_v
 Pointer to the select supported sdsl::bit_vector. More...
 

Detailed Description

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
class sdsl::select_support_scan< t_b, t_pat_len >

A class supporting linear time select queries.

Space complexity
Constant.
Time complexity
Linear in the size of the supported vector.
Template Parameters
t_bBit pattern which should be supported. Either 0,1,10,01.
t_pat_lenLength of the bit pattern.

Definition at line 30 of file select_support_scan.hpp.

Member Typedef Documentation

◆ bit_vector_type

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
typedef bit_vector sdsl::select_support_scan< t_b, t_pat_len >::bit_vector_type

Definition at line 38 of file select_support_scan.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
anonymous enum
Enumerator
bit_pat 

Definition at line 39 of file select_support_scan.hpp.

Constructor & Destructor Documentation

◆ select_support_scan() [1/2]

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
sdsl::select_support_scan< t_b, t_pat_len >::select_support_scan ( const bit_vector v = nullptr)
inlineexplicit

Definition at line 45 of file select_support_scan.hpp.

◆ select_support_scan() [2/2]

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
sdsl::select_support_scan< t_b, t_pat_len >::select_support_scan ( const select_support_scan< t_b, t_pat_len > &  ss)
inline

Definition at line 48 of file select_support_scan.hpp.

Member Function Documentation

◆ CEREAL_LOAD_FUNCTION_NAME()

template<uint8_t t_b, uint8_t t_pat_len>
template<typename archive_t >
void sdsl::select_support_scan< t_b, t_pat_len >::CEREAL_LOAD_FUNCTION_NAME ( archive_t &  ar)

Serialise (load) via cereal.

Definition at line 86 of file select_support_scan.hpp.

◆ CEREAL_SAVE_FUNCTION_NAME()

template<uint8_t t_b, uint8_t t_pat_len>
template<typename archive_t >
void sdsl::select_support_scan< t_b, t_pat_len >::CEREAL_SAVE_FUNCTION_NAME ( archive_t &  ar) const

Serialise (save) via cereal.

Definition at line 81 of file select_support_scan.hpp.

◆ load()

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
void sdsl::select_support_scan< t_b, t_pat_len >::load ( std::istream &  ,
SDSL_UNUSED const bit_vector v = nullptr 
)
inline

Definition at line 58 of file select_support_scan.hpp.

◆ operator!=()

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
bool sdsl::select_support_scan< t_b, t_pat_len >::operator!= ( select_support_scan< t_b, t_pat_len > const &  other) const
inlinenoexcept

Inequality operator.

Definition at line 76 of file select_support_scan.hpp.

◆ operator()()

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
size_type sdsl::select_support_scan< t_b, t_pat_len >::operator() ( size_type  i) const
inlinevirtual

Alias for select.

Implements sdsl::select_support.

Definition at line 53 of file select_support_scan.hpp.

◆ operator=()

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
select_support_scan< t_b, t_pat_len > & sdsl::select_support_scan< t_b, t_pat_len >::operator= ( const select_support_scan< t_b, t_pat_len > &  ss)
inline

Definition at line 66 of file select_support_scan.hpp.

◆ operator==()

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
bool sdsl::select_support_scan< t_b, t_pat_len >::operator== ( select_support_scan< t_b, t_pat_len > const &  other) const
inlinenoexcept

Equality operator.

Definition at line 73 of file select_support_scan.hpp.

◆ select()

template<uint8_t t_b, uint8_t t_pat_len>
select_support_scan< t_b, t_pat_len >::size_type sdsl::select_support_scan< t_b, t_pat_len >::select ( size_type  i) const
inlinevirtual

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.

Implements sdsl::select_support.

Definition at line 90 of file select_support_scan.hpp.

◆ serialize()

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
size_type sdsl::select_support_scan< t_b, t_pat_len >::serialize ( std::ostream &  out,
structure_tree_node v = nullptr,
std::string  name = "" 
) const
inlinevirtual

Serialize the select_support to an out file stream.

Implements sdsl::select_support.

Definition at line 54 of file select_support_scan.hpp.

◆ set_vector()

template<uint8_t t_b = 1, uint8_t t_pat_len = 1>
void sdsl::select_support_scan< t_b, t_pat_len >::set_vector ( const bit_vector v = nullptr)
inlinevirtual

This method sets the supported bit_vector.

Implements sdsl::select_support.

Definition at line 65 of file select_support_scan.hpp.


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