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/bmsparsevec__compr_8h_source.html below:

NCBI C++ ToolKit: include/util/bitset/bmsparsevec_compr.h Source File

1 #ifndef BMSPARSEVEC_COMPR_H__INCLUDED__ 2 #define BMSPARSEVEC_COMPR_H__INCLUDED__ 31 #ifndef BM__H__INCLUDED__ 34 # error missing include (bm.h or bm64.h) 57 template

<

class

Val,

class

SV>

108

{

return bool

(*

this

) ==

bool

(ref); }

155

{

return

(

pos_

== it.pos_) && (

csv_

== it.csv_); }

159

{

return pos_

< it.pos_; }

161

{

return pos_

<= it.pos_; }

163

{

return pos_

> it.pos_; }

165

{

return pos_

>= it.pos_; }

180 

value_type

value

()

const

;

267

{ this->

add

(v);

return

*

this

; }

363  rs_idx_

->copy_from(*(csv.rs_idx_));

733  typename

bvector_type::optmode opt_mode = bvector_type::opt_compress,

734

statistics* stat = 0);

844

{

return sv_

.get_slice(

i

); }

847

{

return sv_

.get_create_slice(

i

); }

850

{

return sv_

.slice(

i

); }

856

{

return sv_

.effective_slices(); }

862

{

return

sparse_vector_type::slices(); }

866

{

return

sparse_vector_type::stored_slices(); }

887

{

return sv_

.get_bmatrix(); }

893

{

return sv_

.get_bmatrix(); }

904

{

sv_

.mark_null_idx(null_idx); }

933  sv_

.resize_internal(sz);

958

{

return

sparse_vector_type::s2u(v); }

961

{

return

sparse_vector_type::u2s(v); }

999 template

<

class

Val,

class

SV>

1015 template

<

class

Val,

class

SV>

1024  bool

found = bv->find_reverse(

max_id_

);

1040 template

<

class

Val,

class

SV>

1048 template

<

class

Val,

class

SV>

1051

: sv_(csv.sv_), size_(csv.size_), max_id_(csv.max_id_), in_sync_(csv.in_sync_)

1062 template

<

class

Val,

class

SV>

1067

max_id_(0), in_sync_(

false

)

1072

size_ = csv.size_; max_id_ = csv.max_id_; in_sync_ = csv.in_sync_;

1073

rs_idx_ = csv.rs_idx_; csv.rs_idx_ = 0;

1079 template

<

class

Val,

class

SV>

1088 template

<

class

Val,

class

SV>

1095  BM_ASSERT

(sv_.get_null_bvect()->none());

1097

size_ = max_id_ = 0;

1100  if

(new_size >= size_)

1103

max_id_ = new_size - 1;

1115

max_id_ = new_size - 1;

1121  size_type

new_sv_size = sv_.size() - clear_size;

1122

sv_.resize_internal(new_sv_size,

false

);

1123

bv_null->clear_range(new_size,

bm::id_max

-1);

1126

max_id_ = new_size - 1;

1135 template

<

class

Val,

class

SV>

1141  if

(idx <= max_id_ && size_)

1143

sv_.throw_range_error(

"compressed sparse vector push_back() range error"

);

1145

push_back_no_check(idx, v);

1150 template

<

class

Val,

class

SV>

1160 template

<

class

Val,

class

SV>

1166

bv_null->set_bit_no_check(idx);

1167

sv_.push_back_no_null(v);

1176 template

<

class

Val,

class

SV>

1182  bool

found = bv_null->test(idx);

1186  size_type

sv_idx = bv_null->count_range(0, idx);

1187

bv_null->clear_bit_no_check(idx);

1188

sv_.erase(--sv_idx,

false

);

1196

size_ = max_id_ + 1;

1203 template

<

class

Val,

class

SV>

1208

bv_sub.bit_and(bv_idx, *bv_null);

1213

rank_compr.

compress

(bv_sub_rsc, *bv_null, bv_sub);

1214

sv_.clear(bv_sub_rsc);

1218  typename

bvector_type::enumerator en(&bv_sub, 0);

1223  size_type

sv_idx = bv_null->count_range(0, idx);

1225

sv_.erase(--sv_idx,

false

);

1227

bv_null->bit_sub(bv_sub);

1232 template

<

class

Val,

class

SV>

1238

bv_sub.bit_and(bv_idx, *bv_null);

1242

rank_compr.

compress

(bv_sub_rsc, *bv_null, bv_sub);

1244

sv_.clear(bv_sub_rsc);

1249 template

<

class

Val,

class

SV>

1256  bool

found = bv_null->test(idx);

1258

sv_idx = in_sync_ ? bv_null->count_to(idx, *rs_idx_)

1259

: bv_null->count_range(0, idx);

1263

sv_.inc_no_null(--sv_idx);

1267

sv_.insert_value_no_null(sv_idx, 1);

1268

bv_null->set_bit_no_check(idx);

1273

size_ = max_id_ + 1;

1281 template

<

class

Val,

class

SV>

1288  bool

found = bv_null->test(idx);

1290

sv_idx = in_sync_ ? bv_null->count_to(idx, *rs_idx_)

1291

: bv_null->count_range(0, idx);

1295

sv_.inc_no_null(--sv_idx, v);

1299

sv_.insert_value_no_null(sv_idx, v);

1300

bv_null->set_bit_no_check(idx);

1305

size_ = max_id_ + 1;

1313 template

<

class

Val,

class

SV>

1320

sv_idx = in_sync_ ? bv_null->count_to(idx, *rs_idx_)

1321

: bv_null->count_range(0, idx);

1324

sv_.inc_no_null(sv_idx);

1326

sv_.inc_no_null(sv_idx, v);

1332 template

<

class

Val,

class

SV>

1339  bool

found = bv_null->test(idx);

1341

sv_idx = in_sync_ ? bv_null->count_to(idx, *rs_idx_)

1342

: bv_null->count_range(0, idx);

1346

sv_.set_value_no_null(--sv_idx, v,

true

);

1350

sv_.insert_value_no_null(sv_idx, v);

1351

bv_null->set_bit_no_check(idx);

1356

size_ = max_id_ + 1;

1364 template

<

class

Val,

class

SV>

1370  if

(max_id_ != csv.max_id_ || size_ != csv.size_)

1372  bool

same_sv = sv_.equal(csv.sv_);

1378 template

<

class

Val,

class

SV>

1382

max_id_ = size_ = 0;

1387  const bvector_type

* bv_null_src = sv_src.get_null_bvector();

1395

sv_.clear_all(

true

, 0);

1396

*bv_null = *bv_null_src;

1400  unsigned

src_planes = sv_src.slices();

1401  for

(

unsigned i

= 0;

i

< src_planes; ++

i

)

1407

rank_compr.

compress

(*bv_plane, *bv_null, *bv_src_plane);

1411

sv_.resize(

count

);

1413

sync(

true

,

true

);

1418 template

<

class

Val,

class

SV>

1421

sv.clear_all(

true

, 0);

1423  const bvector_type

* bv_null_src = this->get_null_bvector();

1432

*bv_null = *bv_null_src;

1436  unsigned

src_planes = sv_.slices();

1437  for

(

unsigned i

= 0;

i

< src_planes; ++

i

)

1439  if

(

const bvector_type

* bv_src_plane = sv_.get_slice(

i

))

1442

rank_compr.

decompress

(*bv_plane, *bv_null, *bv_src_plane);

1445

sv.resize(this->

size

());

1450 template

<

class

Val,

class

SV>

1453  if

(in_sync_ && force ==

false

)

1457

bv_null->build_rs_index(rs_idx_);

1458

sv_.bmatr_.is_ro_ = bv_null->is_ro();

1463  size_type cnt

= size_ ? bv_null->count_range(0, size_-1, *rs_idx_)

1465

is_dense_ = (

cnt

== size_);

1473 template

<

class

Val,

class

SV>

1479  bool

found = bv_null->find_reverse(max_id_);

1481

max_id_ = size_ = 0;

1483

size_ = max_id_ + 1;

1484

sync(

false

,

false

);

1489 template

<

class

Val,

class

SV>

1497  BM_ASSERT

(bv_null->get_bit(idx) ==

false

);

1501  return

resolve_sync(idx, idx_to);

1504  bool

found = bv_null->test(idx);

1507

*idx_to = bv_null->count_range_no_check(0, idx);

1513 template

<

class

Val,

class

SV>

1528  BM_ASSERT

(bv_null->get_bit(idx) ==

false

);

1531

*idx_to = bv_null->count_to_test(idx, *rs_idx_);

1532  return bool

(*idx_to);

1537 template

<

class

Val,

class

SV>

1546

copy_sz = bv_null->count_range(from, to, *rs_idx_);

1548

copy_sz = bv_null->count_range(from, to);

1553

sv_left = bv_null->rank_corrected(from, *rs_idx_);

1556

sv_left = bv_null->count_range(0, from);

1557  bool

tl = bv_null->test(from);

1561

*idx_from = sv_left; *idx_to = sv_left + copy_sz - 1;

1568 template

<

class

Val,

class

SV>

1574

sv_.throw_range_error(

"compressed collection access error"

);

1576  bool

found = resolve(idx, &sv_idx);

1579

sv_.throw_range_error(

"compressed collection item not found"

);

1581  return

sv_.at(--sv_idx);

1586 template

<

class

Val,

class

SV>

1591  bool

found = resolve(idx, &sv_idx);

1595  return

sv_.get(--sv_idx);

1600 template

<

class

Val,

class

SV>

1606  bool

found = resolve(idx, &sv_idx);

1610  return

sv_.get_unsigned_bits(--sv_idx, N_bits);

1615 template

<

class

Val,

class

SV>

1620  if

(!resolve(idx, &sv_idx))

1622

v = sv_.get(--sv_idx);

1628 template

<

class

Val,

class

SV>

1633  bool

found = resolve_sync(idx, &sv_idx);

1636

v = sv_.get(--sv_idx);

1642 template

<

class

Val,

class

SV>

1647  return

!(bv_null->test(idx));

1652 template

<

class

Val,

class

SV>

1654  typename

bvector_type::optmode opt_mode,

1657

sv_.optimize(temp_block, opt_mode, (

typename

sparse_vector_type::statistics*)

st

);

1661  st

->memory_used += rs_idx_->get_total() *

1662

(

sizeof

(

typename

rs_index_type::size_type)

1663

+

sizeof

(

typename

rs_index_type::sb_pair_type));

1666

this->sync(

true

,

false

);

1671 template

<

class

Val,

class

SV>

1674

sv_.clear_all(free_mem, 0);

1675

in_sync_ =

false

; max_id_ = size_ = 0;

1680 template

<

class

Val,

class

SV>

1685

sv_.calc_stat((

typename

sparse_vector_type::statistics*)

st

);

1689  st

->memory_used += rs_idx_->get_total() *

1690

(

sizeof

(

typename

rs_index_type::size_type)

1691

+

sizeof

(

typename

rs_index_type::sb_pair_type));

1697 template

<

class

Val,

class

SV>

1701  return

sv_.get_null_bvector();

1706 template

<

class

Val,

class

SV>

1715  b

= bv_null->select(rank, idx, *rs_idx_);

1717  b

= bv_null->find_rank(rank, 0, idx);

1723 template

<

class

Val,

class

SV>

1727  throw

std::domain_error(

"Rank-Select index not constructed, call sync() first"

);

1736 template

<

class

Val,

class

SV>

1741  bool

zero_mem)

const 1746

throw_no_rsc_index();

1751  if

(idx_from >= this->

size

())

1756  if

((idx_from +

size

) > this->

size

())

1757

size = this->

size

() - idx_from;

1760  size_type

rank = bv_null->rank_corrected(idx_from, *rs_idx_);

1762  BM_ASSERT

(rank == bv_null->count_range(0, idx_from) - bv_null->test(idx_from));

1784  arr

[

i

++] = it.value();

1785  if

(!en_i.advance())

1790

}

while

(

i

<

size

);

1796 template

<

class

Val,

class

SV>

1804  if

(!

size

|| (idx_from >= this->

size

()))

1814  if

((idx_from +

size

) > this->

size

())

