bm::sv_sample_index< SV > Class Template Reference

Index for SV sorted vectors for approximate range queries. More...

`#include <bmsparsevec_algo.h>`

## Public Types

typedef SV::value_type | value_type
typedef SV::size_type | size_type
typedef SV::bvector_type | bvector_type
typedef bvector_type::allocator_type | allocator_type
typedef bm::dynamic_heap_matrix< value_type, allocator_type > | heap_matrix_type

## Public Member Functions

| sv_sample_index ()
| sv_sample_index (const SV &sv, unsigned s_factor)
void | construct (const SV &sv, unsigned s_factor)
| Build sampling index for the sorted sprase vector.
size_type | sv_size () const BMNOEXCEPT
| Original SV size.
size_type | size () const BMNOEXCEPT
| Index size (number of sampled elements).
bool | is_unique () const BMNOEXCEPT
| returns true if all index values are unique
bool | bfind_range (const value_type *search_str, size_t in_len, size_type &l, size_type &r) const BMNOEXCEPT
| find range (binary)
size_type | common_prefix_length (const value_type *search_str, size_t in_len, size_type l, size_type r) const BMNOEXCEPT
| find common prefix between index elements and search string
void | recalc_range (const value_type *search_str, size_type &l, size_type &r) const BMNOEXCEPT
| recalculate range into SV coordinates range [from..to)
size_t | get_min_len () const BMNOEXCEPT
| Return length of minimal indexed string.

## Detailed Description

template<typename SV>
class bm::sv_sample_index< SV >

Index for SV sorted vectors for approximate range queries.

Definition at line 491 of file bmsparsevec_algo.h.

## Member Typedef Documentation

## allocator_type

template<typename SV>

typedef bvector_type::allocator_type bm::sv_sample_index< SV >::allocator_type

Definition at line 497 of file bmsparsevec_algo.h.

## bvector_type

template<typename SV>

typedef SV::bvector_type bm::sv_sample_index< SV >::bvector_type

Definition at line 496 of file bmsparsevec_algo.h.

## heap_matrix_type

template<typename SV>

typedef bm::dynamic_heap_matrix<value_type, allocator_type> bm::sv_sample_index< SV >::heap_matrix_type

Definition at line 498 of file bmsparsevec_algo.h.

## size_type

template<typename SV>

typedef SV::size_type bm::sv_sample_index< SV >::size_type

Definition at line 495 of file bmsparsevec_algo.h.

## value_type

template<typename SV>

typedef SV::value_type bm::sv_sample_index< SV >::value_type

Definition at line 494 of file bmsparsevec_algo.h.

## Constructor & Destructor Documentation

## sv_sample_index() [1/2]

template<typename SV>

bm::sv_sample_index< SV >::sv_sample_index | ( |  | ) |

inline

Definition at line 500 of file bmsparsevec_algo.h.

## sv_sample_index() [2/2]

template<typename SV>

bm::sv_sample_index< SV >::sv_sample_index | ( | const SV & | sv,
|  | unsigned | s_factor )

inline

Definition at line 501 of file bmsparsevec_algo.h.

References construct().

## Member Function Documentation

## bfind_range()

template<typename SV>

bool bm::sv_sample_index< SV >::bfind_range | ( | const value_type * | search_str,
|  | size_t | in_len,
|  | size_type & | l,
|  | size_type & | r ) const

find range (binary)

Definition at line 3400 of file bmsparsevec_algo.h.

References BM_ASSERT, and BMNOEXCEPT.

## common_prefix_length()

template<typename SV>

sv_sample_index< SV >::size_type bm::sv_sample_index< SV >::common_prefix_length | ( | const value_type * | search_str,
|  | size_t | in_len,
|  | size_type | l,
|  | size_type | r ) const

find common prefix between index elements and search string

Definition at line 3473 of file bmsparsevec_algo.h.

References BM_ASSERT, BMNOEXCEPT, and bm::has_zero_byte_u64().

## construct()

template<typename SV>

void bm::sv_sample_index< SV >::construct | ( | const SV & | sv,
|  | unsigned | s_factor )

Build sampling index for the sorted sprase vector.

Parameters

  sv | - string sparse vector to index
  s_factor | - sampling factor

Definition at line 3324 of file bmsparsevec_algo.h.

References BM_ASSERT, and bm::gap_max_bits.

Referenced by sv_sample_index().

## get_min_len()

template<typename SV>

size_t bm::sv_sample_index< SV >::get_min_len | ( |  | ) | const

inline

Return length of minimal indexed string.

Definition at line 547 of file bmsparsevec_algo.h.

References BMNOEXCEPT.

## is_unique()

template<typename SV>

bool bm::sv_sample_index< SV >::is_unique | ( |  | ) | const

inline

returns true if all index values are unique

Definition at line 523 of file bmsparsevec_algo.h.

References BMNOEXCEPT.

## recalc_range()

template<typename SV>

void bm::sv_sample_index< SV >::recalc_range | ( | const value_type * | search_str,
|  | size_type & | l,
|  | size_type & | r ) const

recalculate range into SV coordinates range [from..to)

Definition at line 3518 of file bmsparsevec_algo.h.

References BM_ASSERT, BMNOEXCEPT, and bm::gap_max_bits.

## size()

template<typename SV>

size_type bm::sv_sample_index< SV >::size | ( |  | ) | const

inline

Index size (number of sampled elements).

Definition at line 520 of file bmsparsevec_algo.h.

References BMNOEXCEPT.

## sv_size()

template<typename SV>

size_type bm::sv_sample_index< SV >::sv_size | ( |  | ) | const

inline

Original SV size.

Definition at line 517 of file bmsparsevec_algo.h.

References BMNOEXCEPT.

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

- bmsparsevec_algo.h