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

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

1 #ifndef BMBMATRIX__H__INCLUDED__ 2 #define BMBMATRIX__H__INCLUDED__ 26 #include <type_traits> 53 template

<

typename

BV>

73  struct

is_remap_support {

enum trait

{

value

=

false

}; };

75  struct

is_dynamic_splices {

enum trait

{

value

=

true

}; };

297  typename

bvector_type::statistics* stat = 0);

421  template

<

typename

Val,

typename

BVect,

unsigned

MAX_SIZE>

430

{ (void)sz,(

void

)set_null; }

461

*idx_from = from; *idx_to = to;

return true

;

484 template

<

typename

Val,

typename

BV,

unsigned

MAX_SIZE>

727  typename

bvector_type::optmode opt_mode = bvector_type::opt_compress,

728  typename

bvector_type::statistics* stat = 0);

850 #pragma warning( push ) 851 #pragma warning( disable : 4146 ) 854 template

<

typename

BV>

860

: bv_size_(bv_max_size),

870 template

<

typename

BV>

878 template

<

typename

BV>

880

: bv_size_(bbm.bv_size_),

890 template

<

typename

BV>

892

: bv_size_(bbm.bv_size_),

897

is_dynamic_ = bbm.is_dynamic_;

902 template

<

typename

BV>

907  return

bv_rows_[

i

];

912 template

<

typename

BV>

917  return

bv_rows_[

i

];

922 template

<

typename

BV>

927  return

bv_rows_[

i

];

932 template

<

typename

BV>

937

null_idx_ = null_idx;

942 template

<

typename

BV>

965

bv_rows_[

i

] = bv ? construct_bvector(bv) : 0;

972 template

<

typename

BV>

976  size_type

r_to = (!erase_null && null_idx_) ? null_idx_ : rsize_;

984 template

<

typename

BV>

990

bv->insert(idx,

false

);

995 template

<

typename

BV>

1001

bv->clear_bit_no_check(idx);

1006 template

<

typename

BV>

1011

bv->swap(idx1, idx2);

1016 template

<

typename

BV>

1020  if

(rsize <= rsize_prev)

1029  BM_ASSERT

((!null_idx_) || (rsize & 1u));

1030

::memset(&bv_rows_[0], 0, rsize *

sizeof

(bv_rows_[0]));

1034

bv_rows_[

i

] = bv_rows_prev[

i

];

1035

alloc_.free_ptr(bv_rows_prev,

unsigned

(rsize_prev));

1038

bv_rows_[rsize-1] = bv_rows_[null_idx_];

1039

bv_rows_[null_idx_] = 0;

1040

null_idx_ = rsize-1;

1048 template

<

typename

BV>

1051  auto

slices = rows();

1054

clear_row(

i

, free_mem);

1060 template

<

typename

BV>

1063  unsigned

slices = (unsigned) this->rows();

1064  unsigned

arg_slices = (unsigned) bbm.rows();

1065  unsigned

max_slices(slices);

1066  if

(max_slices < arg_slices)

1067

max_slices = arg_slices;

1069  for

(

unsigned

j = 0;

eq

&& (j < max_slices); ++j)

1073

bv = (j < slices) ? this->get_row(j) : 0;

1074

arg_bv = (j < arg_slices) ? bbm.get_row(j) : 0;

1091  eq

= bv->equal(*arg_bv);

1098 template

<

typename

BV>

1102  size_type

osize = (7 + rows_not_null()) / 8;

1109 template

<

typename

BV>

1116

destruct_bvector(bv);

1121

alloc_.free_ptr(bv_rows_,

unsigned

(rsize_));

1127 template

<

typename

BV>

1133  if

(rsize_ != bbm.rsize_)

1135  if

(null_idx_ != bbm.null_idx_)

1141  if

(

bool

(bv) !=

bool

(bv_arg))

1151 template

<

typename

BV>

1154  if

(pool_ != pool_ptr)

1158

bv->set_allocator_pool(pool_ptr);

1166 template

<

typename

BV>

1171  auto i

= rows_not_null();

1172  for

(--

i

;

i

> 0; --

i

)

1185 template

<

typename

BV>

1198 template

<

typename

BV>

1210 template

<

typename

BV>

1219

alloc_ = bbm.alloc_;

1220

bbm.alloc_ = alloc_tmp;

1228

bbm.pool_ = pool_tmp;

1234

bv_rows_ = bbm.bv_rows_;

1235

bbm.bv_rows_ = rtmp;

1240 template

<

typename

BV>

1249  while

(

row

>= new_rsize)

1251

allocate_rows(new_rsize);

1257

bv = bv_rows_[

row

] = construct_bvector(0);

1263 template

<

typename

BV>

1268

allocate_rows(

row

+ 8);

1274

bv = bv_rows_[

row

] = construct_bvector(&bv_src);

1281 template

<

typename

BV>

1287

destruct_bvector(bv);

1288

bv_rows_[

row

] = 0;

1294 template

<

typename

BV>

1302

destruct_bvector(bv);

1303

bv_rows_[

row

] = 0;

1312 template

<

typename

BV>

1321

BM_THROW(

false

, BM_ERR_BADALLOC);

1327

rbv =

new

(mem)

bvector_type

(ap_.strat, ap_.glevel_len, bv_size_, alloc_);

1335

rbv =

new bvector_type

(ap_.strat, ap_.glevel_len, bv_size_, alloc_);

1340

rbv->set_allocator_pool(pool_);

1346 template

<

typename

BV>

1359 template

<

typename

BV>

1365  return

bv->get_blocks_manager().get_block_ptr(

i

, j);

1371 template

<

typename

BV>

1373  unsigned

slice_from,

unsigned

slice_until,

1376  for

(

unsigned

p = slice_from; p < slice_until; ++p)

1378

bv->clear_bit_no_check(idx);

1384 template

<

typename

BV>

1387  unsigned char

octet)

1389  if

(7u + octet_idx * 8u > rsize_)

1390

allocate_rows(rsize_ + 16);

1394  for

(;

row

< row_end; ++

row

)

1400

bv = this->construct_row(

row

);

1401

bv->set_bit_no_check(pos);

1406

bv->clear_bit_no_check(pos);

1414  if

(row_end > rsize_)

1418

bv->clear_bit_no_check(pos);

1423 template

<

typename

BV>

1426  unsigned char

octet)

1433  for

(;

row

< row_end; ++

row

)

1440

bv = this->construct_row(

row

);

1441

bv->set_bit_no_check(pos);

1445

bv->insert(pos,

true

);

1451

bv->insert(pos,

false

);

1459  if

(row_end > rsize_)

1463

bv->insert(pos,

false

);

1474

b1 = (blka[0] == FBADDR);

1475

b2 = (blka[1] == FBADDR);

1476

b1 |= (blka[2] == FBADDR);

1477

b2 |= (blka[3] == FBADDR);

1478

b1 |= (blka[4] == FBADDR);

1479

b2 |= (blka[5] == FBADDR);

1480

b1 |= (blka[6] == FBADDR);

1481

b2 |= (blka[7] == FBADDR);

1485 template

<

typename

BV>

1496  unsigned

row_idx = unsigned(octet_idx * 8);

1497  if

(row_idx + 7 >= rsize_ ||

1498

(null_idx_ && (row_idx + 7 > null_idx_)))

1499  return

(

unsigned char

)v;

1501

blka[0] = get_block(row_idx+0, i0, j0);

1502

blka[1] = get_block(row_idx+1, i0, j0);

1503

blka[2] = get_block(row_idx+2, i0, j0);

1504

blka[3] = get_block(row_idx+3, i0, j0);

1505

blka[4] = get_block(row_idx+4, i0, j0);

1506

blka[5] = get_block(row_idx+5, i0, j0);

1507

blka[6] = get_block(row_idx+6, i0, j0);

1508

blka[7] = get_block(row_idx+7, i0, j0);

1521  if

(

const bm::word_t

* blk; (blk = blka[0])!=0)

1524

v |= (unsigned)

bool

(is_set);

1526  if

(

const bm::word_t

* blk;(blk = blka[1])!=0)

1529

v |= unsigned(

bool

(is_set)) << 1u;

1531  if

(

const bm::word_t

* blk;(blk = blka[2])!=0)

1534

v |= unsigned(

bool

(is_set)) << 2u;

1536  if

(

const bm::word_t

* blk;(blk = blka[3])!=0)

1539

v |= unsigned(

bool

(is_set)) << 3u;

1541  if

(

const bm::word_t

* blk;(blk = blka[4])!=0)

1544

