dlvhex  2.5.0
vs10/bm/bmdbg.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <cassert>
#include <memory.h>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <time.h>
#include "bmdef.h"
#include "bmundef.h"
Include dependency graph for bmdbg.h:

Go to the source code of this file.

Functions

void PrintGap (const bm::gap_word_t *gap_buf)
void PrintDGap (const bm::gap_word_t *gap_buf, unsigned gap_len=0)
unsigned int iLog2 (unsigned int value)
unsigned PrintGammaCode (unsigned value)
void PrintDGapGamma (const bm::gap_word_t *gap_buf, unsigned gap_len=0)
template<class TBV >
void LoadBVector (const char *fname, TBV &bvector, unsigned *file_size=0)
template<class TBV >
void SaveBVector (const char *fname, const TBV &bvector)
void SaveBlob (const char *name_prefix, unsigned num, const char *ext, const unsigned char *blob, unsigned blob_size)
template<typename V >
void PrintBinary (V val)
void PrintBits32 (unsigned val)
void PrintDistanceMatrix (const unsigned distance[bm::set_block_plain_cnt][bm::set_block_plain_cnt])
template<typename TM >
void PrintTMatrix (const TM &tmatrix, unsigned cols=0, bool binary=false)
unsigned BinStrLR (const char *str)
 Binary code string converted to number Bits are expected left to right.
template<class BV >
void print_blocks_count (const BV &bv)
void print_bc (unsigned i, unsigned count)
template<class BV >
void print_stat (const BV &bv, unsigned blocks=0)

Function Documentation

unsigned BinStrLR ( const char *  str) [inline]

Binary code string converted to number Bits are expected left to right.

Definition at line 268 of file bmdbg.h.

unsigned int iLog2 ( unsigned int  value) [inline]

Definition at line 84 of file bmdbg.h.

Referenced by PrintGammaCode().

template<class TBV >
void LoadBVector ( const char *  fname,
TBV &  bvector,
unsigned *  file_size = 0 
)

Definition at line 140 of file bmdbg.h.

References bm::deserialize().

void print_bc ( unsigned  i,
unsigned  count 
) [inline]

Definition at line 321 of file bmdbg.h.

Referenced by print_bc().

template<class BV >
void print_blocks_count ( const BV &  bv)

Definition at line 293 of file bmdbg.h.

template<class BV >
void print_stat ( const BV &  bv,
unsigned  blocks = 0 
)
template<typename V >
void PrintBinary ( val)

Definition at line 209 of file bmdbg.h.

Referenced by PrintBits32(), and PrintTMatrix().

void PrintBits32 ( unsigned  val) [inline]

Definition at line 220 of file bmdbg.h.

References PrintBinary().

void PrintDGap ( const bm::gap_word_t gap_buf,
unsigned  gap_len = 0 
) [inline]

Definition at line 69 of file bmdbg.h.

void PrintDGapGamma ( const bm::gap_word_t gap_buf,
unsigned  gap_len = 0 
) [inline]

Definition at line 118 of file bmdbg.h.

References PrintGammaCode().

void PrintDistanceMatrix ( const unsigned  distance[bm::set_block_plain_cnt][bm::set_block_plain_cnt])

Definition at line 225 of file bmdbg.h.

References bm::set_block_plain_cnt.

unsigned PrintGammaCode ( unsigned  value) [inline]

Definition at line 92 of file bmdbg.h.

References iLog2().

Referenced by PrintDGapGamma().

void PrintGap ( const bm::gap_word_t gap_buf) [inline]

Definition at line 56 of file bmdbg.h.

template<typename TM >
void PrintTMatrix ( const TM &  tmatrix,
unsigned  cols = 0,
bool  binary = false 
)

Definition at line 241 of file bmdbg.h.

References PrintBinary().

void SaveBlob ( const char *  name_prefix,
unsigned  num,
const char *  ext,
const unsigned char *  blob,
unsigned  blob_size 
) [inline]

Definition at line 192 of file bmdbg.h.

template<class TBV >
void SaveBVector ( const char *  fname,
const TBV &  bvector 
)

Definition at line 170 of file bmdbg.h.

References bm::serialize().