BitMagic-C++
Data Structures | Typedefs | Enumerations | Functions
xsample08.cpp File Reference
#include <iostream>
#include <utility>
#include <vector>
#include <memory>
#include <cassert>
#include "bm.h"
#include "bmintervals.h"
#include "bmsparsevec_compr.h"
#include "bmundef.h"
Include dependency graph for xsample08.cpp:

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_u8rsc_vector_u8
 
typedef std::vector< std::unique_ptr< rsc_vector_u8 > > starnds_vector_type
 

Enumerations

enum  Strand { positive =0 , negative =1 , unknown =2 }
 

Functions

static void set_feature_strand (data_model &dm, size_t plane, bm::bvector<>::size_type pos, unsigned char strand)
  More...
 
static void add_object (data_model &dm, unsigned start, unsigned end, unsigned char strand)
 Register new object in the data model: [start..end] + strand. More...
 
static 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. More...
 
static void print_model (const data_model &dm)
 This is ASCII art "renderer" for the data model. More...
 
int main (void)
  More...
 

Enumeration Type Documentation

◆ Strand

enum Strand
Enumerator
positive 
negative 
unknown 

Definition at line 324 of file xsample08.cpp.

Function Documentation

◆ add_object()

static void add_object ( data_model dm,
unsigned  start,
unsigned  end,
unsigned char  strand 
)
static

Register new object in the data model: [start..end] + strand.

Examples
xsample08.cpp.

Definition at line 169 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().

◆ main()

int main ( void  )

◆ print_model()

static void print_model ( const data_model dm)
static

This is ASCII art "renderer" for the data model.

illustrates how to manipulate succinct data model to create graphics

Examples
xsample08.cpp.

Definition at line 269 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().

◆ set_feature_strand()

static void set_feature_strand ( data_model dm,
size_t  plane,
bm::bvector<>::size_type  pos,
unsigned char  strand 
)
static

◆ splice_model()

static void splice_model ( data_model dm_target,
const data_model dm,
bm::bvector<>::size_type  start,
bm::bvector<>::size_type  end,
bool  copy_strands 
)
static