v |= unsigned(

bool

(is_set)) << 4u;

1546  if

(

const bm::word_t

* blk;(blk = blka[5])!=0)

1549

v |= unsigned(

bool

(is_set)) << 5u;

1551  if

(

const bm::word_t

* blk;(blk = blka[6])!=0)

1554

v |= unsigned(

bool

(is_set)) << 6u;

1556  if

(

const bm::word_t

* blk;(blk = blka[7])!=0)

1559

v |= unsigned(

bool

(is_set)) << 7u;

1561  return

(

unsigned char

)v;

1565  if

((blk = blka[0])!=0)

1571

v |= (unsigned)

bool

(is_set);

1573  if

((blk = blka[1])!=0)

1579

v |= unsigned(

bool

(is_set)) << 1u;

1581  if

((blk = blka[2])!=0)

1587

v |= unsigned(

bool

(is_set)) << 2u;

1589  if

((blk = blka[3])!=0)

1595

v |= unsigned(

bool

(is_set)) << 3u;

1598  if

((blk = blka[4])!=0)

1604

v |= unsigned(

bool

(is_set)) << 4u;

1606  if

((blk = blka[5])!=0)

1612

v |= unsigned(

bool

(is_set)) << 5u;

1614  if

((blk = blka[6])!=0)

1620

v |= unsigned(

bool

(is_set)) << 6u;

1622  if

((blk = blka[7])!=0)

1628

v |= unsigned(

bool

(is_set)) << 7u;

1631  return

(

unsigned char

)v;

1636 template

<

typename

BV>

1641  char value

= char(get_octet(pos, octet_idx));

1674 template

<

typename

BV>

1688

blka[0] = get_block(row_idx+0, i0, j0);

1689

blka[1] = get_block(row_idx+1, i0, j0);

1690

blka[2] = get_block(row_idx+2, i0, j0);

1691

blka[3] = get_block(row_idx+3, i0, j0);

1701  if

(!

test_4gaps

(blka[0], blka[1], blka[2], blka[3]))

1703  if

(

test_4bits

(blka[0], blka[1], blka[2], blka[3]))

1705

v = unsigned(

bool

((blka[0][nword] & mask0))) |

1706

unsigned(

bool

((blka[1][nword] & mask0)) << 1u) |

1707

unsigned(

bool

((blka[2][nword] & mask0)) << 2u) |

1708

unsigned(

bool

((blka[3][nword] & mask0)) << 3u);

1716  if

((blk = blka[

i

])!=0)

1722

v |= unsigned(

bool

(is_set)) <<

i

;

1724  if

((blk = blka[++

i

])!=0)

1730

v |= unsigned(

bool

(is_set)) <<

i

;

1738 template

<

typename

BV>

1740  typename

bvector_type::optmode opt_mode,

1741  typename

bvector_type::statistics*

st

)

1750  for

(

unsigned

k = 0; k < rsize_; ++k)

1754  typename

bvector_type::statistics stbv;

1756

bv->optimize(temp_block, opt_mode,

st

? &stbv : 0);

1765 template

<

typename

BV>

1768  for

(

unsigned

k = 0; k < rsize_; ++k)

1776 template

<

typename

BV>

1783  typename

bvector_type::statistics stbv;

1784

bv->calc_stat(&stbv);

1788  st

.max_serialize_mem += 8;

1793 template

<

typename

BV>

1795  typename

BV::optmode opt_mode)

1797  for

(

unsigned

k = 0; k < rsize_; ++k)

1803  typename

bvector_type::blocks_manager_type& bman =

1804

bv->get_blocks_manager();

1805

bman.optimize_bit_block(

i

, j, opt_mode);

1813 template

<

typename

BV>

1817

digest_bv.clear(

false

);

1818  unsigned

planes = (unsigned)rows();

1819  for

(

unsigned i

= 0;

i

< planes; ++

i

)

1822

digest_bv.set_bit_no_check(

i

);

1832 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

1839 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

1846

: bmatr_(sv_slices, is_dynamic, ap, bv_max_size, alloc)

1850  size_type

null_idx = (MAX_SIZE *

sizeof

(Val) * 8);

1859 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

1862

: bmatr_(bsv.bmatr_),

1863

slice_mask_(bsv.slice_mask_),

1865

effective_slices_(bsv.effective_slices_)

1870 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

1879

