Namespace of utilities.
More...
|
namespace | concepts |
| Namespace of C++ concepts.
|
|
namespace | impl |
| Namespace of internal implementations.
|
|
|
template<typename Key , typename Value , concepts::hash_function< Key > Hash = std::hash<Key>, concepts::comparator< Key, Key > KeyEqual = equal<Key>, typename Allocator = std::allocator<std::pair<Key, Value>>> |
using | concurrent_map |
| Type of concurrent maps.
|
|
|
constexpr std::size_t | cache_line = hash_tables::utility::cache_line |
| Size of cache line.
|
|
◆ concurrent_map
template<typename Key , typename Value , concepts::hash_function< Key > Hash = std::hash<Key>, concepts::comparator< Key, Key > KeyEqual = equal<Key>, typename Allocator = std::allocator<std::pair<Key, Value>>>
Initial value: hash_tables::maps::separate_shared_chain_map_mt<Key,
Value, Hash, KeyEqual, Allocator>
Type of concurrent maps.
- Template Parameters
-
Key | Type of keys. |
Value | Type of mapped values. |
Hash | Type of the hash function. |
KeyEqual | Type of the function to check equality of keys. |
Allocator | Type of the allocator. |
Definition at line 47 of file concurrent_map.h.
◆ dense_matrix_format_type
Enumeration of matrix format types.
Enumerator |
---|
one_line | One line.
|
multi_line | Multiple lines.
|
Definition at line 35 of file format_dense_matrix.h.
◆ sparse_matrix_format_type
Enumeration of matrix format types.
Enumerator |
---|
one_line | One line.
|
multi_line | Multiple lines.
|
Definition at line 37 of file format_sparse_matrix.h.
◆ format_dense_matrix()
template<typename Matrix >
Format a dense matrix.
- Template Parameters
-
Matrix | Type of the matrix. |
- Parameters
-
[in] | mat | Matrix. |
[in] | type | Format type. |
- Returns
- Expression for formatting using fmt library.
- Note
- Format of each element can be specified in fmt's format strings.
Definition at line 99 of file format_dense_matrix.h.
◆ format_dense_vector()
template<typename Vector >
auto num_collect::util::format_dense_vector |
( |
const Eigen::DenseBase< Vector > & | vec | ) |
|
|
inlinenodiscard |
Format a dense vector.
- Template Parameters
-
Vector | Type of the vector. |
- Parameters
-
- Returns
- Expression for formatting using fmt library.
- Note
- Format of each element can be specified in fmt's format strings.
Definition at line 72 of file format_dense_vector.h.
◆ format_errno()
template<typename... Args>
auto num_collect::util::format_errno |
( |
fmt::format_string< Args... > | format, |
|
|
Args &&... | args ) -> std::string |
|
inlinenodiscard |
Format a message with error message determined by errno.
- Template Parameters
-
- Parameters
-
[in] | format | Format. |
[in] | args | Arguments. |
- Returns
- Formatted message.
Definition at line 42 of file format_errno.h.
◆ format_sparse_matrix()
template<base::concepts::sparse_matrix Matrix>
Format a sparse matrix.
- Template Parameters
-
Matrix | Type of the matrix. |
- Parameters
-
[in] | mat | Matrix. |
[in] | type | Format type. |
- Returns
- Expression for formatting using fmt library.
- Note
- Format of each element can be specified in fmt's format strings.
Definition at line 101 of file format_sparse_matrix.h.
◆ greatest_common_divisor()
template<base::concepts::integral T>
auto num_collect::util::greatest_common_divisor |
( |
T | a, |
|
|
T | b ) -> T |
|
nodiscardconstexpr |
Calculate the greatest common divisor.
- Template Parameters
-
- Parameters
-
[in] | a | An integer. |
[in] | b | An integer. |
- Returns
- Greatest common divisor of the integers.
Definition at line 38 of file greatest_common_divisor.h.
◆ hash_string()
auto num_collect::util::hash_string |
( |
std::string_view | str | ) |
-> std::uint32_t |
|
nodiscardconstexprnoexcept |
Calculate a hash number of a string.
- Note
- This function can calculate a hash number at compile-time.
- Parameters
-
- Returns
- Hash number.
Definition at line 35 of file hash_string.h.
◆ least_common_multiple()
template<base::concepts::integral T>
auto num_collect::util::least_common_multiple |
( |
T | a, |
|
|
T | b ) -> T |
|
nodiscardconstexpr |
Calculate the least common multiple.
- Template Parameters
-
- Parameters
-
[in] | a | An integer. |
[in] | b | An integer. |
- Returns
- Least common multiple of the integers.
Definition at line 37 of file least_common_multiple.h.
◆ multiply_safely()
template<base::concepts::integral T>
auto num_collect::util::multiply_safely |
( |
T | a, |
|
|
T | b ) -> T |
|
nodiscardconstexpr |
Multiply two integers with check of overflow.
- Template Parameters
-
- Parameters
-
[in] | a | An integer. |
[in] | b | An integer. |
- Returns
- Result of multiplication.
Definition at line 37 of file multiply_safely.h.
◆ safe_cast()
template<base::concepts::integral To, base::concepts::integral From>
auto num_collect::util::safe_cast |
( |
const From & | value | ) |
-> To |
|
inlinenodiscard |
Cast safely.
- Template Parameters
-
To | Type to cast to. |
From | Type to cast from. |
- Parameters
-
- Returns
- Casted value.
Definition at line 54 of file safe_cast.h.
◆ cache_line
std::size_t num_collect::util::cache_line = hash_tables::utility::cache_line |
|
constexpr |