|
BitMagic-C++
|
Example: sparse_vector<> container set values. More...
#include <iostream>#include <algorithm>#include "bm.h"#include "bmsparsevec.h"#include "bmundef.h"
Go to the source code of this file.
Typedefs | |
| typedef bm::sparse_vector< unsigned, bm::bvector<> > | sparse_vector_u32 |
| typedef bm::sparse_vector< int, bm::bvector<> > | sparse_vector_i32 |
Functions | |
| static void | Demo1 () |
| bm::sparse_vector for unsigned int data | |
| static void | Demo2 () |
| bm::sparse_vector can also support signed ints. | |
| int | main (void) |
Example: sparse_vector<> container set values.
Definition in file svsample01.cpp.
| typedef bm::sparse_vector<int, bm::bvector<> > sparse_vector_i32 |
Definition at line 47 of file svsample01.cpp.
| typedef bm::sparse_vector<unsigned, bm::bvector<> > sparse_vector_u32 |
Definition at line 46 of file svsample01.cpp.
|
static |
bm::sparse_vector for unsigned int data
Definition at line 53 of file svsample01.cpp.
References bm::sparse_vector< Val, BV >::at(), bm::sparse_vector< Val, BV >::begin(), BM_DECLARE_TEMP_BLOCK, bm::sparse_vector< Val, BV >::end(), bm::sparse_vector< Val, BV >::import(), bm::sparse_vector< Val, BV >::optimize(), and bm::sparse_vector< Val, BV >::size().
Referenced by main().
|
static |
bm::sparse_vector can also support signed ints.
The container transforms it from complementary code to more optimal representation so that
Definition at line 96 of file svsample01.cpp.
References bm::sparse_vector< Val, BV >::begin(), BM_DECLARE_TEMP_BLOCK, bm::sparse_vector< Val, BV >::end(), bm::sparse_vector< Val, BV >::import(), bm::sparse_vector< Val, BV >::optimize(), and bm::sparse_vector< Val, BV >::size().
Referenced by main().
| int main | ( | void | ) |
Definition at line 121 of file svsample01.cpp.