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

NCBI C++ ToolKit: include/db/bdb/bdb_bv_store.hpp Source File

1 #ifndef BDB___BV_STORE_BASE__HPP 2 #define BDB___BV_STORE_BASE__HPP 69  CBDB_BvStore

(

unsigned

initial_serialization_buf_size = 16384);

94  unsigned

*

count

= 0);

149 template

<

class

TBV>

158

:

TParent

(initial_serialization_buf_size)

160

this->

BindKey

(

"id"

, &

id

);

187  unsigned

bitcount_from,

188  unsigned

bitcount_to,

229 template

<

class

TBV,

class

TM>

307 template

<

class

TBV>

309

: m_Buffer(initial_serialization_buf_size),

314 template

<

class

TBV>

322 template

<

class

TBV>

326  return

ReadRealloc(bv,

true

);

329 template

<

class

TBV>

341  if

(m_STmpBlock == 0) {

357 template

<

class

TBV>

360  if

(m_STmpBlock == 0) {

367 template

<

class

TBV>

372  if

(m_STmpBlock == 0) {

377  typename

TBitVector::statistics st1;

378  if

(compact == eCompact) {

379

m_TmpBVec.clear(

true

);

381

m_TmpBVec.optimize(0, TBitVector::opt_compress, &st1);

382

bv_to_store = &m_TmpBVec;

385

bv_to_store->calc_stat(&st1);

388  if

(st1.max_serialize_mem > m_Buffer.size()) {

389

m_Buffer.resize_mem(st1.max_serialize_mem);

395  return

UpdateInsert(&m_Buffer[0],

size

);

398 template

<

class

TBV>

400  bool

clear_target_vec)

404

err =

Read

(bv, clear_target_vec);

409  unsigned

buf_size = LobSize();

410

m_Buffer.resize_mem(buf_size);

411

err =

Read

(bv, clear_target_vec);

419 template

<

class

TBV>

426 template

<

class

TBV>

428  bool

clear_target_vec)

430  if

(m_Buffer.size() < m_Buffer.capacity()) {

431

m_Buffer.resize_mem(m_Buffer.capacity());

434  if

(m_Buffer.size() == 0) {

435

m_Buffer.resize_mem(16384);

438  void

* p = &m_Buffer[0];

439  EBDB_ErrCode

err = Fetch(&p, m_Buffer.size(), eReallocForbidden);

443  if

(clear_target_vec) {

451 template

<

class

TBV>

454  if

(m_STmpBlock == 0) {

460 template

<

class

TBV>

465  void

* p = &m_Buffer[0];

472  size_t

buf_size = LobSize();

473

m_Buffer.resize(buf_size);

474  void

* p = &m_Buffer[0];

488 template

<

class

TBV>

491  for

(

size_t i

= 0;

i

< bv_lst.size(); ++

i

)

495

WriteVector(*bv, TParent::eCompact);

499 template

<

class

TBV>

526

cur.

From

<< ++bv_id;

539 template

<

class

TBV>

542  unsigned

bitcount_from,

543  unsigned

bitcount_to,

548  if

(this->m_STmpBlock == 0) {

561  void

* p = &this->m_Buffer[0];

564

&p, this->m_Buffer.size(),

572  unsigned

buf_size = this->LobSize();

574  if

(out_of_interval_ids) {

575

out_of_interval_ids->set(bv_id);

582

this->m_Buffer.resize(buf_size);

583

p = &this->m_Buffer[0];

585

&p, this->m_Buffer.size(),

596  unsigned

bitcount = bv.count();

597  if

(bitcount >= bitcount_from && bitcount <= bitcount_to) {

598  TBitVector

& map_vector = (*bc_map)[bitcount];

599

map_vector.set(bv_id);

601  if

(out_of_interval_ids) {

602

out_of_interval_ids->set(bv_id);

617 template

<

class

TBV,

class

TM>

626 template

<

class

TBV,

class

TM>

630 template

<

class

TBV,

class

TM>

640

matr_cols = matr.cols();

641

matr_rows = matr.rows();

642

store_type = (unsigned) eDescriptor;

643

err = TParent::WriteVector(descr_bv, compact);

651

matr_cols = matr.cols();

652

matr_rows = matr.rows();

653

store_type = (unsigned) eMatrix;

658

err = UpdateInsert(matr.data(), msize);

662 template

<

class

TBV,

class

TM>

667

descr_list->resize(0);

670  if

(this->m_Buffer.size() == 0) {

671

this->m_Buffer.resize(16384);

676

cur.

From

<< 0 << 0 << 0;

679  void

* p = &this->m_Buffer[0];

682

&p, this->m_Buffer.size(),

687  unsigned

buf_size = this->LobSize();

688

this->m_Buffer.resize(buf_size);

689

p = &this->m_Buffer[0];

691

&p, this->m_Buffer.size(),

698  unsigned

cols = matr_cols;

699  unsigned

rows = matr_rows;

BDB library BLOB support.

Berkeley BDB file cursor.

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

Berkeley DB BLOB File class.

Basic template class for bitvector storage.

BDB errno exception class.

Berkeley DB file cursor class.

Reallocable memory buffer (no memory copy overhead) Mimics vector<>, without the overhead of explicit...

size_type deserialize(bvector_type &bv, const unsigned char *buf, set_operation op, bool exit_on_one=false)

Deserialize bvector using buffer as set operation argument.

void ReadIds(TBitVector *id_bv)

Read id storage keys (id field) into bit-vector.

CBDB_FieldUint4 store_type

EStoreType.

SMatrixDescr & operator=(const SMatrixDescr &mdesc)

EBDB_ErrCode ReadRealloc(TBuffer &buffer)

Read BLOB into vector.

EBDB_ErrCode WriteVector(const TBitVector &bv, ECompact compact)

Save a bitvector to the store.

TBitVector m_TmpBVec

temporary bitset

void LoadMatrixDescriptions(TMatrixDescrList *descr_list)

Load all matrix descriptions from the store WHERE store_type = eDescriptor.

SMatrixDescr(const SMatrixDescr &mdesc)

CBDB_FieldUint4 matr_rows

Number of rows (number of bvectors)

SBDB_BvStore_Id(unsigned initial_serialization_buf_size=16384)

CBDB_BvStore< TBV > TParent

CBDB_MatrixBvStore(unsigned initial_serialization_buf_size=16384)

vector< SMatrixDescr > TMatrixDescrList

void ComputeBitCountMap(TBitCountMap *bc_map, unsigned bitcount_from, unsigned bitcount_to, TBitVector *out_of_interval_ids=0)

Utility to compute bit-count storage statistics this statistics is a map bit_count -> list of ids in ...

CBDB_BvStore< TBV > TParent

bm::word_t * m_STmpBlock

temp block for bitvector serialization

CBDB_MatrixBvStore(const CBDB_MatrixBvStore &)

SMatrixDescr(unsigned c=0, unsigned r=0, TBitVector *bv=0)

TBV TBitVector

Serializable bitvector.

bm::word_t * GetSerializationTempBlock()

map< unsigned, TBitVector > TBitCountMap

Bitcount to bvector map (bvector represents the list of ids with the same bitcount.

CBDB_FieldUint4 matr_cols

Number of columns (bit count)

TBV TBitVector

Serializable bitvector.

TParent::TBitVector TBitVector

CBDB_MatrixBvStore & operator=(const CBDB_MatrixBvStore &)

TBuffer::value_type TBufferValue

EBDB_ErrCode Read(TBitVector *bv, bool clear_target_vec)

Fetch, deserialize bvector.

TBuffer & GetBuffer()

Get access to the internal buffer.

TParent::ECompact ECompact

CBDB_FieldUint4 id

ID key.

void StoreVectorList(const vector< TBitVector * > &bv_lst)

Store vector of bitvector ponters, index in the vector becoms an id of the element.

TBuffer m_Buffer

temporary serialization buffer

void Deserialize(TBitVector *bv, const TBufferValue *buf)

EBDB_ErrCode ReadRealloc(TBitVector *bv, bool clear_target_vec)

Read bvector, reallocate the internal buffer if necessary.

EBDB_ErrCode ReadVector(TBitVector *bv)

Fetch and deserialize the *current* bitvector.

ECompact

Compression options for vector storage.

EBDB_ErrCode FetchToBuffer(CBDB_FileCursor &cur)

Fetch the next BLOB record to the resiable buffer.

CBDB_BvStore(unsigned initial_serialization_buf_size=16384)

Construction.

EBDB_ErrCode InsertSparseMatrix(const TMatrix &matr, const TBitVector &descr_bv, ECompact compact)

Save sparse matrix.

@ eDescriptor

Sparse matrix descriptor.

@ eBitVector

Simple bit vector.

void SetCondition(ECondition cond_from, ECondition cond_to=eNotSet)

Set search condition(type of interval)

CSimpleBuffer TBuffer

typedef for raw buffer operations

void BindKey(const char *field_name, CBDB_Field *key_field, size_t buf_size=0)

EBDB_ErrCode

BDB Return codes.

EBDB_ErrCode Fetch(EFetchDirection fdir=eDefault)

Fetch record.

CBDB_ConditionHandle From

bool IsBufferSmall() const

Returns TRUE if error is BerekleyDB DB_BUFFER_SMALL (insufficient buffer size)

bool IsNoMem() const

Returns TRUE if error is BerekleyDB ENOMEM (insufficient buffer size)

void Read(CObjectIStream &in, TObjectPtr object, const CTypeRef &type)

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

set_operation

Codes of set operations.

@ BM_GAP

GAP compression is ON.

size_t serialize(const BV &bv, unsigned char *buf, bm::word_t *temp_block=0, unsigned serialization_flags=0)

Saves bitvector into memory.

size_t deserialize(BV &bv, const unsigned char *buf, bm::word_t *temp_block=0, const bm::bv_ref_vector< BV > *ref_vect=0)

Bitvector deserialization from a memory BLOB.

@ BM_NO_GAP_LENGTH

save no GAP info (save some space)

@ BM_NO_BYTE_ORDER

save no byte-order info (save some space)

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 unsigned set_block_alloc_size

double value_type

The numeric datatype used by the parser.

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

Compressed bitset (entry point to bm.h)

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

Sparse matrix descriptor.

void Deserialize(CNcbiIstream &istr, CRawScoreVector< Key, Score > &)


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