bmatr_.null_idx_ = arg_null_idx;

1882

bmatr_.allocate_rows(slices);

1888  if

(

i

&& (

i

== arg_null_idx))

1893

bv->set_range(0, size_-1);

1899

bmatr_.destruct_row(

i

);

1904

bmatr_.construct_row(

i

, *bv_src);

1912 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

1918  if

(rows < arg_rows)

1921

bmatr_.allocate_rows(rows);

1922  BM_ASSERT

(this->bmatr_.rows() == arg_rows);

1928

bv_null_arg = bmatr.

get_row

(null_idx);

1933

bv_null->merge(*bv_null_arg);

1935  if

(rows > arg_rows)

1937  for

(

unsigned

j = 0; j < rows; ++j)

1940  if

(arg_bv && arg_bv != bv_null_arg)

1951 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

1957

bmatr_.swap(bsv.bmatr_);

1960  bm::xor_swap

(effective_slices_, bsv.effective_slices_);

1966 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

1969  auto

slices = bmatr_.rows();

1974

bmatr_.clear_row(

i

, free_mem);

1975

slice_mask_ = 0; size_ = 0;

1977

bv_null->clear(

true

);

1978

this->bmatr_.is_ro_ =

false

;

1983 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

1990  return

clear_range(right, left, set_null);

1991  auto

planes = bmatr_.rows();

1993  for

(

unsigned i

= 0;

i

< planes; ++

i

)

1997

bv->clear_range_no_check(left, right);

1999  if

(set_null && bv_null)

2000

bv_null->clear_range_no_check(left, right);

2005 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2011

this->clear_range(0, left-1, (slice_null ==

bm::use_null

));

2014

this->clear_range(right + 1, sz, (slice_null ==

bm::use_null

));

2019 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2030

clear_range(sz, this->size_, set_null);

2037 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2042  return

(bv_null) ? (!bv_null->test(idx)) :

false

;

2047 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2052

bv_null->insert(idx, not_null);

2057 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2069  if

(

i

> effective_slices_)

2070

effective_slices_ =

i

;

2077 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2083  const unsigned

planes =

sizeof

(

value_type

) * 8;

2085  unsigned

slice_size = (element_idx+1) * planes;

2086  if

(slice_size > this->bmatr_.rows())

2087

slice_size = (

unsigned

) this->bmatr_.rows();

2088  for

(

unsigned i

= element_idx * planes;

i

< slice_size; ++

i

, ++bidx)

2089  mask

|= get_slice(

i

) ? (mask1 << bidx) : 0ull;

2095 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2097  typename

bvector_type::optmode opt_mode,

2098  typename

bvector_type::statistics*

st

)

2100  typename

bvector_type::statistics stbv;

2101

bmatr_.optimize(temp_block, opt_mode, &stbv);

2106  unsigned

slices = (unsigned)this->bmatr_.rows();

2107  for

(

unsigned

j = 0; j < slices; ++j)

2110  if

(bv && (bv != bv_null))

2115

this->bmatr_.destruct_row(j);

2125 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2127  typename

bvector_type::statistics*

st

)

const BMNOEXCEPT 2131  size_type

slices = this->get_bmatrix().rows();

2132

bmatr_.calc_stat(*

st

, slices);

2135  st

->max_serialize_mem += 1 + 1 + 1 + 1 + 8 + (8 * slices);

2136  st

->max_serialize_mem += 1 + 8;

2141 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2145

bmatr_.clear_column(idx, plane_idx);

2150 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2154

bmatr_.insert_column(idx, plane_idx);

2159 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2163

bmatr_.erase_column(idx, erase_null);

2168 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2173  if

(

size_type

arg_size = sv.size(); this->size_ != arg_size)

2176  unsigned

slices = (unsigned) this->bmatr_.rows();

2177  unsigned

arg_slices = (unsigned) sv.bmatr_.rows();

2178  unsigned

max_slices(slices);

2179  if

(max_slices < arg_slices)

2180

max_slices = arg_slices;

2182  const bvector_type

* bv_null = this->get_null_bvector();

2183  const bvector_type

* bv_null_arg = sv.get_null_bvector();

2185  for

(

unsigned

j = 0; j < max_slices; ++j)

2189

bv = (j < slices) ? this->bmatr_.get_row(j) : 0;

2190

