libwordring
名前空間 | クラス | 型定義 | 関数
wordring 名前空間

名前空間

 css
 
 detail
 
 html
 
 whatwg
 
 wwwc
 

クラス

class  basic_atom_set
 文字列アトムのコンテナ [詳解]
 
class  basic_tree_iterator
 プレ・オーダーあるいはレベル・オーダーで木を走査するイテレータ・アダプター [詳解]
 
class  basic_trie
 任意の整数型をラベルとして用いることが出来る汎用Trie [詳解]
 
class  deserialize_iterator
 バイト列に対するイテレータを任意型の整数を返すイテレータへ変換する [詳解]
 
class  serialize_iterator
 任意型の整数列に対するイテレータをバイトを返すイテレータへ変換する [詳解]
 
class  static_vector
 最大長固定の静的vector [詳解]
 
class  string_matcher
 プッシュ型文字列マッチャー [詳解]
 
class  tag_tree
 HTML/XML 用の木 [詳解]
 
class  tree
 木コンテナ [詳解]
 

型定義

using encoding_name = wordring::whatwg::encoding::encoding_name
 
template<typename Allocator = std::allocator<detail::trie_node>>
using u8atom_set = basic_atom_set< std::u8string, Allocator >
 
template<typename Allocator = std::allocator<detail::trie_node>>
using u16atom_set = basic_atom_set< std::u16string, Allocator >
 
template<typename Allocator = std::allocator<detail::trie_node>>
using u32atom_set = basic_atom_set< std::u32string, Allocator >
 
template<typename Iterator , typename Allocator = std::allocator<Iterator>>
using tree_iterator = basic_tree_iterator< Iterator, detail::tree_iterator_stack< Iterator, Allocator >, Allocator >
 
template<typename Iterator , typename Allocator = std::allocator<Iterator>>
using level_order_tree_iterator = basic_tree_iterator< Iterator, detail::tree_iterator_queue< Iterator, Allocator >, Allocator >
 
template<typename Label , typename Allocator = std::allocator<detail::trie_node>>
using trie = basic_trie< Label, detail::trie_base< Allocator > >
 メモリー使用量削減を目標とする汎用Trie [詳解]
 
template<typename Label , typename Allocator = std::allocator<detail::trie_node>>
using stable_trie = basic_trie< Label, detail::stable_trie_base< Allocator > >
 葉からの空遷移先INDEXが衝突によって変更されない汎用Trie [詳解]
 

関数

template<typename Value , typename OutputIterator , typename std::enable_if_t< is_output_iterator_v< OutputIterator >, nullptr_t > = nullptr>
void push_back_ (Value value, OutputIterator &output)
 
template<typename Value , typename Container , typename std::enable_if_t< std::is_object_v< typename Container::value_type >, nullptr_t > = nullptr>
void push_back_ (Value value, Container &output)
 
template<typename Container1 , typename Container2 , typename std::enable_if_t< std::conjunction_v< is_container< Container1 >, is_container< Container2 >>, nullptr_t > = nullptr>
bool equal_ (Container1 const &container_1, Container2 const &container_2)
 
template<typename T , typename std::enable_if_t< std::is_integral_v< T >, std::nullptr_t > = nullptr>
auto serialize (T number)
 
template<typename T , typename std::enable_if_t< std::is_integral_v< T >, std::nullptr_t > = nullptr>
uint8_t serialize (T number, uint32_t position)
 
template<typename InputIterator , typename T >
auto deserialize (InputIterator first, InputIterator last, T &result)
 
template<typename InputIterator1 >
bool operator== (serialize_iterator< InputIterator1 > const &lhs, serialize_iterator< InputIterator1 > const &rhs)
 
template<typename InputIterator1 >
bool operator!= (serialize_iterator< InputIterator1 > const &lhs, serialize_iterator< InputIterator1 > const &rhs)
 
