NVBIO
|
A shallow Wavelet Tree class, holding iterators to a bit-string representing the different bit-planes of the output Wavelet Tree, and the tree structure itself, a binary heap, recording the sequence split of each node.
BitStreamIterator | the output bit-string type: must possess an iterator interface, and define a valid implementation of nvbio::assign(); iterator_system<BitStreamIterator>::type is used to determine whether to apply host or device algorithms |
IndexIterator | an iterator to an integer array representing the sequence splits of the Wavelet Tree's nodes, encoded as a full binary heap; the array must contain at least (2^SYMBOL_SIZE) - 1 entries |
SymbolType | the unsigned integer type used to encode symbols (e.g. uint8, uint16, uint32...) |
Definition at line 77 of file wavelet_tree.h.
#include <wavelet_tree.h>
Public Types | |
typedef iterator_system < BitStreamIterator >::type | system_tag |
typedef stream_traits < BitStreamIterator > ::index_type | index_type |
typedef SymbolType | symbol_type |
typedef SymbolType | value_type |
typedef BitStreamIterator | bit_iterator |
typedef IndexIterator | index_iterator |
typedef WaveletTree < BitStreamIterator, IndexIterator > | text_type |
typedef vector_type < index_type, 2 >::type | range_type |
typedef null_type | vector_type |
Public Members | |
uint32 | m_symbol_size |
index_type | m_size |
BitStreamIterator | m_bits |
IndexIterator | m_nodes |
IndexIterator | m_occ |
Related Functions | |
(Note that these are not member functions.) | |
template<typename BitStreamIterator , typename IndexIterator , typename IndexType , typename SymbolType > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE SymbolType | text (const WaveletTree< BitStreamIterator, IndexIterator, SymbolType > &tree, const IndexType i) |
template<typename BitStreamIterator , typename IndexIterator , typename SymbolType > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE WaveletTree < BitStreamIterator, IndexIterator, SymbolType > ::index_type | rank (const WaveletTree< BitStreamIterator, IndexIterator, SymbolType > &tree, const typename WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::index_type i, const uint32 c) |
template<typename BitStreamIterator , typename IndexIterator , typename SymbolType > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE WaveletTree < BitStreamIterator, IndexIterator, SymbolType > ::range_type | rank (const WaveletTree< BitStreamIterator, IndexIterator, SymbolType > &tree, const typename WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::range_type range, const uint32 c) |
typedef BitStreamIterator nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::bit_iterator |
Definition at line 84 of file wavelet_tree.h.
typedef IndexIterator nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::index_iterator |
Definition at line 85 of file wavelet_tree.h.
typedef stream_traits<BitStreamIterator>::index_type nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::index_type |
Definition at line 81 of file wavelet_tree.h.
typedef vector_type<index_type,2>::type nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::range_type |
Definition at line 88 of file wavelet_tree.h.
typedef SymbolType nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::symbol_type |
Definition at line 82 of file wavelet_tree.h.
typedef iterator_system<BitStreamIterator>::type nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::system_tag |
Definition at line 80 of file wavelet_tree.h.
typedef WaveletTree<BitStreamIterator,IndexIterator> nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::text_type |
Definition at line 86 of file wavelet_tree.h.
typedef SymbolType nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::value_type |
Definition at line 83 of file wavelet_tree.h.
typedef null_type nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::vector_type |
Definition at line 89 of file wavelet_tree.h.
|
inline |
constructor
Definition at line 94 of file wavelet_tree.h.
|
inline |
return the bit string
Definition at line 133 of file wavelet_tree.h.
|
inline |
return the occurrences
Definition at line 143 of file wavelet_tree.h.
|
inline |
return the i-th symbol - unary functor form
Definition at line 158 of file wavelet_tree.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE SymbolType nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::operator[] | ( | const index_type | i) | const |
return the i-th symbol
Definition at line 334 of file wavelet_tree_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::index_type nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::rank | ( | const uint32 | l, |
const uint32 | node, | ||
const index_type | node_begin, | ||
const index_type | r, | ||
const uint8 | b | ||
) | const |
return the number of bits set to b in the range [0,r] within node n at level l
Definition at line 344 of file wavelet_tree_inl.h.
|
inline |
resize the tree
Definition at line 109 of file wavelet_tree.h.
|
inline |
return the number of symbols
Definition at line 128 of file wavelet_tree.h.
|
inline |
return the node splits
Definition at line 138 of file wavelet_tree.h.
|
inline |
return the number of bits per symbol
Definition at line 118 of file wavelet_tree.h.
|
inline |
return the number of bits per symbol
Definition at line 123 of file wavelet_tree.h.
|
inline |
Definition at line 160 of file wavelet_tree.h.
|
inline |
Definition at line 161 of file wavelet_tree.h.
BitStreamIterator nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::m_bits |
Definition at line 165 of file wavelet_tree.h.
IndexIterator nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::m_nodes |
Definition at line 166 of file wavelet_tree.h.
IndexIterator nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::m_occ |
Definition at line 167 of file wavelet_tree.h.
index_type nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::m_size |
Definition at line 164 of file wavelet_tree.h.
uint32 nvbio::WaveletTree< BitStreamIterator, IndexIterator, SymbolType >::m_symbol_size |
Definition at line 163 of file wavelet_tree.h.