Class of vectors of ternary floating-point numbers.
More...
#include <num_collect/opt/impl/ternary_vector.h>
Class of vectors of ternary floating-point numbers.
Definition at line 39 of file ternary_vector.h.
◆ data_type
Initial value: Eigen::Matrix<
digit_type, Eigen::Dynamic, Eigen::Dynamic,
Eigen::RowMajor>
std::int8_t digit_type
Type of a digit.
Type of data matrix.
Definition at line 203 of file ternary_vector.h.
◆ digit_type
◆ ternary_vector()
num_collect::opt::impl::ternary_vector::ternary_vector |
( |
index_type | dim | ) |
|
|
inlineexplicit |
◆ change_dim()
void num_collect::opt::impl::ternary_vector::change_dim |
( |
index_type | dim | ) |
|
|
inline |
Change the number of dimensions.
- Warning
- This won't preserve the digits already inserted.
- Parameters
-
[in] | dim | Number of dimensions. |
Definition at line 75 of file ternary_vector.h.
◆ digits()
Get the number of digits of a dimension.
- Parameters
-
- Returns
- Number of digits.
Definition at line 85 of file ternary_vector.h.
◆ dim()
auto num_collect::opt::impl::ternary_vector::dim |
( |
| ) |
const -> index_type |
|
inlinenodiscard |
Get the number of dimensions.
- Returns
- Number of dimensions.
Definition at line 66 of file ternary_vector.h.
◆ elem_as()
template<typename Scalar>
auto num_collect::opt::impl::ternary_vector::elem_as |
( |
index_type | dim | ) |
const -> Scalar |
|
inlinenodiscard |
Get the element of this vector as a floating-point number.
- Template Parameters
-
Scalar | Type of resulting floating-point number. |
- Parameters
-
- Returns
- Calculated floating-point number.
Definition at line 187 of file ternary_vector.h.
◆ operator!=()
auto num_collect::opt::impl::ternary_vector::operator!= |
( |
const ternary_vector & | right | ) |
const -> bool |
|
inlinenodiscard |
Compare with another object.
- Parameters
-
[in] | right | Right-hand-side object. |
- Returns
- Whether the two object are different.
Definition at line 175 of file ternary_vector.h.
◆ operator()() [1/2]
Access a digit.
- Parameters
-
[in] | dim | Dimension index. |
[in] | digit | Digit index. |
- Returns
- Reference to the digit.
Definition at line 97 of file ternary_vector.h.
◆ operator()() [2/2]
Access a digit.
- Parameters
-
[in] | dim | Dimension index. |
[in] | digit | Digit index. |
- Returns
- Reference to the digit.
Definition at line 111 of file ternary_vector.h.
◆ operator==()
auto num_collect::opt::impl::ternary_vector::operator== |
( |
const ternary_vector & | right | ) |
const -> bool |
|
inlinenodiscard |
Compare with another object.
- Parameters
-
[in] | right | Right-hand-side object. |
- Returns
- Whether the two object are same.
Definition at line 142 of file ternary_vector.h.
◆ push_back()
Add a digit to a dimension.
- Parameters
-
[in] | dim | Dimension index. |
[in] | digit | Digit. |
Definition at line 124 of file ternary_vector.h.
◆ data_
data_type num_collect::opt::impl::ternary_vector::data_ {} |
|
private |
Data matrix.
This matrix has the number of digits for each dimension and the buffer of digits.
Definition at line 215 of file ternary_vector.h.
◆ init_digits_per_dimensions
index_type num_collect::opt::impl::ternary_vector::init_digits_per_dimensions = 4 |
|
staticconstexprprivate |
◆ max_digits
index_type num_collect::opt::impl::ternary_vector::max_digits |
|
staticconstexpr |
Initial value:=
static_cast<index_type>(std::numeric_limits<digit_type>::max())
std::ptrdiff_t index_type
Type of indices in this library.
Maximum number of digits per dimension.
Definition at line 45 of file ternary_vector.h.
The documentation for this class was generated from the following file: