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

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

1 #ifndef BMVMIN__H__INCLUDED__ 2 #define BMVMIN__H__INCLUDED__ 27 #pragma warning( push ) 28 #pragma warning( disable : 4100) 35 #define BM_MINISET_GAPLEN (bm::gap_len_table<true>::_len[0]) 36 #define BM_MINISET_ARRSIZE(x) ((x / 32) + ( (x % 32) && 1 )) 52 template

<

class

A,

size_t

N>

class miniset 124  unsigned

new_block_len =

136  return sizeof

(*this) +

147

mset.

m_buf

= buftmp;

148  unsigned

typetmp =

m_type

;

159  m_buf

= A::allocate(arr_size, 0);

175  m_buf

= A::allocate(arr_size, 0);

196

A::deallocate(

m_buf

, arr_size);

244  return sizeof

(*this);

286  m_buf

= A::allocate(arr_size, 0);

287

::memset(

m_buf

, 0, arr_size *

sizeof

(

unsigned

));

293  m_buf

= A::allocate(arr_size, 0);

294

::memcpy(

m_buf

,

bvect

.m_buf, arr_size *

sizeof

(

unsigned

));

305  unsigned char mask

= (

unsigned

char)((

char

)0x1 << (pos & 7));

306  unsigned char

* offs = (

unsigned char

*)

m_buf

+ (pos >> 3);

307  return

(*offs) &

mask

;

313  unsigned char mask

= (

unsigned

char)(0x1 << (pos & 7));

314  unsigned char

* offs = (

unsigned char

*)

m_buf

+ (pos >> 3);

321  unsigned char mask

= (

unsigned

char)(0x1 << (pos & 7));

322  unsigned char

* offs = (

unsigned char

*)

m_buf

+ (pos >> 3);

323

*offs &= (

unsigned

char)~

mask

;

331  for

(

unsigned

* start =

m_buf

; start < end; ++start)

333  unsigned value

= *start;

344  if

(!cnt1 && !cnt2)

return

0;

345  size_type

cnt_min = cnt1 < cnt2 ? cnt1 : cnt2;

346  if

(!cnt_min)

return

cnt1 ? 1 : -1;

355  return

idx1 < idx2 ? 1 : -1;

362  if

(!idx1)

return

-1;

364  return

idx1 < idx2 ? 1 : -1;

374  const unsigned char

* ptr = (

unsigned char

*)

m_buf

;

375  for

(

unsigned i

= 0;

i

< ((

m_size

/8)+1); ++

i

)

377  unsigned char

w = ptr[

i

];

380  while

((w & 1u) == 0)

382

w = (

unsigned

char)(w >> 1u);

387

pos =

size_type

(pos +

sizeof

(

unsigned char

) * 8u);

399  unsigned char

* offs = (

unsigned char

*)

m_buf

+ (

i

>> 3);

402  unsigned char mask

= (

unsigned

char)((

char

)0x1 << (

i

& 7));

419  const unsigned

* src =

bvect

.get_buf();

420  for

(

unsigned

* start =

m_buf

; start < end; ++start)

429  const unsigned

* src =

bvect

.get_buf();

430  for

(

unsigned

* start =

m_buf

; start < end; ++start)

439  const unsigned

* src =

bvect

.get_buf();

440  for

(

unsigned

* start =

m_buf

; start < end; ++start)

449  const unsigned

* src =

bvect

.get_buf();

450  for

(

unsigned

* start =

m_buf

; start < end; ++start)

479 #pragma warning( pop )

ncbi::TMaskedQueryRegions mask

#define BM_MINISET_ARRSIZE(x)

#define BM_MINISET_GAPLEN

Bitvector class with very limited functionality.

const unsigned * get_buf() const

int is_bit_true(size_type pos) const

Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise.

unsigned mem_used() const

size_type get_first() const

Returns index of the first ON bit.

size_type get_next(size_type idx) const

Returns index of next bit, which is ON.

void combine_sub(const bvector_mini &bvect)

void swap(bvector_mini &bvm)

size_type bit_count() const

Counts number of bits ON.

bvector_mini(size_type size)

void combine_and(const bvector_mini &bvect)

void combine_or(const bvector_mini &bvect)

void combine_xor(const bvector_mini &bvect)

int compare(const bvector_mini &bvect)

Comparison.

bvector_mini(const bvector_mini &bvect)

void clear_bit(size_type pos)

Sets bit number pos to 0.

void set_bit(size_type pos)

Sets bit number pos to 1.

Bitvector Bit-vector container with runtime compression of bits.

size_type get_next(size_type prev) const noexcept

Finds the number of the next bit ON.

size_type get_first() const noexcept

find first 1 bit in vector. Function may return 0 and this requires an extra check if bit 0 is actual...

Mini bit-vector for auxiliary purposes.

unsigned mem_used() const

void set(bm::id_t n, bool val=true)

unsigned test(bm::id_t n) const

Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise.

bvmini(const bvmini &mset)

bm::word_t m_buf[((N/32)+((N % 32) &&1))]

Template class implements memory saving set functionality.

void init_bitbuf(bm::word_t *buf)

void set(bm::id_t n, bool val=true)

unsigned mem_used() const

void init_gapbuf(bm::word_t *buf)

bm::word_t * m_buf

Buffer pointer.

miniset(const miniset &mset)

unsigned m_type

buffer type (0-bit, 1-gap)

unsigned test(bm::id_t n) const

Checks if bit pos 1 or 0. Returns 0 if 0 and non zero otherwise.

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

Tests if bit = pos is true.

void gap_convert_to_bitset(unsigned *dest, const T *buf, unsigned len=0) noexcept

GAP block to bitblock conversion.

unsigned gap_set_value(unsigned val, T *buf, unsigned pos) noexcept

Sets or clears bit in the GAP buffer.

void gap_set_all(T *buf, unsigned set_max, unsigned value) noexcept

Sets all bits to 0 or 1 (GAP)

const unsigned set_word_shift

unsigned long long int id64_t

unsigned short gap_word_t

const unsigned gap_max_bits

const unsigned set_word_mask

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

const GenericPointer< typename T::ValueType > T2 value


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