libwordring
公開型 | 限定公開型 | 限定公開メンバ関数 | 限定公開変数類 | 静的限定公開変数類 | 全メンバ一覧
wordring::detail::const_trie_heap_iterator< Container > クラステンプレート
wordring::detail::const_trie_heap_iterator< Container > の継承関係図
wordring::detail::const_stable_trie_base_iterator< Container > wordring::detail::const_trie_base_iterator< Container >

公開型

using difference_type = std::ptrdiff_t
 
using value_type = std::uint8_t
 
using pointer = value_type *
 
using reference = value_type &
 
using iterator_category = std::input_iterator_tag
 

限定公開型

using index_type = typename trie_node::index_type
 
using node_type = trie_node
 
using container = Container const
 

限定公開メンバ関数

 const_trie_heap_iterator (container &c, index_type index)
 
value_type value () const
 
index_type at_index (value_type label) const
 
void advance ()
 
index_type parent_index () const
 
index_type begin_index () const
 
index_type end_index () const
 
index_type find (index_type first, index_type last, index_type check) const
 
index_type mother () const
 
index_type base () const
 
index_type limit () const
 
bool has_null () const
 
bool has_sibling () const
 

限定公開変数類

container * m_c
 
index_type m_index
 

静的限定公開変数類

static constexpr std::uint16_t null_value = 256
 

関数詳解

◆ value()

template<typename Container >
value_type wordring::detail::const_trie_heap_iterator< Container >::value ( ) const
inlineprotected

イテレータが指す値を返す

◆ at_index()

template<typename Container >
index_type wordring::detail::const_trie_heap_iterator< Container >::at_index ( value_type  label) const
inlineprotected

labelで遷移する先のINDEXを返す

◆ advance()

template<typename Container >
void wordring::detail::const_trie_heap_iterator< Container >::advance ( )
inlineprotected

イテレータを前進させる

◆ parent_index()

template<typename Container >
index_type wordring::detail::const_trie_heap_iterator< Container >::parent_index ( ) const
inlineprotected

親のINDEXを返す

  • 根で呼び出した場合、0を返す。

◆ begin_index()

template<typename Container >
index_type wordring::detail::const_trie_heap_iterator< Container >::begin_index ( ) const
inlineprotected

0-255に相当する文字で遷移できる最初の子を指すINDEXを返す

  • 空遷移は含めない。
  • 遷移先(子)が無い場合、0を返す。

◆ find()

template<typename Container >
index_type wordring::detail::const_trie_heap_iterator< Container >::find ( index_type  first,
index_type  last,
index_type  check 
) const
inlineprotected

引数firstからlastの範囲で、m_checkが引数checkと一致する状態番号を返す

  • 見つからない場合、0を返す。
  • 状態番号は1から始まるので0と衝突しない。
  • 引数lastがコンテナの大きさを超える場合、そこで検索を終了する。

◆ mother()

template<typename Container >
index_type wordring::detail::const_trie_heap_iterator< Container >::mother ( ) const
inlineprotected

親の状態番号を返す

◆ base()

template<typename Container >
index_type wordring::detail::const_trie_heap_iterator< Container >::base ( ) const
inlineprotected

親のBASEを返す

  • つまりコレはm_indexからラベルを差し引いた値にに相当する。

◆ limit()

template<typename Container >
index_type wordring::detail::const_trie_heap_iterator< Container >::limit ( ) const
inlineprotected

コンテナの最終状態番号の次を返す

  • キャストで行が増えるのを抑制するために用意した。

◆ has_null()

template<typename Container >
bool wordring::detail::const_trie_heap_iterator< Container >::has_null ( ) const
inlineprotected

空遷移がある場合trueを返す

◆ has_sibling()

template<typename Container >
bool wordring::detail::const_trie_heap_iterator< Container >::has_sibling ( ) const
inlineprotected

兄弟にあたる状態がある場合、trueを返す


このクラス詳解は次のファイルから抽出されました: