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

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

1 #ifndef BMSPARSEVEC_UTIL_H__INCLUDED__ 2 #define BMSPARSEVEC_UTIL_H__INCLUDED__ 24 #ifndef BM__H__INCLUDED__ 27 # error missing include (bm.h or bm64.h) 58  if

(

this

!= &addr_res)

225 template

<

class

Value,

class

BV>

348  typename

BV::statistics bv_st;

350

addr_bv.calc_stat(&bv_st);

351  st

->memory_used = bv_st.memory_used;

352  st

->max_serialize_mem = bv_st.max_serialize_mem;

359  st

->max_serialize_mem +=

buf

.size();

363  size_t

h_size = 2 + 1 + ((this->

dense_vect_

.size()+1) * 8);

367  size_t

extra_mem = (

st

->max_serialize_mem / 10);

370  st

->max_serialize_mem += extra_mem;

380

: rs_index_(0), in_sync_(

false

)

413

rs_index_->~rs_index();

423

: addr_bv_(addr_res.addr_bv_),

424

in_sync_(addr_res.in_sync_)

442  if

(

this

!= &addr_res)

444

addr_bv_.move_from(addr_res.addr_bv_);

445

in_sync_ = addr_res.in_sync_;

449

rs_index_ = addr_res.rs_index_;

450

addr_res.rs_index_ = 0;

455

rs_index_ = 0; in_sync_ =

false

;

468

*id_to = addr_bv_.count_to_test(id_from, *rs_index_);

472  bool

found = addr_bv_.test(id_from);

479

*id_to = addr_bv_.count_range(0, id_from);

482  return

(

bool

) *id_to;

494

*id_to = addr_bv_.count_to_test(id_from, *rs_index_);

495  return

(

bool

)*id_to;

506

addr_bv_.set(id_from);

516  if

(in_sync_ && force ==

false

)

519

addr_bv_.build_rs_index(rs_index_);

528

addr_bv_.optimize(temp_block);

537  return

addr_bv_.equal(addr_res.addr_bv_);

557

: set_flags_bv_(addr_res.set_flags_bv_),

558

addr_sv_(addr_res.addr_sv_),

559

max_addr_(addr_res.max_addr_)

570  bool

found = set_flags_bv_.test(id_from);

571

*id_to = found ? addr_sv_.at(id_from) : 0;

580  bool

found = set_flags_bv_.test(id_from);

583

set_flags_bv_.set(id_from);

585

addr_sv_.set(id_from, max_addr_);

594

set_flags_bv_.optimize(temp_block);

595

addr_sv_.optimize(temp_block);

601 template

<

class

Value,

class

BV>

609 template

<

class

Value,

class

BV>

612  if

(dense_vect_.empty())

616  if

(

key

<= last_add_)

622

addr_res_.set(

key

);

623

dense_vect_.push_back(

val

);

630 template

<

class

Value,

class

BV>

638 template

<

class

Value,

class

BV>

641

addr_res_.optimize(temp_block);

646 template

<

class

Value,

class

BV>

650  bool

found = addr_res_.resolve(

key

,

addr

);

658 template

<

class

Value,

class

BV>

662  return

dense_vect_.at(

addr

);

667 template

<

class

Value,

class

BV>

672  bool

found = addr_res_.resolve(

key

, &idx);

675

throw_range_error(

"compressed collection item not found"

);

682 template

<

class

Value,

class

BV>

687  bool

found = addr_res_.resolve(

key

, &idx);

690

throw_range_error(

"compressed collection item not found"

);

692  return

dense_vect_.at(idx-1);

698 template

<

class

Value,

class

BV>

702  throw

std::range_error(err_msg);

710 template

<

class

Value,

class

BV>

717  int cmp

= bv.compare(bva);

721  for

(

size_t i

= 0;

i

< dense_vect_.size(); ++

i

)

#define BM_ASSERT_THROW(x, xerrcode)

