CBitString类参考


详细描述

a string class embedding a string in a compact bit representation

especially useful to compactly represent genomic DNA

(or any other string of small alphabet size)

在文件BitString.h28行定义。

继承图,类CBitString
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CBitString (EAlphabet alpha, int32_t width=1)
 ~CBitString ()
void cleanup ()
void obtain_from_char (char *str, uint64_t len)
void load_fasta_file (const char *fname, bool ignore_invalid=false)
void set_string (uint64_t *str, uint64_t len)
void create (uint64_t len)
uint64_t operator[] (uint64_t index) const
void set_binary_word (uint16_t word, uint64_t index)
uint64_t get_length () const
virtual const char * get_name () const

构造及析构函数文档

CBitString ( EAlphabet  alpha,
int32_t  width = 1 
)

default constructor

creates an empty Bitstring

参数:
alpha Alphabet
width return this many bits upon str[idx] access operations

在文件BitString.h38行定义。

~CBitString (  ) 

destructor

在文件BitString.h55行定义。


成员函数文档

void cleanup (  ) 

free up memory

在文件BitString.h62行定义。

void create ( uint64_t  len  ) 

creates string of all zeros of len bits

参数:
len length of string in bits

在文件BitString.h209行定义。

uint64_t get_length (  )  const
返回:
length of the string in bits

在文件BitString.h317行定义。

virtual const char* get_name (  )  const [virtual]
返回:
object name

实现了CSGObject

在文件BitString.h320行定义。

void load_fasta_file ( const char *  fname,
bool  ignore_invalid = false 
)

load fasta file as bit string

参数:
fname filename to load from
ignore_invalid if set to true, characters other than A,C,G,T are converted to A
返回:
if loading was successful

在文件BitString.h111行定义。

void obtain_from_char ( char *  str,
uint64_t  len 
)

convert string of length len into bit sequence

参数:
str string
len length of string in bits

在文件BitString.h74行定义。

uint64_t operator[] ( uint64_t  index  )  const

access array by [] operator

参数:
index index into array

在文件BitString.h251行定义。

void set_binary_word ( uint16_t  word,
uint64_t  index 
)

set a binary word

参数:
word 16 bit word to be set
index word based index

在文件BitString.h277行定义。

void set_string ( uint64_t *  str,
uint64_t  len 
)

set string of length len embedded in a uint64_t sequence

参数:
str string
len length of string in bits

在文件BitString.h198行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation