26 template <adaptable Matrix>
34 static constexpr
size_t alignment = matrix_t::alignment;
48 template <
typename V = default_vec>
113 template<convertible_expr<value_type> E>
122 validate_assign(*
this, e);
126 if (e.alias(*
this)) {
151 template <etl_expr R>
158 validate_expression(*
this, rhs);
159 rhs.assign_add_to(*
this);
168 template <etl_expr R>
175 validate_expression(*
this, rhs);
176 rhs.assign_sub_to(*
this);
195 template <etl_expr R>
202 validate_expression(*
this, rhs);
203 rhs.assign_mul_to(*
this);
222 template <etl_expr R>
229 validate_expression(*
this, rhs);
230 rhs.assign_mul_to(*
this);
249 template <etl_expr R>
256 validate_expression(*
this, rhs);
257 rhs.assign_div_to(*
this);
276 template <etl_expr R>
283 validate_expression(*
this, rhs);
284 rhs.assign_mod_to(*
this);
297 return {
value, i, j};
300 using base_type::operator();
306 template <
typename Matrix>
Contains strictly upper triangular matrix exception implementation.
CRTP class to inject iterators functions.
Definition: iterable.hpp:23
static constexpr size_t alignment
The memory alignment.
Definition: strictly_upper.hpp:34
void assign_to(L &&lhs) const
Assign to the given left-hand-side expression.
Definition: adapter.hpp:279
Contains base class for adapters.
typename matrix_t::const_iterator const_iterator
The type of const iterator.
Definition: strictly_upper.hpp:41
strictly_upper_matrix & operator>>=(const R &rhs)
Multiply each element by the value of the elements in the right hand side expression.
Definition: strictly_upper.hpp:223
static constexpr size_t n_dimensions
The number of dimensions.
Definition: strictly_upper.hpp:32
adapter< Matrix > base_type
The base type.
Definition: strictly_upper.hpp:43
strictly_upper_matrix & operator*=(const value_type &rhs) noexcept
Multiply each element by the right hand side scalar.
Definition: strictly_upper.hpp:185
static constexpr order storage_order
The storage order.
Definition: strictly_upper.hpp:33
typename V::template vec_type< value_type > vec_type
The vectorization type for V.
Definition: adapter.hpp:33
strictly_upper_matrix & operator%=(const value_type &rhs) noexcept
Modulo each element by the right hand side scalar.
Definition: strictly_upper.hpp:266
order
Storage order of a matrix.
Definition: order.hpp:15
Exception that is thrown when an operation is made to a strictly upper triangular matrix that would r...
Definition: strictly_upper_exception.hpp:24
void assign_mod_to(L &&lhs) const
Modulo the given left-hand-side expression.
Definition: adapter.hpp:324
void assign_div_to(L &&lhs) const
Divide the given left-hand-side expression.
Definition: adapter.hpp:315
const value_type * const_memory_type
The const memory type.
Definition: adapter.hpp:27
value_t< matrix_t > value_type
The value type.
Definition: adapter.hpp:25
Matrix matrix_t
The adapted matrix type.
Definition: strictly_upper.hpp:28
strictly_upper_matrix & operator=(const strictly_upper_matrix &rhs)=default
Assign to the matrix by copy.
Traits to get information about ETL types.
Definition: tmp.hpp:68
Root namespace for the ETL library.
Definition: adapter.hpp:15
strictly_upper_matrix & operator*=(const R &rhs)
Multiply each element by the value of the elements in the right hand side expression.
Definition: strictly_upper.hpp:196
static constexpr size_t dimensions()
Return the number of dimensions of the expression.
Definition: traits_base.hpp:31
strictly_upper_matrix(size_t dim) noexcept
Construct a new strictly upper triangular matrix and fill it with zeros.
Definition: strictly_upper.hpp:78
auto dim(E &&value, size_t i) -> detail::identity_helper< E, dim_view< detail::build_identity_type< E >, D >>
Return a view representing the ith Dth dimension.
Definition: view_expression_builder.hpp:25
value_type * memory_type
The memory type.
Definition: adapter.hpp:26
A base class for adapters.
Definition: adapter.hpp:21
matrix_t value
The adapted matrix.
Definition: adapter.hpp:36
strictly_upper_matrix & operator+=(const R &rhs)
Multiply each element by the value of the elements in the right hand side expression.
Definition: strictly_upper.hpp:152
strictly_upper_matrix & operator>>=(const value_type &rhs) noexcept
Multiply each element by the right hand side scalar.
Definition: strictly_upper.hpp:212
A proxy representing a reference to a mutable element of a strictly upper triangular matrix...
Definition: strictly_upper_reference.hpp:24
A strictly upper triangular matrix adapter.
Definition: strictly_upper.hpp:27
strictly_upper_detail::strictly_upper_reference< matrix_t > operator()(size_t i, size_t j) noexcept
Access the (i, j) element of the 2D matrix.
Definition: strictly_upper.hpp:296
strictly_upper_matrix & operator/=(const value_type &rhs) noexcept
Divide each element by the right hand side scalar.
Definition: strictly_upper.hpp:239
Represents a scalar value.
Definition: concepts_base.hpp:19
matrix_t expr_t
The wrapped expression type.
Definition: adapter.hpp:23
etl::iterator< const this_type > const_iterator
The const iterator type.
Definition: dyn_matrix_view.hpp:37
typename matrix_t::const_iterator iterator
The type of const iterator.
Definition: strictly_upper.hpp:40
Contains strictly upper triangular matrix reference proxy implementation.
void assign_mul_to(L &&lhs) const
Multiply the given left-hand-side expression.
Definition: adapter.hpp:306
strictly_upper_matrix & operator%=(const R &rhs)
Modulo each element by the value of the elements in the right hand side expression.
Definition: strictly_upper.hpp:277
strictly_upper_matrix & operator=(E &&e) noexcept(false)
Assign the values of the ETL expression to the upper triangular matrix.
Definition: strictly_upper.hpp:114
strictly_upper_matrix(value_type value) noexcept
Construct a new strictly upper triangular matrix and fill it witht the given value.
Definition: strictly_upper.hpp:70
strictly_upper_matrix & operator/=(const R &rhs)
Modulo each element by the value of the elements in the right hand side expression.
Definition: strictly_upper.hpp:250
strictly_upper_matrix() noexcept
Construct a new strictly upper triangular matrix and fill it with zeros.
Definition: strictly_upper.hpp:59
strictly_upper_matrix & operator-=(const R &rhs)
Multiply each element by the value of the elements in the right hand side expression.
Definition: strictly_upper.hpp:169
typename decay_traits< E >::value_type value_t
Traits to extract the value type out of an ETL type.
Definition: tmp.hpp:81
Traits for wrapper expressions.
Definition: wrapper_traits.hpp:21
Matrix matrix_t
The adapted matrix type.
Definition: adapter.hpp:22
bool is_strictly_upper_triangular(E &&expr)
Indicates if the given expression is a strictly upper triangular matrix or not.
Definition: adapters.hpp:281