A double array.
More...
#include <double_array.hpp>
|
| double_array () |
| Creates a double array.
|
|
| double_array (const std::vector< std::pair< std::string_view, std::int32_t > > &elements, const building_observer_set_type &building_observer_set=null_building_observer_set(), std::size_t density_factor=default_density_factor()) |
| Creates a double array.
|
|
| double_array (const std::vector< std::pair< std::string, std::int32_t > > &elements, const building_observer_set_type &building_observer_set=null_building_observer_set(), std::size_t density_factor=default_density_factor()) |
| Creates a double array.
|
|
template<typename InputIterator > |
| double_array (InputIterator first, InputIterator last, const building_observer_set_type &building_observer_set=null_building_observer_set(), std::size_t density_factor=default_density_factor()) |
| Creates a double array.
|
|
| double_array (std::unique_ptr< storage > &&p_storage, std::size_t root_base_check_index) |
| Creates a double array.
|
|
| ~double_array () |
| Destroys the double array.
|
|
std::optional< std::int32_t > | find (const std::string_view &key) const |
| Finds the value correspoinding the given key.
|
|
double_array_iterator | begin () const |
| Returns a first iterator.
|
|
double_array_iterator | end () const |
| Returns a last iterator.
|
|
std::unique_ptr< double_array > | subtrie (const std::string_view &key_prefix) const |
| Returns a subtrie.
|
|
const storage & | get_storage () const |
| Returns the storage.
|
|
storage & | get_storage () |
| Returns the storage.
|
|
◆ double_array() [1/4]
Creates a double array.
- Parameters
-
elements | Initial elements. |
building_observer_set | A building observer set. |
density_factor | A density factor. Must be greater than 0. |
- Exceptions
-
std::invalid_argument | When density_factor is 0. |
◆ double_array() [2/4]
Creates a double array.
- Parameters
-
elements | Initial elements. |
building_observer_set | A building observer set. |
density_factor | A density factor. Must be greater than 0. |
- Exceptions
-
std::invalid_argument | When density_factor is 0. |
◆ double_array() [3/4]
template<typename InputIterator >
Creates a double array.
- Template Parameters
-
InputIterator | An input iterator type. |
- Parameters
-
first | An iterator to the first element. |
last | An iterator to the last element. |
building_observer_set | A building observer set. |
density_factor | A density factor. Must be greater than 0. |
- Exceptions
-
std::invalid_argument | When density_factor is 0. |
◆ double_array() [4/4]
tetengo::trie::double_array::double_array |
( |
std::unique_ptr< storage > && |
p_storage, |
|
|
std::size_t |
root_base_check_index |
|
) |
| |
Creates a double array.
- Parameters
-
p_storage | A unique pointer to a storage. |
root_base_check_index | A root base-check index. |
◆ begin()
Returns a first iterator.
- Returns
- A first double array iterator.
◆ default_density_factor()
static std::size_t tetengo::trie::double_array::default_density_factor |
( |
| ) |
|
|
static |
Returns the default density factor.
- Returns
- The default density factor.
◆ end()
Returns a last iterator.
- Returns
- A last double array iterator.
◆ find()
std::optional< std::int32_t > tetengo::trie::double_array::find |
( |
const std::string_view & |
key | ) |
const |
Finds the value correspoinding the given key.
- Parameters
-
- Returns
- The value. Or std::nullpot when the double array does not have the given key.
◆ get_storage() [1/2]
storage & tetengo::trie::double_array::get_storage |
( |
| ) |
|
Returns the storage.
- Returns
- The storage.
◆ get_storage() [2/2]
const storage & tetengo::trie::double_array::get_storage |
( |
| ) |
const |
Returns the storage.
- Returns
- The storage.
◆ key_terminator()
static char tetengo::trie::double_array::key_terminator |
( |
| ) |
|
|
static |
Returns the key terminator.
- Returns
- The key terminator.
◆ null_building_observer_set()
Returns the null building observer set.
- Returns
- The null bulding observer set.
◆ subtrie()
std::unique_ptr< double_array > tetengo::trie::double_array::subtrie |
( |
const std::string_view & |
key_prefix | ) |
const |
Returns a subtrie.
- Parameters
-
- Returns
- A unique pointer to a double array of the subtrie. Or nullptr when the double array does not have the given key prefix.
◆ vacant_check_value()
static std::uint8_t tetengo::trie::double_array::vacant_check_value |
( |
| ) |
|
|
static |
Returns the check value for a vacant element.
- Returns
- The check value for a vacant element.
The documentation for this class was generated from the following file: