NCBI C++ ToolKit
Classes | Functions
Sparse vector serialization

Sparse vector serialization. More...

+ Collaboration diagram for Sparse vector serialization:

Classes

struct  bm::sparse_vector_serial_layout< SV >
 layout class for serialization buffer structure More...
 
class  bm::sparse_vector_serializer< SV >
 Serialize sparse vector into a memory buffer(s) structure. More...
 

Functions

template<class SV >
void bm::sparse_vector_serialize (const SV &sv, sparse_vector_serial_layout< SV > &sv_layout, bm::word_t *temp_block=0)
 Serialize sparse vector into a memory buffer(s) structure. More...
 
template<class SV >
int bm::sparse_vector_deserialize (SV &sv, const unsigned char *buf, bm::word_t *temp_block=0)
 Deserialize sparse vector. More...
 

Detailed Description

Sparse vector serialization.

Function Documentation

◆ sparse_vector_deserialize()

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

Deserialize sparse vector.

Parameters
sv- target sparse vector
buf- source memory buffer
temp_block- temporary block buffer to avoid re-allocations
Returns
0 (error processing via std::logic_error)
See also
sparse_vector_deserializer

Definition at line 551 of file bmsparsevec_serial.h.

References buf, and bm::sparse_vector_deserializer< SV >::deserialize().

Referenced by CompareSparseVector(), CDataFrame< MAX_SIZE >::Deserialize(), DetailedCompareSparseVectors(), bm::file_load_svector(), s_ReadData(), StressTestStrSparseVector(), TestEqualSparseVectors(), TestSparseVector(), TestStrSparseVector(), CSparseGraph::x_ReadData(), and CWigGraph::x_ReadSummary().

◆ sparse_vector_serialize()

template<class SV >
void bm::sparse_vector_serialize ( const SV &  sv,
sparse_vector_serial_layout< SV > &  sv_layout,
bm::word_t temp_block = 0 
)

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

Parameters
sv- sparse vector to serialize
sv_layout- buffer structure to keep the result
temp_block- temporary buffer (allocate with BM_DECLARE_TEMP_BLOCK(x) for speed)
See also
serialization_flags
sparse_vector_deserializer

Definition at line 526 of file bmsparsevec_serial.h.

References bm::sparse_vector_serializer< SV >::serialize().

Referenced by CTestBMApp::Run(), TestEqualSparseVectors(), TestSparseVector(), CBedCoverageGraph::x_SaveData(), CWigGraph::x_SaveSummary(), and CSparseGraph::x_WriteData().

Modified on Sun May 19 04:47:51 2024 by modify_doxy.py rev. 669887