A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/classbm_1_1sparse__vector.html below:

NCBI C++ ToolKit: bm::sparse_vector< Val, BV

Search Toolkit Book for bm::sparse_vector

succinct sparse vector with runtime compression using bit-slicing / transposition method More...

#include <util/bitset/bmsparsevec.h>

void  swap (sparse_vector< Val, BV > &sv) noexcept   content exchange More...
  void  set_allocator_pool (allocator_pool_type *pool_ptr) noexcept   Set allocator pool for local (non-threaded) memory cyclic(lots of alloc-free ops) opertations. More...
    sparse_vector (bm::null_support null_able=bm::no_null, allocation_policy_type ap=allocation_policy_type(), size_type bv_max_size=bm::id_max, const allocator_type &alloc=allocator_type())   Sparse vector constructor. More...
    sparse_vector (const sparse_vector< Val, BV > &sv)   sparse_vector< Val, BV > &  operator= (const sparse_vector< Val, BV > &sv)     sparse_vector (sparse_vector< Val, BV > &&sv) noexcept   sparse_vector< Val, BV > &  operator= (sparse_vector< Val, BV > &&sv) noexcept     ~sparse_vector () noexcept   reference  operator[] (size_type idx) noexcept   Operator to get write access to an element. More...
  value_type  operator[] (size_type idx) const noexcept   get specified element without bounds checking More...
  value_type  at (size_type idx) const   access specified element with bounds checking More...
  value_type  get (size_type idx) const noexcept   get specified element without bounds checking More...
  value_type  get_no_check (size_type idx) const noexcept   get specified element without checking boundary conditions More...
  bool  try_get (size_type idx, value_type &v) const noexcept   get specified element with NOT NULL check More...
  void  set (size_type idx, value_type v)   set specified element with bounds checking and automatic resize More...
  void  inc (size_type idx)   increment specified element by one More...
  void  push_back (value_type v)   push value back into vector More...
  void  push_back_null (size_type count)   push back specified amount of NULL values More...
  void  push_back_null ()   push back NULL value More...
  void  insert (size_type idx, value_type v)   insert specified element into container More...
  void  erase (size_type idx, bool erase_null=true)   erase specified element from container More...
  void  swap (size_type idx1, size_type idx2)   swap two vector elements between each other More...
  void  clear (size_type idx, bool set_null)   clear specified element with bounds checking and automatic resize More...
  void  set_null (size_type idx)   set specified element to unassigned value (NULL) More...
  void  set_null (const bvector_type &bv_idx)   Set NULL all elements set as 1 in the argument vector. More...
  void  clear (const bvector_type &bv_idx)   Set vector elements spcified by argument bit-vector to zero Note that set to 0 elements are NOT going to tuned to NULL (NULL qualifier is preserved) More...
  unsigned_value_type  get_unsigned_bits (size_type idx, size_type N_bits) const noexcept   Get raw unsigned value first N bits. More...
  const_iterator  begin () const noexcept   Provide const iterator access to container content. More...
  const_iterator  end () const noexcept   Provide const iterator access to the end. More...
  const_iterator  get_const_iterator (size_type idx) const noexcept   Get const_itertor re-positioned to specific element. More...
  back_insert_iterator  get_back_inserter ()   Provide back insert iterator Back insert iterator implements buffered insertion, which is faster, than random access or push_back. More...
  void  import (const value_type *arr, size_type arr_size, size_type offset=0, bool set_not_null=true)   Import list of elements from a C-style array. More...
  void  import_back (const value_type *arr, size_type arr_size, bool set_not_null=true)   Import list of elements from a C-style array (pushed back) More...
  size_type  decode (value_type *arr, size_type idx_from, size_type dec_size, bool zero_mem=true) const   Bulk export list of elements to a C-style array. More...
  size_type  gather (value_type *arr, const size_type *idx, size_type size, bm::sort_order sorted_idx) const   Gather elements to a C-style array. More...
  void  clear_all (bool free_mem, unsigned) noexcept   resize to zero, free memory More...
  void  clear () noexcept   resize to zero, free memory More...
  sparse_vector< Val, BV > &  clear_range (size_type left, size_type right, bool set_null=false)   clear range (assign bit 0 for all planes) More...
  size_type  size () const noexcept   return size of the vector More...
  bool  empty () const noexcept   return true if vector is empty More...
  void  resize (size_type sz)   resize vector More...
  void  sync_size () noexcept   recalculate size to exclude tail NULL elements After this call size() will return the true size of the vector More...
  bool  equal (const sparse_vector< Val, BV > &sv, bm::null_support null_able=bm::use_null) const noexcept   check if another sparse vector has the same content and size More...
  int  compare (size_type idx, const value_type val) const noexcept   Compare vector element with argument. More...
  void  optimize (bm::word_t *temp_block=0, typename bvector_type::optmode opt_mode=bvector_type::opt_compress, typename sparse_vector< Val, BV >::statistics *stat=0)   run memory optimization for all vector planes More...
  void  optimize_gap_size ()   Optimize sizes of GAP blocks. More...
  void  calc_stat (struct sparse_vector< Val, BV >::statistics *st) const noexcept   Calculates memory statistics. More...
  void  freeze ()   Turn sparse vector into immutable mode Read-only (immutable) vector uses less memory and allows faster searches. More...
  bool  is_ro () const noexcept   Returns true if vector is in read-only mode. More...
  sparse_vector< Val, BV > &  join (const sparse_vector< Val, BV > &sv)   join all with another sparse vector using OR operation More...
  sparse_vector< Val, BV > &  merge (sparse_vector< Val, BV > &sv)   merge with another sparse vector using OR operation Merge is different from join(), because it borrows data from the source vector, so it gets modified. More...
  void  copy_range (const sparse_vector< Val, BV > &sv, size_type left, size_type right, bm::null_support slice_null=bm::use_null)   copy range of values from another sparse vector More...
  void  keep_range (size_type left, size_type right, bm::null_support slice_null=bm::use_null)   Keep only specified interval in the sparse vector, clear all other elements. More...
  void  filter (const bvector_type &bv_mask)   Apply value filter, defined by mask vector. More...
    base_sparse_vector ()     base_sparse_vector (bm::null_support null_able, bool is_dynamic, allocation_policy_type ap=allocation_policy_type(), size_type bv_max_size=bm::id_max, const allocator_type &alloc=allocator_type())     base_sparse_vector (const base_sparse_vector< Val, BV, MAX_SIZE > &bsv)     base_sparse_vector (base_sparse_vector< Val, BV, MAX_SIZE > &&bsv) noexcept   void  swap (base_sparse_vector< Val, BV, MAX_SIZE > &bsv) noexcept   size_type  size () const noexcept   void  resize (size_type new_size, bool set_null)   void  clear_range (size_type left, size_type right, bool set_null)   void  keep_range_no_check (size_type left, size_type right, bm::null_support slice_null)   void  clear_all (bool free_mem=true) noexcept   resize to zero, free memory More...
  bool  empty () const noexcept   void  swap_elements (size_type idx1, size_type idx2)   swap two vector elements More...
  void  optimize (bm::word_t *temp_block=0, typename bvector_type::optmode opt_mode=bvector_type::opt_compress, typename bvector_type::statistics *stat=0)   run memory optimization for all bit-vector rows More...
  void  calc_stat (typename bvector_type::statistics *st) const noexcept   Calculates memory statistics. More...
  bool  equal (const base_sparse_vector< Val, BV, MAX_SIZE > &sv, bm::null_support null_able=bm::use_null) const noexcept   check if another sparse vector has the same content and size More...
  bool  is_nullable () const noexcept   check if container supports NULL(unassigned) values More...
  bm::null_support  get_null_support () const noexcept   check if container supports NULL (unassigned) values More...
  const bvector_typeget_null_bvector () const noexcept   Get bit-vector of assigned values or NULL (if not constructed that way) More...
  bool  is_null (size_type idx) const noexcept   test if specified element is NULL More...
  void  set_allocator_pool (allocator_pool_type *pool_ptr) noexcept   Set allocation pool. More...
  allocator_pool_typeget_allocator_pool () const noexcept   Get allocation pool. More...
  bvector_type_ptr  get_create_slice (unsigned i)   get access to bit-plain, function checks and creates a plane More...
  bvector_type_const_ptr  get_slice (unsigned i) const noexcept   get read-only access to bit-plane More...
  unsigned  effective_slices () const noexcept   Number of effective bit-planes in the value type. More...
  bvector_type_ptr  slice (unsigned i) noexcept   get access to bit-plane as is (can return NULL) More...
  bvector_type_const_ptr  slice (unsigned i) const noexcept   bvector_typeget_null_bvect () noexcept   void  free_slice (unsigned i)   free memory in bit-plane More...
  bm::id64_t  get_slice_mask (unsigned element_idx) const noexcept   const bmatrix_typeget_bmatrix () const noexcept   bmatrix_typeget_bmatrix () noexcept   access to internal bit-matrix More...
  void  mark_null_idx (unsigned null_idx) noexcept   Set NULL plain index. More...
  void  set_value (size_type idx, value_type v, bool need_clear)   set value without checking boundaries More...
  void  set_value_no_null (size_type idx, value_type v, bool need_clear)   set value without checking boundaries or support of NULL More...
  void  push_back_no_null (value_type v)   push value back into vector without NULL semantics More...
  void  insert_value (size_type idx, value_type v)   insert value without checking boundaries More...
  void  insert_value_no_null (size_type idx, value_type v)   insert value without checking boundaries or support of NULL More...
  void  resize_internal (size_type sz, bool set_null=true)   size_type  size_internal () const noexcept   constexpr bool  is_remap () const noexcept   size_t  remap_size () const noexcept   const unsigned char *  get_remap_buffer () const noexcept   unsigned char *  init_remap_buffer () noexcept   void  set_remap () noexcept   const remap_matrix_typeget_remap_matrix () const   remap_matrix_typeget_remap_matrix ()   bool  resolve_range (size_type from, size_type to, size_type *idx_from, size_type *idx_to) const noexcept   void  inc_no_null (size_type idx)   Increment element by 1 without chnaging NULL vector or size. More...
  void  inc_no_null (size_type idx, value_type v)   increment by v without chnaging NULL vector or size More...
  void  import_back_u (const unsigned_value_type *arr, size_type arr_size, bool set_not_null=true)   Import list of elements from a C-style array (pushed back) More...
  void  import_u (const unsigned_value_type *arr, size_type arr_size, size_type offset, bool set_not_null)   Import list of elements from a C-style array. More...
  void  import_u_nocheck (const unsigned_value_type *arr, size_type arr_size, size_type offset, bool set_not_null)   void  join_null_slice (const sparse_vector< Val, BV > &sv)   unsigned_value_type  get_unsigned (size_type idx) const noexcept   get raw unsigned value More...
  void  copy_from (const base_sparse_vector< Val, BV, MAX_SIZE > &bsv)   void  merge_matr (bmatrix_type &bmatr)   Merge plane bvectors from an outside base matrix Note: outside base matrix gets destroyed. More...
  void  freeze_matr ()   Turn on RO mode. More...
  void  clear_value_planes_from (unsigned plane_idx, size_type idx)   void  insert_clear_value_planes_from (unsigned plane_idx, size_type idx)   void  erase_column (size_type idx, bool erase_null)   void  insert_null (size_type idx, bool not_null)   void  bit_sub_rows (const bvector_type &bv, bool use_null)   Set SUB (MINUS) operation on all existing bit-slices. More...
  void  bit_and_rows (const bvector_type &bv)   Set AND (intersect) operation on all existing bit-slices. More...
  void  optimize_block (block_idx_type nb, typename BV::optmode opt_mode)   plane index for the "NOT NULL" flags plane More...
  void  sync_ro () noexcept   Sybc read-only state. More...
  void  copy_range_slices (const base_sparse_vector< Val, BV, MAX_SIZE > &bsv, typename base_sparse_vector< Val, BV, MAX_SIZE >::size_type left, typename base_sparse_vector< Val, BV, MAX_SIZE >::size_type right, bm::null_support slice_null)   Perform copy_range() on a set of planes. More...
  void  set_ro_flag (bool b) noexcept   Force RO flag without running freeze ops on content. More...
  void  sync (bool, bool)   syncronize internal structures, build fast access index More...
  size_type  extract (value_type *arr, size_type size, size_type offset=0, bool zero_mem=true) const   Bulk export list of elements to a C-style array. More...
  size_type  extract_range (value_type *arr, size_type size, size_type offset, bool zero_mem=true) const   extract small window without use of masking vector More...
  size_type  extract_planes (value_type *arr, size_type size, size_type offset, bool zero_mem=true) const   extract medium window without use of masking vector More...
  size_type  effective_size () const noexcept   size of sparse vector (may be different for RSC) More...
  size_type  effective_vector_max () const noexcept   Always 1 (non-matrix type) More...
  static size_type  translate_address (size_type i) noexcept   address translation for this type of container More...
  static void  throw_range_error (const char *err_msg)   throw range error More...
  static void  throw_bad_alloc ()   throw bad alloc More...
  static bool  find_rank (size_type rank, size_type &pos) noexcept   find position of compressed element by its rank More...
  template<class Val, class BV>