1821  size_type

rank = bv_null->rank_corrected(idx_from, *rs_idx_);

1823  BM_ASSERT

(rank == bv_null->count_range(0, idx_from) - bv_null->test(idx_from));

1830  if

(idx_from +

size

<=

i

)

1834

bv_null->count_range_no_check(idx_from, idx_from +

size

- 1, *rs_idx_);

1837  auto

ex_sz = sv_.decode(arr_buf_tmp, rank, extract_cnt,

true

);

1838  BM_ASSERT

(ex_sz == extract_cnt); (void) ex_sz;

1840  for

(

i

= 0;

i

< extract_cnt; ++

i

)

1844  arr

[en_idx-idx_from] = arr_buf_tmp[

i

];

1854 template

<

class

Val,

class

SV>

1869  arr

[0] = this->get(idx[0]);

1878  if

(idx[

i

] < size_)

1879

idx_tmp_buf[

i

] = idx[

i

];

1895  if

(resolve(idx[

i

], &sv_idx))

1897

idx_tmp_buf[

i

] = sv_idx-1;

1910  size

= sv_.gather(

arr

, idx_tmp_buf,

size

, sorted_idx);

1917 template

<

class

Val,

class

SV>

1928 template

<

class

Val,

class

SV>

1933

rs_idx_->~rs_index_type();

1940 template

<

class

Val,

class

SV>

1948  if

(left >= csv.

size

())

1956  bool

range_valid = csv.

resolve_range

(left, right, &sv_left, &sv_right);

1959

sv_.clear_all(

true

, 0); sv_.resize(size_);

1961

bv_null->copy_range(*arg_bv_null, 0, right);

1965

bv_null->copy_range(*arg_bv_null, 0, right);

1972 template

<

class

Val,

class

SV>

1976  BM_ASSERT

(sv_.get_null_bvector()->equal(*csv.

sv_

.get_null_bvector()));

1978

sv_.merge(csv.

sv_

);

1983 template

<

class

Val,

class

SV>

1996  return

bv_null->count_range_no_check(left, right);

1998  return

bv_null->count_range_no_check(left, right, *rs_idx_);

2006 template

<

class

Val,

class

SV>

2014 template

<

class

Val,

class

SV>

2020  sv_bi_

.disable_set_null();

2025 template

<

class

Val,

class

SV>

2039 template

<

class

Val,

class

SV>

2047 template

<

class

Val,

class

SV>

2054

sv_bi_.add_value_no_null(v);

2057

bv_null->set_bit_no_check(csv_->size_);

2065 template

<

class

Val,

class

SV>

2071

csv_->max_id_++; csv_->size_++;

2076 template

<

class

Val,

class

SV>

2083

csv_->max_id_+=

count

;

2084

csv_->size_+=

count

;

2089 template

<

class

Val,

class

SV>

2093

csv_->in_sync_ =

false

;

2100 template

<

class

Val,

class

BV>

2102

: csv_(0), pos_(

bm

::

id_max

), buf_ptr_(0)

2107 template

<

class

Val,

class

SV>

2110

: csv_(it.csv_), pos_(it.pos_), buf_ptr_(0)

2115 template

<

class

Val,

class

SV>

2119

: csv_(csv), buf_ptr_(0)

2127 template

<

class

Val,

class

SV>

2131

: csv_(csv), buf_ptr_(0)

2139 template

<

class

Val,

class

SV>

2142

pos_ = (!csv_ || pos >= csv_->size()) ?

bm::id_max

: pos;

2148 template

<

class

Val,

class

SV>

2154  if

(pos_ >= csv_->size())

2162  if

(buf_ptr_ - ((

value_type

*)vbuffer_.data()) >= n_buf_size)

2170 template

<

class

Val,

class

SV>

2179

vbuffer_.reserve(n_buf_size *

sizeof

(

value_type

));

2180

tbuffer_.reserve(n_buf_size *

sizeof

(

value_type

));

2184

csv_->decode_buf(buf_ptr_, tmp_buf_ptr, pos_, n_buf_size,

true

);

2192 template

<

class

Val,

class

SV>

2203  if

(++buf_ptr_ < buf_end)

2208  if

(pos_ >= csv_->size())

2213  if

(buf_ptr_ >= buf_end)

2220 template

<

class

Val,

class

SV>

2223  return

csv_->is_null(pos_);

#define BM_ASSERT_THROW(x, xerrcode)

Sparse constainer sparse_vector<> for integer types using bit-transposition transform.

Heap allocated scalar-type matrix.

void decompress(BV &bv_target, const BV &bv_idx, const BV &bv_src)

Rank decompression.

void compress(BV &bv_target, const BV &bv_idx, const BV &bv_src)

Rank compression algorithm based on two palallel iterators/enumerators set of source vector gets re-m...

Back insert iterator implements buffered insert, faster than generic access assignment.

back_insert_iterator & operator++()

noop

back_insert_iterator() noexcept

void flush()

flush the accumulated buffer

bool empty() const

return true if insertion buffer is empty

rsc_sparse_vector_type * rsc_sparse_vector_type_ptr

rsc_sparse_vector_type::sparse_vector_type sparse_vector_type

add value to the buffer without changing the NULL vector

back_insert_iterator & operator++(int)

noop

void add(value_type v)

add value to the container

std::output_iterator_tag iterator_category

rsc_sparse_vector_type::bvector_type bvector_type

void add_null() noexcept

add NULL (no-value) to the container

rsc_sparse_vector< Val, SV > rsc_sparse_vector_type

sparse_vector_bi sv_bi_

!< pointer on the parent vector

rsc_sparse_vector_type::size_type size_type

back_insert_iterator & operator*()

noop

rsc_sparse_vector_type::value_type value_type

rsc_sparse_vector_type * csv_

back_insert_iterator & operator=(value_type v)

push value to the vector

sparse_vector_type::back_insert_iterator sparse_vector_bi

Const iterator to traverse the rsc sparse vector.

size_type pos_

!< ptr to parent

const rsc_sparse_vector_type * csv_

rsc_sparse_vector< Val, SV > rsc_sparse_vector_type

buffer_type tbuffer_

!< value buffer

bool is_null() const noexcept

Get NULL status.

rsc_sparse_vector_type::value_type value_type

bool operator>=(const const_iterator &it) const noexcept

bm::byte_buffer< allocator_type > buffer_type

const_iterator & operator++(int)

Advance to the next available value.

bool operator==(const const_iterator &it) const noexcept

bool operator>(const const_iterator &it) const noexcept

rsc_sparse_vector_type::bvector_type bvector_type

std::input_iterator_tag iterator_category

void go_to(size_type pos) noexcept

re-position to a specified position

bool valid() const noexcept

Returns true if iterator is at a valid position.

bool operator!=(const const_iterator &it) const noexcept

void skip_zero_values() noexcept

rsc_sparse_vector_type * rsc_sparse_vector_type_ptr

size_type pos() const noexcept

Current position (index) in the vector.

bool advance() noexcept

advance iterator forward by one

const_iterator & operator++() noexcept

Advance to the next available value.

buffer_type vbuffer_

!< Position

value_type * buf_ptr_

!< temp buffer

rsc_sparse_vector_type::size_type size_type

void invalidate() noexcept

Invalidate current iterator.

bool operator<=(const const_iterator &it) const noexcept

bvector_type::allocator_type::allocator_pool_type allocator_pool_type

value_type operator*() const

Get current position (value)

value_type value() const

Get current position (value)

const_iterator() noexcept

bvector_type::allocator_type allocator_type

bool operator<(const const_iterator &it) const noexcept

Reference class to access elements via common [] operator.

bool operator==(const reference &ref) const noexcept

reference(rsc_sparse_vector< Val, SV > &csv, size_type idx) noexcept

rsc_sparse_vector< Val, SV > & csv_

bool is_null() const noexcept

Rank-Select compressed sparse vector.

static unsigned stored_slices()

Number of stored bit-slices (value slices + extra.

bvector_type * bvector_type_ptr

size_t remap_size() const noexcept

bool in_sync_

flag if prefix sum is in-sync with vector

bool resolve_range(size_type from, size_type to, size_type *idx_from, size_type *idx_to) const noexcept

const bmatrix_type & get_bmatrix() const noexcept

void load_from(const sparse_vector_type &sv_src)

Load compressed vector from a sparse vector (with NULLs)

remap_matrix_type * get_remap_matrix()

void clear() noexcept

resize to zero, free memory

void sync_size() noexcept

recalculate size to exclude tail NULL elements After this call size() will return the true size of th...

static value_type u2s(unsigned_value_type v) noexcept

unsigned effective_slices() const noexcept

bool is_nullable() const

if container supports NULL(unassigned) values (true)

void merge_not_null(rsc_sparse_vector< Val, SV > &csv)

merge two vectors (argument gets destroyed) It is important that both vectors have the same NULL vect...

bool try_get(size_type idx, value_type &v) const noexcept

get specified element with NOT NULL check

size_type decode(value_type *arr, size_type idx_from, size_type size, bool zero_mem=true) const

C-style decode.

void freeze()

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

void push_back(size_type idx, value_type v)

set specified element with bounds checking and automatic resize

bool equal(const rsc_sparse_vector< Val, SV > &csv) const noexcept

check if another vector has the same content

back_insert_iterator get_back_inserter()

void load_to(sparse_vector_type &sv) const

Exort compressed vector to a sparse vector (with NULLs)

SV::bmatrix_type bmatrix_type

void set(size_type idx, value_type v)

set specified element with bounds checking and automatic resize

void set_remap() noexcept

bm::heap_matrix< unsigned char, 1, 1, typename bvector_type::allocator_type > remap_matrix_type

unused remap matrix type for compatibility with the sparse serializer

value_type at(size_type idx) const

access specified element with bounds checking

void optimize(bm::word_t *temp_block=0, typename bvector_type::optmode opt_mode=bvector_type::opt_compress, statistics *stat=0)

run memory optimization for all vector slices

const_iterator end() const noexcept

Provide const iterator access to the end.

bool empty() const noexcept

return true if vector is empty

SV::unsigned_value_type unsigned_value_type

bool try_get_sync(size_type idx, value_type &v) const noexcept

get specified element with NOT NULL check Caller guarantees that the vector is in sync mode (RS-index...

static constexpr bool is_compressed() noexcept

various type traits

bvector_type_ptr slice(unsigned i)

rsc_sparse_vector(bm::null_support null_able=bm::use_null, allocation_policy_type ap=allocation_policy_type(), size_type bv_max_size=bm::id_max, const allocator_type &alloc=allocator_type())

static unsigned slices() noexcept

get total number of bit-slices in the vector

void push_back_null()

push back NULL value

rsc_sparse_vector< Val, SV > & operator=(rsc_sparse_vector< Val, SV > &&csv) noexcept

const bvector_type * get_null_bvector() const noexcept

Get bit-vector of assigned values (or NULL)

bool is_ro() const noexcept

Returns true if vector is read-only.

bool resolve(size_type idx, size_type *idx_to) const noexcept

Resolve logical address to access via rank compressed address.

void set_ro_flag(bool b) noexcept

size_type size_

vector size (logical)

void set_null(size_type idx)

set specified element to NULL RSC vector actually erases element when it is set to NULL (expensive).

void mark_null_idx(unsigned null_idx) noexcept

void inc_not_null(size_type idx, value_type v)

increment specified element by one, element MUST be NOT NULL Faster than just inc() if element is NUL...

size_type count_range_notnull(size_type left, size_type right) const noexcept

void resize(size_type new_size)

change vector size

void resize_internal(size_type sz)

SV::const_iterator sparse_vector_const_iterator

bvector_type_ptr get_create_slice(unsigned i)

void construct_rs_index()

Allocate memory for RS index.

void unsync() noexcept

Unsync the prefix sum table.

bool find_rank(size_type rank, size_type &idx) const noexcept

find position of compressed element by its rank

const value_type & const_reference

unsigned char * init_remap_buffer() noexcept

const bvector_type * bvector_type_const_ptr

const_iterator get_const_iterator(size_type idx) const noexcept

Get const_itertor re-positioned to specific element.

void sync()

Re-calculate prefix sum table used for rank search (if necessary)

const remap_matrix_type * get_remap_matrix() const

bool resolve_sync(size_type idx, size_type *idx_to) const noexcept

void free_rs_index()

Free rs-index.

const sparse_vector_type & get_sv() const noexcept

access dense vector

static void throw_no_rsc_index()

throw error that RSC index not constructed (call sync())

constexpr bool is_remap() const noexcept

static unsigned_value_type s2u(value_type v) noexcept

Convert signed value type to unsigned representation.

sparse_vector_type sv_

transpose-sparse vector for "dense" packing

bvector_type_const_ptr get_slice(unsigned i) const noexcept

get access to bit-plane, function checks and creates a plane

bvector_type::allocator_type allocator_type

size_type decode_buf(value_type *arr, value_type *arr_buf_tmp, size_type idx_from, size_type size, bool zero_mem=true) const noexcept

C-style decode (variant with external memory) Analog of decode, but requires two arrays.

size_type size_internal() const noexcept

bool is_sync() const noexcept

returns true if prefix sum table is in sync with the vector

void push_back(value_type v)

add element with automatic resize

rs_index_type * rs_idx_

prefix sum for rank-select translation

rsc_sparse_vector< Val, SV > & operator=(const rsc_sparse_vector< Val, SV > &csv)

bvector_type::rs_index_type rs_index_type

size_type max_id_

control variable for sorted load

value_type get(size_type idx) const noexcept

get specified element without bounds checking

bool is_null(size_type idx) const noexcept

test if specified element is NULL

bool is_dense_

flag if vector is dense

bvector_type::enumerator bvector_enumerator_type

unsigned_value_type get_unsigned_bits(size_type idx, size_type N_bits) const noexcept

Get raw unsigned value first N bits.

void clear_all(bool free_mem, unsigned) noexcept

resize to zero, free memory

const unsigned char * get_remap_buffer() const noexcept

void copy_range(const rsc_sparse_vector< Val, SV > &csv, size_type left, size_type right)

copy range of values from another sparse vector

void inc(size_type idx)

increment specified element by one

size_type gather(value_type *arr, const size_type *idx, size_type *idx_tmp_buf, size_type size, bm::sort_order sorted_idx) const

Gather elements to a C-style array.

void push_back_no_check(size_type idx, value_type v)

size_type effective_size() const noexcept

size of internal dense vector

bmatrix_type & get_bmatrix() noexcept

size_type size() const noexcept

return size of the vector

bvector_type::allocation_policy allocation_policy_type

SV::bvector_type bvector_type

bool in_sync() const noexcept

returns true if prefix sum table is in sync with the vector

void calc_stat(struct rsc_sparse_vector< Val, SV >::statistics *st) const noexcept

Calculates memory statistics.

static constexpr bool is_str() noexcept

const rs_index_type * get_RS() const noexcept

size_type effective_vector_max() const noexcept

Always 1 (non-matrix type)

const_iterator begin() const

Provide const iterator access to container content.

sparse vector de-serializer

algorithms for sparse_vector scan/search

Serialize sparse vector into a memory buffer(s) structure.

static vector< string > arr

sort_order

Sort order declaration.

null_support

NULL-able value support.

@ BM_SORTED

input set is sorted (ascending order)

@ BM_UNKNOWN

sort order unknown

@ use_null

support "non-assigned" or "NULL" logic

@ no_null

do not support NULL values

void xor_swap(W &x, W &y) noexcept

XOR swap two variables.

void aligned_free(void *ptr) BMNOEXCEPT

Aligned free.

void * aligned_new_malloc(size_t size)

Aligned malloc (unlike classic malloc it throws bad_alloc exception)

unsigned long long int id64_t

const unsigned rs3_border0

double value_type

The numeric datatype used by the parser.

const struct ncbi::grid::netcache::search::fields::SIZE size

const GenericPointer< typename T::ValueType > T2 value

Int4 delta(size_t dimension_, const Int4 *score_)

static SLJIT_INLINE sljit_ins st(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

Structure with statistical information about memory allocation footprint, serialization projection,...


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