![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
| using arene::base::linalg::math_accessor_t = typename math_traits<T>::accessor_type |
The mdspan-equivalent accessor type of T if T is a linalg object, or a substitution error if not.
| T | The type to inspect |
| using arene::base::linalg::math_element_t = typename math_traits<T>::element_type |
The mdspan-equivalent element type of T if T is a linalg object, or a substitution error if not.
| T | The type to inspect |
| using arene::base::linalg::math_extents_t = typename math_traits<T>::extents_type |
The mdspan-equivalent extents type of T if T is a linalg object, or a substitution error if not.
| T | The type to inspect |
| using arene::base::linalg::math_index_t = typename math_traits<T>::index_type |
The mdspan-equivalent index type of T if T is a linalg object, or a substitution error if not.
| T | The type to inspect |
| using arene::base::linalg::math_layout_t = typename math_traits<T>::layout_type |
The mdspan-equivalent layout type of T if T is a linalg object, or a substitution error if not.
| T | The type to inspect |
| using arene::base::linalg::math_rank_t = typename math_traits<T>::rank_type |
The mdspan-equivalent rank type of T if T is a linalg object, or a substitution error if not.
| T | The type to inspect |
| using arene::base::linalg::math_reference_t = typename math_traits<T>::reference |
The mdspan-equivalent reference type of T if T is a linalg object, or a substitution error if not.
| T | The type to inspect |
| using arene::base::linalg::math_size_t = typename math_traits<T>::size_type |
The mdspan-equivalent size type of T if T is a linalg object, or a substitution error if not.
| T | The type to inspect |
| using arene::base::linalg::math_value_t = typename math_traits<T>::value_type |
The mdspan-equivalent value type of T if T is a linalg object, or a substitution error if not.
| T | The type to inspect |
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | constant_detail::constant_fn | , |
| constant | ) |
Construct a constant-valued expression for a linear algebra operation.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | copy_elements_detail::copy_elements_fn | , |
| copy_elements | ) |
Copy corresponding elements from one multidimensional view to another.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | detail::dot_fn | , |
| dot | ) |
Compute the dot product of two vectors.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | detail::matrix_one_norm_fn | , |
| matrix_one_norm | ) |
Compute the maximum absolute column sum of a matrix.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | detail::matrix_rank_1_update_fn | , |
| matrix_rank_1_update | ) |
Compute a rank-1 matrix update of two vectors.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | detail::vector_abs_sum_fn | , |
| vector_abs_sum | ) |
Compute the sum of the absolute values of a vector's elements.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | detail::vector_idx_abs_max_fn | , |
| vector_idx_abs_max | ) |
Find the index of a vector element with greatest absolute value.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | elementwise_binary_transform_detail::elementwise_binary_transform_fn | , |
| elementwise_binary_transform | ) |
Apply a binary operation to corresponding elements of two multidimensional views.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | elementwise_unary_transform_detail::elementwise_unary_transform_fn | , |
| elementwise_unary_transform | ) |
Apply a unary operation to each element of a multidimensional view.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | equal_elements_detail::equal_elements_fn | , |
| equal_elements | ) |
Compare the corresponding elements of two multidimensional views for equality.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | explicit_diagonal_t | , |
| explicit_diagonal | ) |
Tag indicating that a triangular matrix stores its diagonal explicitly.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | implicit_unit_diagonal_t | , |
| implicit_unit_diagonal | ) |
Tag indicating that a triangular matrix has an implicit unit diagonal.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | lower_triangle_t | , |
| lower_triangle | ) |
Tag indicating that a triangular matrix stores its lower triangle.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | matrix_observers_detail::extent_accessor_fn< 0U > | , |
| row_count | ) |
Function object returning the number of rows of a matrix.
Given an in-matrix A, row_count(A) returns A.extent(0).
is_in_matrix_v<Mat> to be true. | arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | matrix_observers_detail::extent_accessor_fn< 1U > | , |
| column_count | ) |
Function object returning the number of columns of a matrix.
Given an in-matrix A, column_count(A) returns A.extent(1).
is_in_matrix_v<Mat> to be true. | arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | matrix_observers_detail::is_square_fn | , |
| is_square | ) |
Function object returning whether or not a matrix has as many rows as it has columns.
Given an in-matrix A, is_square(A) returns row_count(A) == column_count(A), except that it returns false without inspecting A when the static extents of A's type cannot be equal.
is_in_matrix_v<Mat> to be true. | arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | matrix_vector_product_detail::matrix_vector_product_impl | , |
| matrix_vector_product | ) |
Function object implementing a matrix-vector product with optional offset.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | row_column_view_detail::matrix_axis_view_fn< 0U > | , |
| row_view | ) |
Return a range over the rows of a matrix.
Given a matrix, row_view returns a range whose elements are the rows of that matrix, in order. The range has one element per row, totaling matrix.extent(0) elements, and its i-th element is a rank-1 view of the i-th row, holding the matrix.extent(1) elements of that row. The result is a range, so it may be used in a range-based for loop and with functions that operate on ranges.
The rows are views rather than copies, so each one refers to the elements of matrix. Where the element type is non-const, writing through a row writes through to the matrix.
The argument must be an in-matrix, that is a rank-2 mdspan whose value type is a scalar (see arene::base::linalg::is_in_matrix_v). The i -th row is exactly submdspan(matrix, i, full_extent) , so the layout of matrix must support slicing.
Can also be called with a second index parameter i to get a view of the i-th row:
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | row_column_view_detail::matrix_axis_view_fn< 1U > | , |
| column_view | ) |
Return a range over the columns of a matrix.
Given a matrix, column_view returns a range whose elements are the columns of that matrix, in order. The range has one element per column, totaling matrix.extent(1) elements, and its i-th element is a rank-1 view of the i-th column, holding the matrix.extent(0) elements of that column. The result is a range, so it may be used in a range-based for loop and with functions that operate on ranges.
The columns are views rather than copies, so each one refers to the elements of matrix itself. Where the element type is non-const, writing through a column writes through to the matrix.
The argument must be an in-matrix, that is a rank-2 mdspan whose value type is a scalar (see arene::base::linalg::is_in_matrix_v). The i -th column is exactly submdspan(matrix, full_extent, i) , so the layout of matrix must support slicing.
Can also be called with a second index parameter i to get a view of the i-th column:
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | swap_elements_detail::swap_elements_fn | , |
| swap_elements | ) |
Swap corresponding elements of two multidimensional views.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | swap_rows_detail::swap_rows_fn | , |
| swap_rows | ) |
Swap two rows of a matrix.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | transposed_detail::transposed_fn | , |
| transposed | ) |
Return a transposed view of a rank-2 mdspan that aliases the input data in place.
Selects an overload of transposed_detail::transposed_fn::operator() by the input layout: a layout_left input yields a layout_right view (and vice versa), a layout_stride input yields a layout_stride view with its two strides swapped, a layout_transpose input is unwrapped to its nested layout, and any other layout is wrapped in layout_transpose.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE | ( | upper_triangle_t | , |
| upper_triangle | ) |
Tag indicating that a triangular matrix stores its upper triangle.
| arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE_INIT | ( | add | , |
| arene::base::bind_back(elementwise_binary_transform, std::plus<>{}) | ) |
Add two mdspans elementwise, writing the result into a third.
| LhsInSpan | The type of the first input span |
| RhsInSpan | The type of the second input span |
| OutSpan | The type of the output span Pass the first and second input spans as lhs_span and rhs_span, and the output span as out_span. |
LhsInSpan , RhsInSpan , and OutSpan must be instantiations of mdspan with the same rank lhs_in_span and out_span overlap, they must alias rhs_in_span and out_span overlap, they must alias std::plus must be invocable with elements of the input spans, and the result must be assignable to the elements of the output span lhs_span , rhs_span , and out_span must have equal extents | arene::base::linalg::ARENE_CPP14_INLINE_VARIABLE_INIT | ( | subtract | , |
| arene::base::bind_back(elementwise_binary_transform, std::minus<>{}) | ) |
subract two mdspans elementwise, writing the result into a third
| LhsInSpan | The type of the first input span |
| RhsInSpan | The type of the second input span |
| OutSpan | The type of the output span Pass the first and second input spans as lhs_span and rhs_span, and the output span as out_span. |
LhsInSpan , RhsInSpan , and OutSpan must be instantiations of mdspan with the same rank lhs_in_span and out_span overlap, they must alias rhs_in_span and out_span overlap, they must alias std::minus must be invocable with elements of the input spans, and the result must be assignable to the elements of the output span lhs_span , rhs_span , and out_span must have equal extents
|
constexprnoexcept |
Return a version of the given mdspan instance that has an accessor which scales by scaling_factor.
| ScalingFactor | Type of the scaling factor to be used; normally deduced from scaling_factor |
| ElementType | Type of the elements of the original mdspan; normally deduced from original |
| Extents | Type of the extents of the original mdspan; normally deduced from original |
| Layout | Type of the layout of the original mdspan; normally deduced from original |
| Accessor | Type of the accessor of the original mdspan; normally deduced from original |
| scaling_factor | Specific amount by which to scale the elements of original |
| original | The original mdspan instance into whose elements this function will create a scaled view |
mdspan instance with the same extents and layout as original but whose elements appear scaled
|
externconstexpr |
Return an mdspan representing an identity matrix with the same shape as the passed-in extents.
| ElementType | The element type to use for the returned matrix; must be a linalg scalar |
|
externconstexpr |
Determines whether a type, ignoring cv-qualification, is a diagonal storage tag.
| T | The type to inspect. |
|
externconstexpr |
Determine if the given type is an in-matrix, usable as an input matrix for linalg algorithms.
| T | The type to check |
|
externconstexpr |
Determine if the given type is an in-object, e.g. an in-vector or in-matrix.
| T | The type to check |
|
externconstexpr |
Determine if the given type is an in-vector, usable as an input vector for linalg algorithms.
| T | The type to check |
|
externconstexpr |
Determine if the given type is an inout-matrix, usable as both input and output matrix for linalg algorithms.
| T | The type to check |
|
externconstexpr |
Determine if the given type is an inout-object, e.g. an inout-vector or inout-matrix.
| T | The type to check |
|
externconstexpr |
Determine if the given type is an inout-vector, usable as both input and output vector for linalg algorithms.
| T | The type to check |
|
externconstexpr |
Determine if the given type is an out-matrix, usable as an output matrix for linalg algorithms.
| T | The type to check |
|
externconstexpr |
Determine if the given type is an out-object, e.g. an out-vector or out-matrix.
| T | The type to check |
|
externconstexpr |
Determine if the given type is an out-vector, usable as an output vector for linalg algorithms.
| T | The type to check |
|
externconstexpr |
Determine if the given type is a scalar for the purposes of linalg algorithms.
| T | The type to check |
value_types of vectors and matrices used in linalg must be scalars in this sense. !std::is_execution_policy_v<T> but there are no execution policies in C++14.
|
externconstexpr |
Determines whether a type, ignoring cv-qualification, is a triangular matrix storage tag.
| T | The type to inspect. |
|
externconstexpr |
The compile-time number of columns of a matrix.
| Mat | Matrix type; must satisfy is_in_matrix_v |
Mat is not an in-matrix.Equals math_extents_t<Mat>::static_extent(1), which is dynamic_extent if the column extent is not known statically.
|
externconstexpr |
The compile-time number of rows of a matrix.
| Mat | Matrix type; must satisfy is_in_matrix_v |
Mat is not an in-matrix.Equals math_extents_t<Mat>::static_extent(0), which is dynamic_extent if the row extent is not known statically.