This class builds a double-array trie from records sorted in dictionary order of keys.
| key_tmpl | A type that represents a record key. This type must be either char* or std::string . | |
| value_tmpl | A type that represents a record value. | |
| doublearray_traits | A class in which various properties of double-array elements are described. |
Public Types | |
| typedef key_tmpl | key_type |
| A type that represents a record. | |
| typedef value_tmpl | value_type |
| A type that represents a record value. | |
| typedef doublearray_traits::element_type | element_type |
| A type that represents an element of a double array. | |
| typedef doublearray_traits::base_type | base_type |
| A type that represents a base value in a double array. | |
| typedef doublearray_traits::check_type | check_type |
| A type that represents a check value in a double array. | |
| typedef std::vector< element_type > | doublearray_type |
| A type that implements a double array. | |
| typedef doublearray_type::size_type | size_type |
| A type of sizes. | |
| typedef void(*) | callback_type (void *instance, size_type i, size_type n) |
| The type of a progress callback function. | |
Public Member Functions | |
| builder () | |
| Constructs a builder. | |
| virtual | ~builder () |
| Destructs the builder. | |
| void | set_callback (void *instance, callback_type callback) |
| Sets a progress callback. | |
| void | build (const record_type *first, const record_type *last) |
| Builds a double-array trie from sorted records. | |
| void | clear () |
| Initializes the double array. | |
| const doublearray_type & | doublearray () const |
| Obtains a read-only access to the double-array. | |
| const otail & | tail () const |
| Obtains a read-only access to the tail array. | |
| const uint8_t * | table () const |
| Obtains a read-only access to the character table. | |
| void | write (std::ostream &os) |
| Writes out the double-array trie to an output stream. | |
Data Structures | |
| class | exception |
| Exception class. More... | |
| struct | record_type |
| A type that represents a record (a pair of key and value). More... | |
| struct | stat_type |
| Statistics of the double array trie. More... | |