18 #include "etl/concepts.hpp" 27 template <adaptable Matrix>
35 static constexpr
size_t alignment = matrix_t::alignment;
49 template <
typename V = default_vec>
114 template <convertible_expr<value_type> E>
123 validate_assign(*
this, e);
127 if (e.alias(*
this)) {
152 template <etl_expr R>
159 validate_expression(*
this, rhs);
160 rhs.assign_add_to(*
this);
169 template <etl_expr R>
176 validate_expression(*
this, rhs);
177 rhs.assign_sub_to(*
this);
196 template <etl_expr R>
203 validate_expression(*
this, rhs);
204 rhs.assign_mul_to(*
this);
223 template <etl_expr R>
230 validate_expression(*
this, rhs);
231 rhs.assign_mul_to(*
this);
250 template <etl_expr R>
257 validate_expression(*
this, rhs);
258 rhs.assign_div_to(*
this);
277 template <etl_expr R>
284 validate_expression(*
this, rhs);
285 rhs.assign_mod_to(*
this);
298 return {
value, i, j};
301 using base_type::operator();
307 template <
typename Matrix>
CRTP class to inject iterators functions.
Definition: iterable.hpp:23
void assign_to(L &&lhs) const
Assign to the given left-hand-side expression.
Definition: adapter.hpp:279
Contains base class for adapters.
strictly_lower_matrix & operator%=(const R &rhs)
Modulo each element by the value of the elements in the right hand side expression.
Definition: strictly_lower.hpp:278
strictly_lower_matrix & operator*=(const value_type &rhs) noexcept
Multiply each element by the right hand side scalar.
Definition: strictly_lower.hpp:186
adapter< Matrix > base_type
The base type.
Definition: strictly_lower.hpp:44
static constexpr order storage_order
The storage order.
Definition: strictly_lower.hpp:34
typename V::template vec_type< value_type > vec_type
The vectorization type for V.
Definition: adapter.hpp:33
strictly_lower_matrix & operator>>=(const R &rhs)
Multiply each element by the value of the elements in the right hand side expression.
Definition: strictly_lower.hpp:224
strictly_lower_detail::strictly_lower_reference< matrix_t > operator()(size_t i, size_t j) noexcept
Access the (i, j) element of the 2D matrix.
Definition: strictly_lower.hpp:297
order
Storage order of a matrix.
Definition: order.hpp:15
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
strictly_lower_matrix(size_t dim) noexcept
Construct a new strictly lower triangular matrix and fill it with zeros.
Definition: strictly_lower.hpp:79
strictly_lower_matrix & operator+=(const R &rhs)
Multiply each element by the value of the elements in the right hand side expression.
Definition: strictly_lower.hpp:153
A proxy representing a reference to a mutable element of a strictly lower triangular matrix...
Definition: strictly_lower_reference.hpp:24
Traits to get information about ETL types.
Definition: tmp.hpp:68
Root namespace for the ETL library.
Definition: adapter.hpp:15
strictly_lower_matrix(value_type value) noexcept
Construct a new strictly lower triangular matrix and fill it witht the given value.
Definition: strictly_lower.hpp:71
A strictly lower triangular matrix adapter.
Definition: strictly_lower.hpp:28
strictly_lower_matrix & operator=(E &&e) noexcept(false)
Assign the values of the ETL expression to the strictly lower triangular matrix.
Definition: strictly_lower.hpp:115
static constexpr size_t dimensions()
Return the number of dimensions of the expression.
Definition: traits_base.hpp:31
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
Exception that is thrown when an operation is made to a strictly lower triangular matrix that would r...
Definition: strictly_lower_exception.hpp:24
A base class for adapters.
Definition: adapter.hpp:21
matrix_t value
The adapted matrix.
Definition: adapter.hpp:36
strictly_lower_matrix & operator=(const strictly_lower_matrix &rhs)=default
Assign to the matrix by copy.
strictly_lower_matrix & operator*=(const R &rhs)
Multiply each element by the value of the elements in the right hand side expression.
Definition: strictly_lower.hpp:197
strictly_lower_matrix & operator%=(const value_type &rhs) noexcept
Modulo each element by the right hand side scalar.
Definition: strictly_lower.hpp:267
strictly_lower_matrix() noexcept
Construct a new strictly lower triangular matrix and fill it with zeros.
Definition: strictly_lower.hpp:60
Represents a scalar value.
Definition: concepts_base.hpp:19
strictly_lower_matrix & operator-=(const R &rhs)
Multiply each element by the value of the elements in the right hand side expression.
Definition: strictly_lower.hpp:170
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_lower.hpp:41
void assign_mul_to(L &&lhs) const
Multiply the given left-hand-side expression.
Definition: adapter.hpp:306
Matrix matrix_t
The adapted matrix type.
Definition: strictly_lower.hpp:29
Contains strictly lower triangular matrix exception implementation.
static constexpr size_t alignment
The memory alignment.
Definition: strictly_lower.hpp:35
Contains strictly lower triangular matrix reference proxy implementation.
strictly_lower_matrix & operator/=(const R &rhs)
Modulo each element by the value of the elements in the right hand side expression.
Definition: strictly_lower.hpp:251
typename decay_traits< E >::value_type value_t
Traits to extract the value type out of an ETL type.
Definition: tmp.hpp:81
strictly_lower_matrix & operator/=(const value_type &rhs) noexcept
Divide each element by the right hand side scalar.
Definition: strictly_lower.hpp:240
bool is_strictly_lower_triangular(E &&expr)
Indicates if the given expression is a strictly lower triangular matrix or not.
Definition: adapters.hpp:184
typename matrix_t::const_iterator const_iterator
The type of const iterator.
Definition: strictly_lower.hpp:42
Traits for wrapper expressions.
Definition: wrapper_traits.hpp:21
Matrix matrix_t
The adapted matrix type.
Definition: adapter.hpp:22
strictly_lower_matrix & operator>>=(const value_type &rhs) noexcept
Multiply each element by the right hand side scalar.
Definition: strictly_lower.hpp:213
static constexpr size_t n_dimensions
The number of dimensions.
Definition: strictly_lower.hpp:33