arg_bv = (j < arg_slices) ? sv.bmatr_.get_row(j) : 0;

2193  if

(arg_bv == bv_null_arg)

2212  bool eq

= bv->equal(*arg_bv);

2220  if

(bv_null == bv_null_arg)

2222  if

(!bv_null || !bv_null_arg)

2227  bool eq

= bv_null->equal(*bv_null_arg);

2236 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2239  unsigned

slices = (unsigned) this->bmatr_.rows();

2240  for

(

unsigned

j = 0; j < slices; ++j)

2242  if

(

const bvector_type

* bv = this->bmatr_.get_row(j))

2246

bmatr_.is_ro_ =

true

;

2255 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2269

spli = this->bmatr_.rows();

2271

bv_null->copy_range(*bv_null_arg, left, right);

2275

spli = this->bmatr_.rows();

2281  if

(arg_bv == bv_null_arg)

2283  bvector_type

* bv = this->get_create_slice(

unsigned

(j));

2284

bv->copy_range(*arg_bv, left, right);

2292 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2296  if

constexpr (is_signed())

2313 template

<

class

Val,

class

BV,

unsigned

MAX_SIZE>

2317  if

constexpr (is_signed())

2330 #pragma warning( pop )

ncbi::TMaskedQueryRegions mask

Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.

#define BM_DECLARE_TEMP_BLOCK(x)

Constants, lookup tables and typedefs.

#define FULL_BLOCK_FAKE_ADDR

Utilities for bit transposition (internal) (experimental!)

Base class for bit-transposed(bit-sliced) sparse vector construction.

allocator_pool_type * get_allocator_pool() const noexcept

Get allocation pool.

void freeze_matr()

Turn on RO mode.

void clear_all(bool free_mem=true) noexcept

resize to zero, free memory

bm::id64_t get_slice_mask(unsigned element_idx) const noexcept

void resize(size_type new_size, bool set_null)

unsigned_value_type slice_mask_

slice presence bit-mask

const bvector_type * bvector_type_const_ptr

void merge_matr(bmatrix_type &bmatr)

Merge plane bvectors from an outside base matrix Note: outside base matrix gets destroyed.

const bmatrix_type & get_bmatrix() const noexcept

bvector_type * bvector_type_ptr

const value_type & const_reference

void copy_from(const base_sparse_vector< Val, BV, MAX_SIZE > &bsv)

bool empty() const noexcept

bvector_type_ptr slice(unsigned i) noexcept

get access to bit-plane as is (can return NULL)

bvector_type_const_ptr slice(unsigned i) const noexcept

bvector_type::allocation_policy allocation_policy_type

void clear_range(size_type left, size_type right, bool set_null)

bvector_type_ptr get_create_slice(unsigned i)

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

static constexpr unsigned value_bits() noexcept

Number of total bit-planes in the value type.

static unsigned slices() noexcept

get total number of bit-planes in the vector

static value_type u2s(unsigned_value_type v) noexcept

Convert unsigned value type to signed representation.

size_type size() const noexcept

void sync_ro() noexcept

Sybc read-only state.

base_sparse_vector(const base_sparse_vector< Val, BV, MAX_SIZE > &bsv)

unsigned effective_slices() const noexcept

Number of effective bit-planes in the value type.

bool is_nullable() const noexcept

check if container supports NULL(unassigned) values

void free_slice(unsigned i)

free memory in bit-plane

void optimize_block(block_idx_type nb, typename BV::optmode opt_mode)

plane index for the "NOT NULL" flags plane

bool is_null(size_type idx) const noexcept

test if specified element is NULL

unsigned effective_slices_

number of bit slices actually allocated

void calc_stat(typename bvector_type::statistics *st) const noexcept

Calculates memory statistics.

bvector_type_const_ptr get_slice(unsigned i) const noexcept

get read-only access to bit-plane

bmatrix_type bmatr_

bit-transposed matrix

void erase_column(size_type idx, bool erase_null)

allocator_type::allocator_pool_type allocator_pool_type

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())

void swap_elements(size_type idx1, size_type idx2)

swap two vector elements

void swap(base_sparse_vector< Val, BV, MAX_SIZE > &bsv) noexcept

bmatrix_type & get_bmatrix() noexcept

access to internal bit-matrix

static unsigned_value_type s2u(value_type v) noexcept

Convert signed value type to unsigned representation.

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.

void set_allocator_pool(allocator_pool_type *pool_ptr) noexcept

Set allocation pool.

size_type size_

array size

void bit_and_rows(const bvector_type &bv)

Set AND (intersect) operation on all existing bit-slices.

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

void keep_range_no_check(size_type left, size_type right, bm::null_support slice_null)

std::make_unsigned< value_type >::type unsigned_value_type

void set_ro_flag(bool b) noexcept

Force RO flag without running freeze ops on content.

bvector_type::enumerator bvector_enumerator_type

void bit_sub_rows(const bvector_type &bv, bool use_null)

Set SUB (MINUS) operation on all existing bit-slices.

bm::basic_bmatrix< BV > bmatrix_type

static constexpr bool is_signed() noexcept

returns true if value type is signed integral type

static unsigned stored_slices() noexcept

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

const bvector_type * get_null_bvector() const noexcept

Get bit-vector of assigned values or NULL (if not constructed that way)

bm::null_support get_null_support() const noexcept

check if container supports NULL (unassigned) values

base_sparse_vector(base_sparse_vector< Val, BV, MAX_SIZE > &&bsv) noexcept

bvector_type * get_null_bvect() noexcept

BV::allocator_type allocator_type

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

void insert_null(size_type idx, bool not_null)

void clear_value_planes_from(unsigned plane_idx, size_type idx)

void mark_null_idx(unsigned null_idx) noexcept

Set NULL plain index.

void insert_clear_value_planes_from(unsigned plane_idx, size_type idx)

bvector_type::block_idx_type block_idx_type

Basic dense bit-matrix class.

void insert_octet(size_type pos, size_type octet_idx, unsigned char octet)

void insert_column(size_type idx, size_type row_from)

allocator_pool_type * get_allocator_pool() const noexcept

bool is_ro() const noexcept

return true if matrix is in read-only mode

unsigned char get_octet(size_type pos, size_type octet_idx) const noexcept

bvector_type::block_idx_type block_idx_type

bool equal(const basic_bmatrix< BV > &bbm) const noexcept

basic_bmatrix< BV > & operator=(const basic_bmatrix< BV > &bbm)

int compare_octet(size_type pos, size_type octet_idx, char octet) const noexcept

bool is_same_structure(const basic_bmatrix< BV > &bbm) const noexcept

Debugging function to check if two matrixes have the same rows created.

void set_allocator_pool(allocator_pool_type *pool_ptr) noexcept

bvector_type * bvector_type_ptr

bvector_type_ptr * bv_rows_

void calc_stat(typename bvector_type::statistics *st) const noexcept

const unsigned char * get_remap_buffer() const noexcept

void swap_columns(size_type idx1, size_type idx2)

bool is_dynamic_

if rsize is dynamic (variable length)

void swap(basic_bmatrix< BV > &bbm) noexcept

unsigned get_half_octet(size_type pos, size_type row_idx) const noexcept

bvector_type_ptr construct_row(size_type row)

static constexpr bool is_compressed() noexcept

void set_null_idx(size_type null_idx) noexcept

set index of the NULL vector

const bvector_type * row(size_type i) const noexcept

void calc_stat(typename bvector_type::statistics &st, size_type rsize) const noexcept

size_type rows_not_null() const noexcept

BV::allocator_type allocator_type

void mark_null_idx(unsigned null_idx) noexcept

bvector_type::allocation_policy allocation_policy_type

remap_matrix_type * get_remap_matrix()

size_type null_idx_

Index of the NULL row.

allocator_type::allocator_pool_type allocator_pool_type

void destruct_row(size_type row)

const bvector_type * bvector_type_const_ptr

unsigned char * init_remap_buffer() noexcept

bvector_type * construct_bvector(const bvector_type *bv) const

const bm::word_t * get_block(size_type p, unsigned i, unsigned j) const noexcept

Get low level internal access to.

void bit_and_rows(const bvector_type &bv)

Set AND (intersect) operation on all existing rows.

const basic_bmatrix< BV > & get_bmatrix() const noexcept

return *this (for serializer compat)

void build_plane_digest(bvector_type &digest_bv) const

Construct digest vector of 1s for every row in the matrix.

size_type size() const noexcept

return size of the vector (always bm::id_max )

size_t remap_size() const noexcept

bvector_type_ptr get_create_slice(unsigned i)

allocator_pool_type * pool_

size_type size_internal() const noexcept

same as size()

void sync(bool, bool) noexcept

syncronize internal structures, build fast access index

void free_rows() noexcept

Free all rows.

void copy_from(const basic_bmatrix< BV > &bbm)

static void throw_bad_alloc()

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

const remap_matrix_type * get_remap_matrix() const

static constexpr bool is_str() noexcept

void clear_slices_range(unsigned slice_from, unsigned slize_until, size_type idx)

Clear bit-planes bit.

~basic_bmatrix() noexcept

bvector_type * get_row(size_type i) noexcept

void clear_column(size_type idx, size_type row_from)

void set_ro_flag(bool b) noexcept

Force RO flag without running freeze ops on content.

void clear_row(size_type row, bool free_mem)

void clear() noexcept

resize to zero, free memory

void allocate_rows(size_type rsize)

allocate matrix rows of bit-vectors (new rows are NULLs)

void optimize_block(block_idx_type nb, typename BV::optmode opt_mode)

bvector_type * get_null_bvector() noexcept

always return 0 as basic matrix does not support the notion of NULL plane (as sparse_vectors do)

size_type calc_effective_rows_not_null() const noexcept

allocation_policy_type ap_

bvector_type_const_ptr get_row(size_type i) const noexcept

void destruct_bvector(bvector_type *bv) const

void resize_internal(size_type sz, bool set_null=true) noexcept

size_type octet_size() const noexcept

void set_octet(size_type pos, size_type octet_idx, unsigned char octet)

bool is_dynamic() const noexcept

Return if matrix is dynamic resizable.

void erase_column(size_type idx, bool erase_null)

void set_remap() noexcept

basic_bmatrix(basic_bmatrix< BV > &&bbm) noexcept

size_type get_null_idx() const noexcept

return index of the NULL vector

basic_bmatrix(size_type rsize, bool is_dynamic=true, allocation_policy_type ap=allocation_policy_type(), size_type bv_max_size=bm::id_max, const allocator_type &alloc=allocator_type())

void bit_sub_rows(const bvector_type &bv, bool use_null)

Set SUB (MINUS) operation on all existing rows.

bool is_nullable() const noexcept

check if container supports NULL(unassigned) values

void clear_all(bool free_mem, unsigned) noexcept

resize to zero, free memory

bvector_type::statistics statistics

size_type rows() const noexcept

constexpr bool is_remap() const noexcept

various type traits

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

Nominal function for serializer compatibility.

bvector_type::size_type size_type

basic_bmatrix< BV > & get_bmatrix() noexcept

return *this (for serializer compat)

static unsigned stored_slices() noexcept

optmode

Optimization mode Every next level means additional checks (better compression vs time)

bvector_size_type size_type

blocks_manager_type::block_idx_type block_idx_type

Heap allocated scalar-type matrix.

Rank-Select compressed sparse vector.

sparse vector de-serializer

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

void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)

null_support

NULL-able value support.

@ use_null

support "non-assigned" or "NULL" logic

@ no_null

do not support NULL values

unsigned gap_test_unr(const T *buf, const unsigned pos) noexcept

Tests if bit = pos is true. Analog of bm::gap_test with SIMD unrolling.

unsigned int

A callback function used to compare two keys in a database.

bool test_4gaps(const bm::word_t *p0, const bm::word_t *p1, const bm::word_t *p2, const bm::word_t *p3) noexcept

Test 4 pointers are all marked as GAPs.

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

XOR swap two variables.

const unsigned set_block_mask

void get_block_coord(BI_TYPE nb, unsigned &i, unsigned &j) noexcept

Recalc linear bvector block index into 2D matrix coordinates.

bool check_any_fullb(const bm::word_t *blka[8], const bm::word_t *FBADDR)

const unsigned set_word_shift

unsigned long long int id64_t

const unsigned set_block_shift

const unsigned set_word_mask

bool test_4bits(const bm::word_t *p0, const bm::word_t *p1, const bm::word_t *p2, const bm::word_t *p3) noexcept

Test 4 pointers are not NULL and not marked as FULLBLOCK.

double value_type

The numeric datatype used by the parser.

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

void resize(vector< SMethodDef > &container)

const GenericPointer< typename T::ValueType > T2 value

bool eq(T x_, T y_, T round_)

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

#define row(bind, expected)


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