class bm::sparse_vector< Val, BV >

succinct sparse vector with runtime compression using bit-slicing / transposition method

Sparse vector implements variable bit-depth storage model. Initial data is bit-sliced into bit-vectors (all bits 0 become bv[0] so each element may use less memory than the original native data type. For example, 32-bit integer may only use 20 bits.

Container supports both signed and unsigned integer types.

Another level of compression is provided by bit-vector (BV template parameter) used for storing bit planes. bvector<> implements varians of on the fly block compression, so if a significant area of a sparse vector uses less bits - it will save memory. bm::bvector<> is a sparse data strucrture, so is bm::sparse_vector<>. It should be noted that as succinct data it works for both sparse or dense vectors.

Container also supports notion of NULL (unassigned value) which can be treated differently than 0.

Definition at line 86 of file bmsparsevec.h.

◆ allocation_policy_type

template<class Val , class BV >

Definition at line 97 of file bmsparsevec.h.

◆ allocator_pool_type

template<class Val , class BV >

Definition at line 99 of file bmsparsevec.h.

◆ allocator_type

template<class Val , class BV >

Definition at line 96 of file bmsparsevec.h.

◆ block_idx_type

template<class Val , class BV >

Definition at line 93 of file bmsparsevec.h.

◆ bmatrix_type ◆ bvector_enumerator_type

template<class Val , class BV >

Definition at line 98 of file bmsparsevec.h.

◆ bvector_type

template<class Val , class BV >

Definition at line 90 of file bmsparsevec.h.

◆ bvector_type_const_ptr

template<class Val , class BV >

Definition at line 94 of file bmsparsevec.h.

◆ bvector_type_ptr

template<class Val , class BV >

Definition at line 91 of file bmsparsevec.h.

◆ const_reference

template<class Val , class BV >

Definition at line 95 of file bmsparsevec.h.

◆ parent_type ◆ remap_matrix_type

template<class Val , class BV >

unused remap matrix type for compatibility with the sparse serializer

Definition at line 1032 of file bmsparsevec.h.

◆ size_type

template<class Val , class BV >

Definition at line 92 of file bmsparsevec.h.

◆ unsigned_value_type ◆ value_type

template<class Val , class BV >

Definition at line 89 of file bmsparsevec.h.

◆ buf_size_e

template<class Val , class BV >

◆ octet_slices

template<class Val , class BV >

◆ sparse_vector() [1/3]

template<class Val , class BV >

Sparse vector constructor.

Parameters
null_able - defines if vector supports NULL values flag by default it is OFF, use bm::use_null to enable it ap - allocation strategy for underlying bit-vectors Default allocation policy uses BM_BIT setting (fastest access) bv_max_size - maximum possible size of underlying bit-vectors Please note, this is NOT size of svector itself, it is dynamic upper limit which should be used very carefully if we surely know the ultimate size alloc - allocator for bit-vectors
See also
bvector<>
bm::bvector<>::allocation_policy
bm::startegy

Definition at line 1098 of file bmsparsevec.h.

◆ sparse_vector() [2/3]

template<class Val , class BV >

◆ sparse_vector() [3/3]

template<class Val , class BV >

◆ ~sparse_vector() ◆ at()

template<class Val , class BV >

◆ begin()

template<class Val , class BV >

◆ calc_stat()

template<class Val , class BV >

◆ clear() [1/3]

template<class Val , class BV >

◆ clear() [2/3]

template<class Val , class BV >

Set vector elements spcified by argument bit-vector to zero Note that set to 0 elements are NOT going to tuned to NULL (NULL qualifier is preserved)

Parameters
bv_idx - index bit-vector for elements which to be set to 0

Definition at line 553 of file bmsparsevec.h.

◆ clear() [3/3]

template<class Val , class BV >

◆ clear_all()

template<class Val , class BV >

◆ clear_range()

template<class Val , class BV >

clear range (assign bit 0 for all planes)

Parameters
left - interval start right - interval end (closed interval) set_null - set cleared values to unassigned (NULL)

Definition at line 2120 of file bmsparsevec.h.

Referenced by TestSparseVector().

◆ compare()

template<class Val , class BV >

Compare vector element with argument.

Parameters
idx - vactor element index val - argument to compare with
Returns
0 - equal, < 0 - vect[i] < val, >0 otherwise

Definition at line 2289 of file bmsparsevec.h.

References val.

◆ copy_range()

template<class Val , class BV >

◆ decode()

template<class Val , class BV >

Bulk export list of elements to a C-style array.

For efficiency, this is left as a low level function, it does not do any bounds checking on the target array, it will override memory and crash if you are not careful with allocation and request size.

Parameters
arr - dest array idx_from - index in the sparse vector to export from dec_size - decoding size (array allocation should match) zero_mem - set to false if target array is pre-initialized with 0s to avoid performance penalty
Returns
number of actually exported elements (can be less than requested)
See also
gather

Definition at line 1354 of file bmsparsevec.h.

References arr.

Referenced by CheckSparseVectorGather(), CBedCoverageGraph::GetData(), CBedCoverageGraph::GetEstimatedFeatureCount(), and TestSparseVectorGatherDecode().

◆ effective_size()

template<class Val , class BV >

size of sparse vector (may be different for RSC)

Definition at line 976 of file bmsparsevec.h.

◆ effective_vector_max()

template<class Val , class BV >

◆ empty()

template<class Val , class BV >

◆ end()

template<class Val , class BV >

◆ equal()

template<class Val , class BV >

◆ erase()

template<class Val , class BV >

erase specified element from container

Parameters
idx - element index erase_null - erase the NULL vector (if exists) (default: true)

Definition at line 1975 of file bmsparsevec.h.

References BM_ASSERT.

Referenced by TestSparseVector().

◆ extract()

template<class Val , class BV >

Bulk export list of elements to a C-style array.

Use of all extract() methods is restricted. Please consider decode() for the same purpose.

Parameters
arr - dest array size - dest size offset - target index in the sparse vector to export from zero_mem - set to false if target array is pre-initialized with 0s to avoid performance penalty
Returns
effective size(number) of exported elements
See also
decode

Definition at line 1658 of file bmsparsevec.h.

References arr, BM_ASSERT, BMNOEXCEPT, BMNOEXCEPT2, BMRESTRICT, bm::for_each_bit_range_no_check(), i, bm::id_max, mask, offset, and ncbi::grid::netcache::search::fields::size.

Referenced by TestSignedSparseVector(), and TestSparseVector().

◆ extract_planes()

template<class Val , class BV >

◆ extract_range()

template<class Val , class BV >

extract small window without use of masking vector

See also
decode

Definition at line 1531 of file bmsparsevec.h.

References arr, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bool, FULL_BLOCK_FAKE_ADDR, bm::gap_test_unr(), bm::get_block_coord(), IS_FULL_BLOCK, offset, bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, bm::set_word_shift, and ncbi::grid::netcache::search::fields::size.

Referenced by TestSparseVector().

◆ filter()

template<class Val , class BV >

◆ find_rank()

template<class Val , class BV >

◆ freeze()

template<class Val , class BV >

Turn sparse vector into immutable mode Read-only (immutable) vector uses less memory and allows faster searches.

Before freezing it is recommenede to call optimize() to get full memory saving effect

See also
optimize

Definition at line 824 of file bmsparsevec.h.

Referenced by TestSparseVector().

◆ gather()

template<class Val , class BV >

Gather elements to a C-style array.

Gather collects values from different locations, for best performance feed it with sorted list of indexes.

Faster than one-by-one random access.

For efficiency, this is left as a low level function, it does not do any bounds checking on the target array, it will override memory and crash if you are not careful with allocation and request size.

Parameters
arr - dest array idx - index list to gather elements size - decoding index list size (array allocation should match) sorted_idx - sort order directive for the idx array (BM_UNSORTED, BM_SORTED, BM_UNKNOWN) Sort order affects both performance and correctness(!), use BM_UNKNOWN if not sure.
Returns
number of actually exported elements (can be less than requested)
See also
decode

Definition at line 1366 of file bmsparsevec.h.

References arr, bm::bit_block_gather_scatter(), BM_ASSERT, BM_IS_GAP, bm::BM_SORTED, bm::BM_SORTED_UNIFORM, bm::BM_UNKNOWN, bm::BM_UNSORTED, BMGAP_PTR, FULL_BLOCK_FAKE_ADDR, bm::gap_bfind(), bm::gap_test_unr(), bm::get_block_coord(), i, bm::id_max, bm::idx_arr_block_lookup_u32(), bm::idx_arr_block_lookup_u64(), r(), bm::set_block_mask, bm::set_block_shift, and ncbi::grid::netcache::search::fields::size.

Referenced by CheckSparseVectorGather(), CheckSparseVectorGatherRandom(), TestSignedSparseVector(), and TestSparseVectorGatherDecode().

◆ get()

template<class Val , class BV >

get specified element without bounds checking

Parameters
Returns
value of the element

Definition at line 1758 of file bmsparsevec.h.

References BM_ASSERT, i, and ncbi::grid::netcache::search::fields::size.

Referenced by CheckSparseVectorFilter(), CheckSparseVectorGather(), CheckSparseVectorGatherRandom(), bm::sparse_vector< unsigned, bm::bvector<> >::operator[](), TestCompressedSparseVectorAlgo(), TestSignedSparseVector(), TestSignedSparseVectorSerial(), TestSparseVector(), TestSparseVectorFilter(), TestSparseVectorSerial(), and TestSparseVectorSerialization2().

◆ get_back_inserter()

template<class Val , class BV >

Provide back insert iterator Back insert iterator implements buffered insertion, which is faster, than random access or push_back.

Definition at line 587 of file bmsparsevec.h.

Referenced by CVCFVariantsBase::GetHistogram(), TestSignedSparseVector(), TestSignedSparseVectorScan(), TestSignedSparseVectorScanGT(), TestSparseVector(), TestSparseVectorGatherDecode(), TestSparseVectorInserter(), TestSparseVectorScan(), and TestSparseVectorScanGT().

◆ get_const_iterator()

template<class Val , class BV >

Get const_itertor re-positioned to specific element.

Parameters
idx - position in the sparse vector

Definition at line 580 of file bmsparsevec.h.

◆ get_no_check()

template<class Val , class BV >

get specified element without checking boundary conditions

Parameters
Returns
value of the element

Definition at line 1769 of file bmsparsevec.h.

References i.

◆ get_remap_buffer() ◆ get_remap_matrix() [1/2] ◆ get_remap_matrix() [2/2] ◆ get_unsigned()

template<class Val , class BV >

◆ get_unsigned_bits()

template<class Val , class BV >

Get raw unsigned value first N bits.

Parameters
idx - element index in the vector N_bits - number of bits to be extracted (should be > 0)
Returns
unsigned value for

Definition at line 1809 of file bmsparsevec.h.

References b, BM_ASSERT, and bm::id_max.

Referenced by TestSparseVector().

◆ import()

template<class Val , class BV >

◆ import_back()

template<class Val , class BV >

◆ import_back_u()

template<class Val , class BV >

◆ import_u()

template<class Val , class BV >

Import list of elements from a C-style array.

Parameters
arr - source array arr_size - source size offset - target index in the sparse vector set_not_null - import should register in not null vector

Definition at line 1203 of file bmsparsevec.h.

References arr, and offset.

◆ import_u_nocheck()

template<class Val , class BV >

Definition at line 1220 of file bmsparsevec.h.

References arr, bm::bitscan(), BM_ASSERT, i, offset, r(), row, bm::tmatrix< T, ROWS, COLS >::row(), and bm::tmatrix< T, ROWS, COLS >::rows().

◆ inc()

template<class Val , class BV >

◆ inc_no_null() [1/2]

template<class Val , class BV >

Increment element by 1 without chnaging NULL vector or size.

Definition at line 2069 of file bmsparsevec.h.

References i, and max().

◆ inc_no_null() [2/2]

template<class Val , class BV >

increment by v without chnaging NULL vector or size

Definition at line 2092 of file bmsparsevec.h.

◆ init_remap_buffer() ◆ insert()

template<class Val , class BV >

◆ insert_value()

template<class Val , class BV >

insert value without checking boundaries

Definition at line 1930 of file bmsparsevec.h.

◆ insert_value_no_null()

template<class Val , class BV >

◆ is_compressed()

template<class Val , class BV >

inlinestaticconstexprnoexcept ◆ is_remap()

template<class Val , class BV >

inlineconstexprprotectednoexcept

Definition at line 1024 of file bmsparsevec.h.

◆ is_ro()

template<class Val , class BV >

◆ is_str()

template<class Val , class BV >

inlinestaticconstexprnoexcept

Definition at line 602 of file bmsparsevec.h.

◆ join()

template<class Val , class BV >

join all with another sparse vector using OR operation

Parameters
sv - argument vector to join with
Returns
slf reference
See also
merge

Definition at line 2181 of file bmsparsevec.h.

References bm::base_sparse_vector< Val, BV, MAX_SIZE >::bmatr_, bm::base_sparse_vector< Val, BV, MAX_SIZE >::get_bmatrix(), pythonpp::resize(), bm::basic_bmatrix< BV >::row(), bm::basic_bmatrix< BV >::rows(), and bm::sparse_vector< Val, BV >::size().

Referenced by TestSparseVector(), and TestSparseVector_Stress().

◆ join_null_slice()

template<class Val , class BV >

◆ keep_range()

template<class Val , class BV >

Keep only specified interval in the sparse vector, clear all other elements.

Parameters
left - interval start right - interval end (closed interval) slice_null - "use_null" copy range for NULL vector or not

Definition at line 2263 of file bmsparsevec.h.

References bm::xor_swap().

Referenced by TestSparseVector().

◆ merge()

template<class Val , class BV >

◆ operator=() [1/2]

template<class Val , class BV >

◆ operator=() [2/2]

template<class Val , class BV >

◆ operator[]() [1/2]

template<class Val , class BV >

get specified element without bounds checking

Parameters
Returns
value of the element

Definition at line 442 of file bmsparsevec.h.

◆ operator[]() [2/2]

template<class Val , class BV >

Operator to get write access to an element.

Definition at line 434 of file bmsparsevec.h.

◆ optimize()

template<class Val , class BV >

run memory optimization for all vector planes

Parameters
temp_block - pre-allocated memory block to avoid unnecessary re-allocs opt_mode - requested compression depth stat - memory allocation statistics after optimization

Definition at line 2148 of file bmsparsevec.h.

References st().

Referenced by CVCFVariantsBase::GetHistogram(), CTestBMApp::Run(), CVcfHistogram::Save(), TestCompressedSparseVectorAlgo(), TestCompressedSparseVectorScanGT(), TestCompressSparseSignedVector(), TestCompressSparseVector(), TestSignedSparseVector(), TestSignedSparseVectorScan(), TestSignedSparseVectorScanGT(), TestSparseVector(), TestSparseVector_Stress(), TestSparseVector_XOR_Scanner(), TestSparseVectorAlgo(), TestSparseVectorGatherDecode(), TestSparseVectorInserter(), TestSparseVectorRange(), TestSparseVectorScan(), TestSparseVectorScanGT(), TestSparseVectorSerialization2(), TestSparseVectorTransform(), CWigGraph::x_GetBigWigSummary(), and CBedCoverageGraph::x_SaveData().

◆ optimize_gap_size()

template<class Val , class BV >

Optimize sizes of GAP blocks.

This method runs an analysis to find optimal GAP levels for all bit planes of the vector.

Definition at line 2167 of file bmsparsevec.h.

◆ push_back()

template<class Val , class BV >

push value back into vector

Parameters

Definition at line 1883 of file bmsparsevec.h.

Referenced by TestCompressedSparseVectorScanGT(), TestSignedSparseVector(), TestSignedSparseVectorScanGT(), TestSignedSparseVectorSerial(), TestSparseVector(), TestSparseVector_XOR_Scanner(), TestSparseVectorAlgo(), TestSparseVectorFilter(), TestSparseVectorRange(), TestSparseVectorScanGT(), and TestSparseVectorSerial().

◆ push_back_no_null()

template<class Val , class BV >

push value back into vector without NULL semantics

Definition at line 1988 of file bmsparsevec.h.

◆ push_back_null() [1/2]

template<class Val , class BV >

◆ push_back_null() [2/2]

template<class Val , class BV >

◆ remap_size() ◆ resize()

template<class Val , class BV >

◆ resize_internal() ◆ resolve_range() ◆ set()

template<class Val , class BV >

set specified element with bounds checking and automatic resize

Parameters
idx - element index v - element value

Definition at line 1849 of file bmsparsevec.h.

References ncbi::grid::netcache::search::fields::size.

Referenced by CVCFVariantsBase::GetHistogram(), TestCompressSparseSignedVector(), TestCompressSparseVector(), TestSignedSparseVector(), TestSignedSparseVectorScan(), TestSignedSparseVectorSerial(), TestSparseVector(), TestSparseVector_XOR_Scanner(), TestSparseVectorFilter(), TestSparseVectorInserter(), TestSparseVectorRange(), TestSparseVectorScan(), TestSparseVectorSerial(), TestSparseVectorSerialization2(), and TestSparseVectorTransform().

◆ set_allocator_pool()

template<class Val , class BV >

Set allocator pool for local (non-threaded) memory cyclic(lots of alloc-free ops) opertations.

Definition at line 2319 of file bmsparsevec.h.

◆ set_null() [1/2]

template<class Val , class BV >

Set NULL all elements set as 1 in the argument vector.

Function also clears all the values to 0.

Parameters
bv_idx - index bit-vector for elements which to be set to NULL

Definition at line 545 of file bmsparsevec.h.

◆ set_null() [2/2]

template<class Val , class BV >

◆ set_remap() ◆ set_value()

template<class Val , class BV >

◆ set_value_no_null()

template<class Val , class BV >

◆ size()

template<class Val , class BV >

return size of the vector

Returns
size of sparse vector

Definition at line 728 of file bmsparsevec.h.

Referenced by CheckSparseVectorGather(), CheckSparseVectorGatherRandom(), bm::sparse_vector< Val, BV >::copy_range(), bm::sparse_vector< unsigned, bm::bvector<> >::effective_size(), bm::sparse_vector< unsigned, bm::bvector<> >::empty(), CVcfHistogram::InitHistogramGlyph(), bm::sparse_vector< Val, BV >::join(), bm::sparse_vector< Val, BV >::join_null_slice(), bm::sparse_vector< Val, BV >::merge(), TestUtil::PrintSequence(), bm::sparse_vector< unsigned, bm::bvector<> >::size_internal(), TestCompressSparseVector(), TestSignedSparseVector(), TestSignedSparseVectorScanGT(), TestSignedSparseVectorSerial(), TestSparseVector(), TestSparseVector_Stress(), TestSparseVectorFilter(), and TestSparseVectorSerial().

◆ size_internal() ◆ swap() [1/2]

template<class Val , class BV >

◆ swap() [2/2]

template<class Val , class BV >

◆ sync()

template<class Val , class BV >

syncronize internal structures, build fast access index

Definition at line 903 of file bmsparsevec.h.

◆ sync_size()

template<class Val , class BV >

◆ throw_bad_alloc()

template<class Val , class BV >

◆ throw_range_error()

template<class Val , class BV >

◆ translate_address()

template<class Val , class BV >

address translation for this type of container

Definition at line 950 of file bmsparsevec.h.

◆ try_get()

template<class Val , class BV >

get specified element with NOT NULL check

Parameters
idx - element index v - [out] value to get
Returns
true if value was aquired (NOT NULL), false otherwise
See also
is_null, get

Definition at line 1836 of file bmsparsevec.h.

Referenced by TestSparseVector().

◆ u2s_translate()

template<class Val , class BV >

◆ rsc_sparse_vector

template<class Val , class BV >

template<class V , class SV >

Definition at line 1085 of file bmsparsevec.h.

◆ sparse_vector_deserializer

template<class Val , class BV >

template<class SVect >

Definition at line 1088 of file bmsparsevec.h.

◆ sparse_vector_scanner

template<class Val , class BV >

template<class SVect , unsigned S_FACTOR>

Definition at line 1086 of file bmsparsevec.h.

◆ sparse_vector_serializer

template<class Val , class BV >

template<class SVect >

Definition at line 1087 of file bmsparsevec.h.

◆ back_insert_iterator

template<class Val , class BV >

◆ const_iterator

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4