Serialization / compression of bvector<>. Set theoretical operations on compressed BLOBs.

Bit-bector prefix sum address resolver using bit-vector prefix sum as a space compactor.

void unsync()

Unsync the prefix sum table.

void sync(bool force=false)

Re-calculate prefix sum table (same as calc_prefix_sum)

bool get(size_type id_from, size_type *id_to) const noexcept

Resolve id to integer id (address) without sync check.

void calc_prefix_sum(bool force=false)

Re-calculate prefix sum table.

bool in_sync() const

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

bool equal(const bvps_addr_resolver &addr_res) const noexcept

equality comparison

bvector_type addr_bv_

bit-vector for id translation

bvps_addr_resolver(const bvps_addr_resolver &addr_res)

void move_from(bvps_addr_resolver &addr_res) noexcept

Move content from the argument address resolver.

void construct_rs_index()

bvector_type::rs_index_type rs_index_type

bvps_addr_resolver & operator=(const bvps_addr_resolver &addr_res)

void optimize(bm::word_t *temp_block=0)

optimize underlying bit-vector

void set(size_type id_from)

Set id (bit) to address resolver.

bool resolve(size_type id_from, size_type *id_to) const noexcept

Resolve id to integer id (address)

bvector_type & get_bvector()

Get writable reference to the underlying bit-vector.

bool in_sync_

flag if prefix sum is in-sync with vector

const bvector_type & get_bvector() const

Get const reference to the underlying bit-vector.

rs_index_type * rs_index_

rank translation index

Compressed (sparse collection of objects)

void calc_stat(statistics *st) const

compute statistics on memory consumption

serializer< BV >::buffer buffer_type

bool move_buffer(typename parent_type::key_type key, buffer_type &buffer)

move external buffer into collection

compressed_collection< typename serializer< BV >::buffer, BV > parent_type

Compressed (sparse collection of objects)

address_resolver_type & resolver()

Get address resolver.

bool push_back(key_type key, const value_type &val)

Add new value to compressed collection.

void optimize(bm::word_t *temp_block=0)

perform memory optimizations/compression

container_type & container()

return dense container for direct access (this should be treated as an internal function designed for...

bm::bvps_addr_resolver< bvector_type > address_resolver_type

void sync()

Checkpoint method to prepare collection for reading.

value_type & at(key_type key)

find and return associated value (with bounds/presense checking)

size_t size() const

size of collection

key_type last_add_

last added element

container_type dense_vect_

compressed space container

bool equal(const compressed_collection< Value, BV > &ccoll) const

perform equality comparison with another collection

const value_type & at(key_type key) const

find and return const associated value (with bounds/presense checking)

const value_type & get(address_type addr) const

Get access to associated value by resolved address.

void throw_range_error(const char *err_msg) const

address_resolver_type addr_res_

address resolver

bool resolve(key_type key, address_type *addr) const

Resolve key address (index) in the dense vector.

const address_resolver_type & resolver() const

Get address resolver.

std::vector< value_type > container_type

sparse vector based address resolver (no space compactor, just bit-plane compressors provided by spar...

bvector_type::size_type size_type

const bvector_type & get_bvector() const

Get const reference to the underlying bit-vector of set values.

bvector_type set_flags_bv_

bit-vector of set flags

SV::bvector_type bvector_type

sparse_vector_type addr_sv_

sparse vector for address map

bool get(size_type id_from, size_type *id_to) const

Resolve id to integer id (address)

bool resolve(size_type id_from, size_type *id_to) const

Resolve id to integer id (address)

void set(size_type id_from)

Set id (bit) to address resolver.

size_type max_addr_

maximum allocated address/index

void optimize(bm::word_t *temp_block=0)

optimize underlying sparse vectors

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)

const struct ncbi::grid::netcache::search::fields::KEY key

GenericValue< UTF8<> > Value

GenericValue with UTF8 encoding.

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

size_t max_serialize_mem

memory needed for serialization

size_t memory_used

total capacity


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