BitMagic-C++
Typedefs | Functions
rscsample01.cpp File Reference

Example: rsc_sparse_vector<> usage. More...

#include <iostream>
#include <vector>
#include "bmsparsevec.h"
#include "bmsparsevec_compr.h"
#include "bmsparsevec_serial.h"
Include dependency graph for rscsample01.cpp:

Go to the source code of this file.

Typedefs

typedef bm::sparse_vector< unsigned, bm::bvector<> > sparse_vector_u32
 
typedef bm::rsc_sparse_vector< unsigned, sparse_vector_u32rsc_sparse_vector_u32
 

Functions

template<class SV >
void print_svector (const SV &sv, bool show_nulls=false)
 
int main (void)
 

Detailed Description

Example: rsc_sparse_vector<> usage.

rsc_sparse_vector<> is a sparse vector which uses bit-transposition and rank-select succinct method of compression of NULL (unassigned) values. Unassigned values are dropped (as transposed columns) from the bit-matrix.

rsc_sparse_vector<> is basically a read-only structure, which can be used for compact data storage and search. Random access to elements is possible with a penalty of bit-vector Rank or Select operations.

Definition in file rscsample01.cpp.

Typedef Documentation

◆ rsc_sparse_vector_u32

Examples:
rscsample01.cpp.

Definition at line 52 of file rscsample01.cpp.

◆ sparse_vector_u32

Examples:
rscsample01.cpp.

Definition at line 51 of file rscsample01.cpp.

Function Documentation

◆ main()

int main ( void  )

◆ print_svector()

template<class SV >
void print_svector ( const SV &  sv,
bool  show_nulls = false 
)
Examples:
rscsample01.cpp, svsample04.cpp, and svsample05.cpp.

Definition at line 55 of file rscsample01.cpp.

Referenced by main().