BitMagic-C++
|
#include <iostream>
#include <utility>
#include <vector>
#include <memory>
#include <cassert>
#include "bm.h"
#include "bmintervals.h"
#include "bmsparsevec_compr.h"
Go to the source code of this file.
Data Structures | |
struct | data_model |
Data frame object, sued to buid succinct data model. More... | |
Typedefs | |
typedef bm::interval_enumerator< bm::bvector<> > | interval_enumerator_type |
typedef std::vector< std::unique_ptr< bm::bvector<> > > | layout_vector_type |
typedef bm::sparse_vector< unsigned char, bm::bvector<> > | sparse_vector_u8 |
typedef bm::rsc_sparse_vector< unsigned char, sparse_vector_u8 > | rsc_vector_u8 |
typedef std::vector< std::unique_ptr< rsc_vector_u8 > > | starnds_vector_type |
Enumerations | |
enum | Strand { positive =0 , negative =1 , unknown =2 } |
Functions | |
void | set_feature_strand (data_model &dm, size_t plane, bm::bvector<>::size_type pos, unsigned char strand) |
void | add_object (data_model &dm, unsigned start, unsigned end, unsigned char strand) |
Register new object in the data model: [start..end] + strand. | |
void | splice_model (data_model &dm_target, const data_model &dm, bm::bvector<>::size_type start, bm::bvector<>::size_type end, bool copy_strands) |
Data model splicer. | |
void | print_model (const data_model &dm) |
This is ASCII art "renderer" for the data model. | |
int | main (void) |
Definition at line 63 of file xsample08.cpp.
typedef std::vector<std::unique_ptr<bm::bvector<> > > layout_vector_type |
Definition at line 64 of file xsample08.cpp.
typedef bm::rsc_sparse_vector<unsigned char, sparse_vector_u8> rsc_vector_u8 |
Definition at line 67 of file xsample08.cpp.
typedef bm::sparse_vector<unsigned char, bm::bvector<> > sparse_vector_u8 |
Definition at line 66 of file xsample08.cpp.
typedef std::vector<std::unique_ptr<rsc_vector_u8> > starnds_vector_type |
Definition at line 68 of file xsample08.cpp.
enum Strand |
Enumerator | |
---|---|
positive | |
negative | |
unknown |
Definition at line 320 of file xsample08.cpp.
void add_object | ( | data_model & | dm, |
unsigned | start, | ||
unsigned | end, | ||
unsigned char | strand | ||
) |
Register new object in the data model: [start..end] + strand.
Definition at line 166 of file xsample08.cpp.
References bm::bvector< Alloc >::any_range(), bm::BM_GAP, data_model::layout_v, set_feature_strand(), and bm::bvector< Alloc >::set_range().
Referenced by main().
int main | ( | void | ) |
Definition at line 324 of file xsample08.cpp.
References add_object(), negative, data_model::optimize(), positive, print_model(), splice_model(), and unknown.
void print_model | ( | const data_model & | dm | ) |
This is ASCII art "renderer" for the data model.
illustrates how to manipulate succinct data model to create graphics
Definition at line 265 of file xsample08.cpp.
References bm::interval_enumerator< BV >::advance(), bm::interval_enumerator< BV >::end(), bm::rsc_sparse_vector< Val, SV >::get(), data_model::layout_v, bm::interval_enumerator< BV >::start(), data_model::strand_v, and bm::interval_enumerator< BV >::valid().
Referenced by main().
void set_feature_strand | ( | data_model & | dm, |
size_t | plane, | ||
bm::bvector<>::size_type | pos, | ||
unsigned char | strand | ||
) |
Definition at line 142 of file xsample08.cpp.
References bm::rsc_sparse_vector< Val, SV >::is_null(), bm::rsc_sparse_vector< Val, SV >::set(), and data_model::strand_v.
Referenced by add_object().
void splice_model | ( | data_model & | dm_target, |
const data_model & | dm, | ||
bm::bvector<>::size_type | start, | ||
bm::bvector<>::size_type | end, | ||
bool | copy_strands | ||
) |
Data model splicer.
Definition at line 208 of file xsample08.cpp.
References data_model::add_layout(), data_model::add_strand(), bm::BM_GAP, bm::find_interval_end(), bm::find_interval_start(), data_model::layout_v, and data_model::strand_v.
Referenced by main().