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::select_support_bs< RankSupport > Class Template Reference

A class supporting select quries by using a rank_support and binary search. More...

#include <select_support_bs.hpp>

Inherits sdsl::select_support.

List of all members.

Public Types

typedef
RankSupport::bit_vector_type 
bit_vector_type

Public Member Functions

 select_support_bs (const int_vector< 1 > *v=NULL, const RankSupport *m_rs=NULL)
 select_support_bs (const select_support_bs &ss)
void init (const int_vector< 1 > *v=NULL)
 Initalization method for select_support.
const size_type select (size_type) const
 Select returns the index of the i-th 1-bit in the supported bit_vector.
const size_type operator() (size_type) const
 Alias for select(i).
size_type serialize (std::ostream &out, structure_tree_node *v=NULL, std::string name="") const
 Serialize the select_support to an out file stream.
void load (std::istream &in, const int_vector< 1 > *v=NULL)
 Load the select_support from an in file stream.
void set_vector (const int_vector< 1 > *v=NULL)
 This method sets the supported bit_vector.
select_support_bsoperator= (const select_support_bs &ss)
void swap (select_support_bs &ss)
bool operator== (const select_support_bs &ss) const
 Equality Operator.
bool operator!= (const select_support_bs &ss) const
 Unequality Operator.

Detailed Description

template<class RankSupport = rank_support_v<>>
class sdsl::select_support_bs< RankSupport >

A class supporting select quries by using a rank_support and binary search.


Member Function Documentation

template<class RankSupport >
void sdsl::select_support_bs< RankSupport >::init ( const int_vector< 1 > *  v = NULL) [virtual]

Initalization method for select_support.

Init takes no arguments and should be called before the first call to the select method if not

  • load is called to initialize the select_support or
  • the constructor is called with the pointer to the supported bit_vector.
    See also:
    select, load.

Implements sdsl::select_support.

template<class RankSupport >
void sdsl::select_support_bs< RankSupport >::load ( std::istream &  in,
const int_vector< 1 > *  v = NULL 
) [virtual]

Load the select_support from an in file stream.

Load an previously serialized select_support from a std::istream. This method could replace the call of init before the first call of the select method.

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

Implements sdsl::select_support.

template<class RankSupport >
bool sdsl::select_support_bs< RankSupport >::operator!= ( const select_support_bs< RankSupport > &  ss) const

Unequality Operator.

Two select_support_bss are not equal if any member variable are not equal. Required for the Equality Comparable Concept of the STL.

See also:
operator==
template<class RankSupport >
bool sdsl::select_support_bs< RankSupport >::operator== ( const select_support_bs< RankSupport > &  ss) const

Equality Operator.

Two select_support_bss are equal if all member variables are equal. Required for the Equality Comparable Concept of the STL.

See also:
operator!=
template<class RankSupport >
const select_support_bs< RankSupport >::size_type sdsl::select_support_bs< RankSupport >::select ( size_type  i) const [inline, 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.

Implements sdsl::select_support.

template<class RankSupport >
void sdsl::select_support_bs< RankSupport >::set_vector ( const int_vector< 1 > *  v = NULL) [virtual]

This method sets the supported bit_vector.

Note:
Call the init function before you call select the first time after you changed the supported bit_vector.

Implements sdsl::select_support.


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