5 # ifndef VCCC_MATH_MATRIX_MATRIX_SUM_HPP
6 # define VCCC_MATH_MATRIX_MATRIX_SUM_HPP
16 template<
typename LhsType,
typename RhsType>
17 struct traits<MatrixSum<LhsType, RhsType>> {
19 rows = traits<LhsType>::rows,
20 cols = traits<LhsType>::cols,
25 option =
static_cast<int>(traits<LhsType>::option) |
static_cast<int>(traits<RhsType>::option) |
static_cast<int>(Flag::kReferenceUnsafe)
27 using value_type =
typename LhsType::value_type;
36 template<
typename LhsType,
typename RhsType>
40 using lhs_type = internal::math::hold_type_selector_t<LhsType>;
41 using rhs_type = internal::math::hold_type_selector_t<RhsType>;
45 constexpr
MatrixSum(
const LhsType& lhs,
const RhsType& rhs) : lhs(lhs), rhs(rhs) {};
60 return MatrixSum<E1, E2>(*
static_cast<const E1*
>(&lhs), *
static_cast<const E2*
>(&rhs));
Definition: matrix_base.hpp:20
Definition: matrix_sum.hpp:37
internal::math::hold_type_selector_t< RhsType > rhs_type
Definition: matrix_sum.hpp:41
constexpr value_type operator[](std::size_t i) const
Definition: matrix_sum.hpp:49
internal::math::hold_type_selector_t< LhsType > lhs_type
Definition: matrix_sum.hpp:40
typename LhsType::value_type value_type
Definition: matrix_sum.hpp:43
constexpr value_type operator()(std::size_t i) const
Definition: matrix_sum.hpp:47
constexpr MatrixSum(const LhsType &lhs, const RhsType &rhs)
Definition: matrix_sum.hpp:45
constexpr MatrixSum< E1, E2 > operator+(const MatrixBase< E1 > &lhs, const MatrixBase< E2 > &rhs)
Definition: matrix_sum.hpp:59
Definition: directory.h:12
constexpr auto size(const C &c) -> decltype(c.size())
Definition: size.hpp:16
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35