NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Methods | Public Members | Static Public Members | List of all members
nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T > Struct Template Reference

Detailed description

template< uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
struct nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >

A suffix trie node

Template Parameters
ALPHABET_SIZE_Tthe size of the alphabet, in symbols
TYPE_Ta suffix trie can be stored either with an uncompressed layout, where each inner node reseves storage for |alphabet| children and some of them are marked as invalid, or with a compressed one, where only storage for the active children is actually reserved; the latter type requires just a little more logic during traversal, as a popcount is necessary to select the child corresponding to the i-th character.

Definition at line 77 of file suffix_trie.h.

#include <suffix_trie.h>

Public Methods

NVBIO_FORCEINLINE NVBIO_HOST_DEVICE TrieNode ()
 
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE TrieNode (const uint32 _child, const uint32 _mask)
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE bool 
is_leaf () const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE uint32 
child () const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE uint32 
child (const uint32 c) const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE uint32 
nth_child (const uint32 c) const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE uint32 
first_child () const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE uint32 
mask () const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE void 
set_child_bit (const uint32 c)
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE uint32 
child_bit (const uint32 c) const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE void 
set_size (const uint32 size)
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE uint32 
size () const
 

Public Members

uint32 m_child
 
uint32 m_mask
 
uint32 m_size
 

Static Public Members

static const uint32 ALPHABET_SIZE = ALPHABET_SIZE_T
 
static const uint32 invalid_node = uint32(-1)
 
static const TrieType trie_type = TYPE_T
 

Constructor & Destructor Documentation

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::TrieNode ( )

Definition at line 37 of file suffix_trie_inl.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::TrieNode ( const uint32  _child,
const uint32  _mask 
)

Definition at line 41 of file suffix_trie_inl.h.

Member Function Documentation

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::child ( ) const

Definition at line 53 of file suffix_trie_inl.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::child ( const uint32  c) const

Definition at line 57 of file suffix_trie_inl.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::child_bit ( const uint32  c) const

Definition at line 95 of file suffix_trie_inl.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::first_child ( ) const

Definition at line 77 of file suffix_trie_inl.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::is_leaf ( ) const

Definition at line 49 of file suffix_trie_inl.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::mask ( ) const

Definition at line 87 of file suffix_trie_inl.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::nth_child ( const uint32  c) const

Definition at line 67 of file suffix_trie_inl.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE void nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::set_child_bit ( const uint32  c)

Definition at line 91 of file suffix_trie_inl.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE void nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::set_size ( const uint32  size)

Definition at line 99 of file suffix_trie_inl.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::size ( void  ) const

Definition at line 103 of file suffix_trie_inl.h.

Member Data Documentation

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
const uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::ALPHABET_SIZE = ALPHABET_SIZE_T
static

Definition at line 79 of file suffix_trie.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
const uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::invalid_node = uint32(-1)
static

Definition at line 81 of file suffix_trie.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::m_child

Definition at line 119 of file suffix_trie.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::m_mask

Definition at line 120 of file suffix_trie.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
uint32 nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::m_size

Definition at line 121 of file suffix_trie.h.

template<uint32 ALPHABET_SIZE_T, TrieType TYPE_T>
const TrieType nvbio::TrieNode< ALPHABET_SIZE_T, TYPE_T >::trie_type = TYPE_T
static

Definition at line 82 of file suffix_trie.h.


The documentation for this struct was generated from the following files: