|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Classes | |
| struct | Columns_At |
| The row and the matrix of the columns of an array, by their indexes. More... | |
| struct | Columns_At< Columns, std::index_sequence< J... >, true > |
The row and the matrix of the columns Columns[J].... More... | |
| struct | Layout |
| Where every column of a row lives. More... | |
Concepts | |
| concept | Column_Integer |
| An integer type that make() and fast_make() take: at most 64 bits. | |
| concept | Column_Array |
| An array of columns that Packed_Row_Of and Packed_Matrix_Of take. | |
Typedefs | |
| template<unsigned Bits> | |
| using | Word_Of = std::conditional_t< Bits==8, std::uint8_t, std::conditional_t< Bits==16, std::uint16_t, std::conditional_t< Bits==32, std::uint32_t, std::uint64_t > > > |
| Unsigned type of the given number of bits. | |
Functions | |
| template<size_t N> | |
| constexpr Layout< N > | make_layout (const std::array< Bit_Column, N > &cols) noexcept |
| Place the columns of a row. | |
| template<size_t N> | |
| constexpr bool | all_true (const std::array< bool, N > &flags) noexcept |
| Test whether every flag of an array is set. | |
| template<Column_Integer V> | |
| constexpr bool | fits_in_int64 (const V v) noexcept |
| Test whether an integer is a value of std::int64_t. | |
| void | throw_bad_column (const size_t j, const size_t num_cols) |
| Report a column index that is out of range. | |
| void | throw_bad_row (const size_t i, const size_t num_rows) |
| Report a row index that is out of range. | |
| void | throw_bad_value (const size_t j, const std::int64_t v, const std::int64_t lo, const std::int64_t hi) |
| Report a value that is outside the range of its column. | |
| void | throw_bad_value (const size_t j, const std::uint64_t v, const std::int64_t lo, const std::int64_t hi) |
| Report an unsigned value above the highest std::int64_t. | |
Variables | |
| constexpr size_t | max_columns = 65535 |
| Most columns of a row: Layout keeps the index of the word of a column in 16 bits. | |
| template<class... Vs> | |
| constexpr bool | all_column_integers |
| Test whether make() and fast_make() take every type of a pack. | |
| template<class T > | |
| constexpr bool | is_column_array = false |
| Test whether a type is an array of columns that a row can take. | |
| using Aleph::packed_matrix_detail::Word_Of = typedef std::conditional_t<Bits == 8, std::uint8_t, std::conditional_t<Bits == 16, std::uint16_t, std::conditional_t<Bits == 32, std::uint32_t, std::uint64_t> >> |
Unsigned type of the given number of bits.
| Bits | 8, 16, 32 or 64. |
Definition at line 228 of file tpl_packed_matrix.H.
|
constexprnoexcept |
Test whether every flag of an array is set.
It walks the columns of a row without a fold expression: Clang refuses a fold of more than 256 operands, and with it a row of more columns.
| N | Number of flags. |
| [in] | flags | The flags. |
Definition at line 249 of file tpl_packed_matrix.H.
|
constexprnoexcept |
Test whether an integer is a value of std::int64_t.
| V | Its type. |
| [in] | v | The integer. |
std::int64_t. Definition at line 276 of file tpl_packed_matrix.H.
References Aleph::and, and V.
Referenced by Aleph::Packed_Row< Cols >::check_argument(), and Aleph::Packed_Row< Cols >::fast_make().
|
constexprnoexcept |
Place the columns of a row.
Columns go from the most significant bit of the first word down, in their order, so that comparing the words of two rows compares their tuples of values. A column that does not fit in what is left of a word starts the next one.
| N | Number of columns. |
| [in] | cols | Ranges of the columns, each with lo <= hi. |
Definition at line 189 of file tpl_packed_matrix.H.
|
inline |
Report a column index that is out of range.
| [in] | j | The index. |
| [in] | num_cols | Number of columns. |
| std::out_of_range | always. |
Definition at line 292 of file tpl_packed_matrix.H.
References ah_out_of_range_error.
Referenced by Aleph::Packed_Row< Cols >::check_column().
|
inline |
Report a row index that is out of range.
| [in] | i | The index. |
| [in] | num_rows | Number of rows. |
| std::out_of_range | always. |
Definition at line 304 of file tpl_packed_matrix.H.
References ah_out_of_range_error.
Referenced by Aleph::Packed_Matrix< Cols >::check_row().
|
inline |
Report a value that is outside the range of its column.
| [in] | j | The column. |
| [in] | v | The value. |
| [in] | lo | Lowest value of the column. |
| [in] | hi | Highest value of the column. |
| std::domain_error | always. |
Definition at line 317 of file tpl_packed_matrix.H.
References ah_domain_error.
Referenced by Aleph::Packed_Row< Cols >::check_argument(), and Aleph::Packed_Row< Cols >::check_value().
|
inline |
Report an unsigned value above the highest std::int64_t.
| [in] | j | The column. |
| [in] | v | The value. |
| [in] | lo | Lowest value of the column. |
| [in] | hi | Highest value of the column. |
| std::domain_error | always. |
Definition at line 333 of file tpl_packed_matrix.H.
References ah_domain_error.
|
inlineconstexpr |
Test whether make() and fast_make() take every type of a pack.
The same as a fold of Column_Integer over the pack, which Clang refuses beyond 256 types; a pack of constrained parameters, as in Column_Integer... Vs, is checked by such a fold.
| Vs | The types. |
Definition at line 266 of file tpl_packed_matrix.H.
|
inlineconstexpr |
Test whether a type is an array of columns that a row can take.
A std::array of Bit_Column is one if it has from 1 to max_columns entries.
| T | The type. |
| N | Number of entries. |
Definition at line 1199 of file tpl_packed_matrix.H.
|
inlineconstexpr |
Most columns of a row: Layout keeps the index of the word of a column in 16 bits.
Definition at line 158 of file tpl_packed_matrix.H.