Implement binary cwise operations

See merge request oss/rotgen!27
This commit is contained in:
Joel Falcou 2025-09-21 21:53:03 +02:00
parent f33c1c4a2c
commit 3da20803c2
6 changed files with 233 additions and 0 deletions

View file

@ -161,6 +161,42 @@ namespace rotgen
return *this;
}
auto cwiseMin(map const& rhs) const
{
if constexpr(!use_expression_templates) return concrete_type{parent::cwiseMin(rhs.base())};
else return base().cwiseMin(rhs.base());
}
auto cwiseMin(value_type rhs) const
{
if constexpr(!use_expression_templates) return concrete_type{parent::cwiseMin(rhs)};
else return base().cwiseMin(rhs);
}
auto cwiseMax(map const& rhs) const
{
if constexpr(!use_expression_templates) return concrete_type{parent::cwiseMax(rhs.base())};
else return base().cwiseMax(rhs.base());
}
auto cwiseMax(value_type rhs) const
{
if constexpr(!use_expression_templates) return concrete_type{parent::cwiseMax(rhs)};
else return base().cwiseMax(rhs);
}
auto cwiseProduct(map const& rhs) const
{
if constexpr(!use_expression_templates) return concrete_type{parent::cwiseProduct(rhs.base())};
else return base().cwiseProduct(rhs.base());
}
auto cwiseQuotient(map const& rhs) const
{
if constexpr(!use_expression_templates) return concrete_type{parent::cwiseQuotient(rhs.base())};
else return base().cwiseQuotient(rhs.base());
}
auto cwiseAbs() const
{
if constexpr(!use_expression_templates) return concrete_type{parent::cwiseAbs()};