template<typename Value1 , typename ForwardIterator1 >
bool operator== (deserialize_iterator< Value1, ForwardIterator1 > const &lhs, deserialize_iterator< Value1, ForwardIterator1 > const &rhs)
 
template<typename Value1 , typename ForwardIterator1 >
bool operator!= (deserialize_iterator< Value1, ForwardIterator1 > const &lhs, deserialize_iterator< Value1, ForwardIterator1 > const &rhs)
 
template<typename T1 , std::size_t N1>
bool operator== (static_vector< T1, N1 > const &lhs, static_vector< T1, N1 > const &rhs)
 
template<typename T1 , std::size_t N1>
bool operator!= (static_vector< T1, N1 > const &lhs, static_vector< T1, N1 > const &rhs)
 
template<typename T1 , std::size_t N1>
bool operator< (static_vector< T1, N1 > const &lhs, static_vector< T1, N1 > const &rhs)
 
template<typename T1 , std::size_t N1>
bool operator<= (static_vector< T1, N1 > const &lhs, static_vector< T1, N1 > const &rhs)
 
template<typename T1 , std::size_t N1>
bool operator> (static_vector< T1, N1 > const &lhs, static_vector< T1, N1 > const &rhs)
 
template<typename T1 , std::size_t N1>
bool operator>= (static_vector< T1, N1 > const &lhs, static_vector< T1, N1 > const &rhs)
 
template<typename Iterator1 , typename Container1 , typename Allocator1 >
bool operator== (basic_tree_iterator< Iterator1, Container1, Allocator1 > const &lhs, basic_tree_iterator< Iterator1, Container1, Allocator1 > const &rhs)
 
template<typename Iterator1 , typename Container1 , typename Allocator1 >
bool operator!= (basic_tree_iterator< Iterator1, Container1, Allocator1 > const &lhs, basic_tree_iterator< Iterator1, Container1, Allocator1 > const &rhs)
 
template<typename Label1 , typename Base1 >
std::ostream & operator<< (std::ostream &os, basic_trie< Label1, Base1 > const &trie)
 ストリームへ出力する [詳解]
 
template<typename Label1 , typename Base1 >
std::istream & operator>> (std::istream &is, basic_trie< Label1, Base1 > &trie)
 ストリームから入力する [詳解]
 

詳解

公開の名前空間

型定義詳解

◆ trie

template<typename Label , typename Allocator = std::allocator<detail::trie_node>>
using wordring::trie = typedef basic_trie<Label, detail::trie_base<Allocator> >

メモリー使用量削減を目標とする汎用Trie

辞書を用途として想定する。

◆ stable_trie

template<typename Label , typename Allocator = std::allocator<detail::trie_node>>
using wordring::stable_trie = typedef basic_trie<Label, detail::stable_trie_base<Allocator> >

葉からの空遷移先INDEXが衝突によって変更されない汎用Trie

文字列ATOMを用途として想定する。 葉から空遷移した先のINDEXが挿入によって変更されないため、そのINDEXから文字列を復元できる。

関数詳解

◆ operator<<()

template<typename Label1 , typename Base1 >
std::ostream& wordring::operator<< ( std::ostream &  os,
basic_trie< Label1, Base1 > const &  trie 
)
inline

ストリームへ出力する

速度を必要とする場合、使用を推奨しない。

// Trie木を作成
std::vector<std::u32string> v{ U"あ", U"あう", U"い", U"うあい", U"うえ" };
auto t1 = trie<char32_t>(v.begin(), v.end());
// ストリームへ出力
std::stringstream ss;
ss << t1;
// ストリームから入力
trie<char32_t> t2;
ss >> t2;
// 検証
assert(t1.size() == t2.size());

◆ operator>>()

template<typename Label1 , typename Base1 >
std::istream& wordring::operator>> ( std::istream &  is,
basic_trie< Label1, Base1 > &  trie 
)
inline

ストリームから入力する

速度を必要とする場合、使用を推奨しない。