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

NCBI C++ ToolKit: include/gui/utils/data_frame.hpp Source File

1 #ifndef __GUI_DATA_FRAME_HPP_ 2 #define __GUI_DATA_FRAME_HPP_ 57 #ifndef __USE_BM_XOR_COMPRESSION__ 58 #define __USE_BM_XOR_COMPRESSION__ 85 template

<

unsigned

MAX_SIZE>

116

unique_ptr<TStrType>

Str

;

118

unique_ptr<TBitType>

Bit

;

122  new

(&Str) unique_ptr<TStrType>{move(p)};

126  new

(&Uint) unique_ptr<TUintType>{move(p)};

130  new

(&Bit) unique_ptr<TBitType>{move(p)};

152  return

Str->equal(*c.

Str

);

154  return

Uint->equal(*c.

Uint

);

156  return

Bit->equal(*c.

Bit

);

184

unique_ptr<Column> c;

187

unique_ptr<TStrType> v(

new TStrType

);

192

unique_ptr<TUintType> v(

new TUintType

);

197

unique_ptr<TBitType> v(

new TBitType

);

202

m_Columns.emplace_back(move(c));

213

m_Columns[col]->Str->set(

row

,

str

.c_str());

218  return

*m_Columns[idx]->Str;

223  return

*m_Columns[idx]->Uint;

228  return

*m_Columns[idx]->Bit;

233  return

*m_Columns[idx]->Str;

238  return

*m_Columns[idx]->Uint;

243  return

*m_Columns[idx]->Bit;

260  for

(

auto

& c : m_Columns) {

265

c->Str->optimize(TB);

268

c->Uint->optimize(TB);

271

c->Bit->optimize(TB);

300 #ifdef __USE_BM_XOR_COMPRESSION__ 305

vector<unsigned char>

buffer

;

307  for

(

auto

& c : m_Columns) {

312

c->Str->optimize(TB);

313

str_serializer.

serialize

(*c->Str, str_lay);

315  const unsigned char

*

buf

= str_lay.

data

();

318  if

(!os.write((

char

*)&

buf

[0], sz))

325

c->Uint->optimize(TB);

326

uint_serializer.

serialize

(*c->Uint, uint_lay);

328  const unsigned char

*

buf

= uint_lay.

data

();

331  if

(!os.write((

char

*)&

buf

[0], sz))

336

c->Bit->optimize(TB);

337

c->Bit->calc_stat(&bit_st);

342  if

(!os.write((

char

*)&

buffer

[0], sz))

352

rsc_serializer.

serialize

(offset_table, rsc_lay);

353  const unsigned char

*

buf

= rsc_lay.

data

();

354  if

(!os.write((

char

*)&

buf

[0], rsc_lay.

size

()))

359  if

(!os.write(

reinterpret_cast<const char

*

>

(&

offset

),

sizeof

(

offset

)))

389

offset_it.go_to(

offset

);

390  auto type

= offset_it.value();

391

unique_ptr<Column> c;

394

unique_ptr<TStrType> v(

new TStrType

);

401

unique_ptr<TUintType> v(

new TUintType

);

407

unique_ptr<TBitType> v(

new TBitType

);

413

m_Columns.emplace_back(move(c));

425  const auto

& cols =

df

.GetColumns();

426  if

(m_Columns.size() != cols.size())

428  for

(

size_t i

= 0;

i

< m_Columns.size(); ++

i

) {

429  if

(!m_Columns[

i

]->Equal(*cols[

i

]))

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

#define BM_DECLARE_TEMP_BLOCK(x)

Algorithms for bit ranges and intervals.

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

Compressed sparse container rsc_sparse_vector<> for integer types.

Serialization for sparse_vector<>

string sparse vector based on bit-transposed matrix

CDataFrame()

Default constructor.

vector< unique_ptr< Column > > TColumns

void CreateColumns(initializer_list< EDF_ColumnType > columns)

const TBitType & Bit(size_t idx) const noexcept

void Optimize(bool remap=false)

Optimize internal data after adding or updating new rows.

bool Equal(const CDataFrame &df) const

Dataframe comparsion for testing.

TBitType & Bit(size_t idx) noexcept

bool Serialize(ostream &os)

Serialization to ostream.

bm::sparse_vector< unsigned, bm::bvector<> > svector_u32

CDataFrame(initializer_list< EDF_ColumnType > columns)

Constructor with column initiazlization.

bm::rsc_sparse_vector< unsigned, svector_u32 > rsc_svector_u32

void SetString(size_t col, size_t row, const string &str) noexcept

Access to a column by type and index with no boundary checks.

const TStrType & String(size_t idx) const noexcept

bool Deserialize(const char *data, size_t data_size)

Deserialization from string starting from pos returns true on success.

const TUintType & Uint(size_t idx) const noexcept

bm::str_sparse_vector< char, bm::bvector<>, MAX_SIZE >::const_iterator TStrIterator

TUintType & Uint(size_t idx) noexcept

TStrType & String(size_t idx) noexcept

const TColumns & GetColumns() const noexcept

Access to all columns.

bm::str_sparse_vector< char, bm::bvector<>, MAX_SIZE > TStrType

Deserializer for bit-vector.

size_t deserialize(bvector_type &bv, const unsigned char *buf, bm::word_t *temp_block=0)

forward iterator class to traverse bit-vector as ranges

size_type start() const noexcept

Return interval start/left as bit-vector coordinate 011110 [left..right].

Rank-Select compressed sparse vector.

void set(size_type idx, value_type v)

set specified element with bounds checking and automatic resize

const bvector_type * get_null_bvector() const noexcept

Get bit-vector of assigned values (or NULL)

const_iterator get_const_iterator(size_type idx) const noexcept

Get const_itertor re-positioned to specific element.

Bit-vector serialization class.

void byte_order_serialization(bool value) noexcept

Set byte-order serialization (for cross platform compatibility)

void gap_length_serialization(bool value) noexcept

Set GAP length serialization (serializes GAP levels of the original vector)

size_type serialize(const BV &bv, unsigned char *buf, size_t buf_size)

Bitvector serialization into memory block.

sparse vector de-serializer

void deserialize(SV &sv, const unsigned char *buf, bool clear_sv=true)

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

void serialize(const SV &sv, sparse_vector_serial_layout< SV > &sv_layout)

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

void enable_xor_compression() noexcept

Enable XOR compression on vector serialization.

succinct sparse vector with runtime compression using bit-slicing / transposition method

succinct sparse vector for strings with compression using bit-slicing ( transposition) method

static const char * str(char *buf, int n)

static const column_t columns[]

@ use_null

support "non-assigned" or "NULL" logic

int sparse_vector_deserialize(SV &sv, const unsigned char *buf, bm::word_t *temp_block=0)

Deserialize sparse vector.

double df(double x_, const double &y_)

#define row(bind, expected)

Column provides access to the vector data via union of pointers to the specific data type Caller is r...

unique_ptr< TStrType > Str

unique_ptr< TUintType > Uint

Column(unique_ptr< TUintType > &p)

unique_ptr< TBitType > Bit

bool Equal(const Column &c) const

Column(unique_ptr< TStrType > &p)

Column(unique_ptr< TBitType > &p)

size_t max_serialize_mem

estimated maximum memory for serialization

Statistical information about bitset's memory allocation details.

layout class for serialization buffer structure

const unsigned char * data() const noexcept

Return serialization buffer pointer.

size_t size() const noexcept

return current serialized size


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