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.h第28行定义。

公有成员 | |
| 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.h第38行定义。
| ~CBitString | ( | ) |
destructor
在文件BitString.h第55行定义。
| void cleanup | ( | ) |
free up memory
在文件BitString.h第62行定义。
| void create | ( | uint64_t | len | ) |
| uint64_t get_length | ( | ) | const |
在文件BitString.h第317行定义。
| virtual const char* get_name | ( | ) | const [virtual] |
| 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 |
在文件BitString.h第111行定义。
| 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.h第74行定义。
| uint64_t operator[] | ( | uint64_t | index | ) | const |
| void set_binary_word | ( | uint16_t | word, | |
| uint64_t | index | |||
| ) |
| 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.h第198行定义。