parent
5d8a084070
commit
b6fcd4b341
34 changed files with 972 additions and 139 deletions
|
|
@ -39,7 +39,6 @@ namespace rotgen
|
|||
using value_type = typename std::remove_const_t<Ref>::value_type;
|
||||
using concrete_type = typename std::remove_const_t<Ref>::concrete_type;
|
||||
|
||||
static constexpr auto Flags = Ref::Flags;
|
||||
static constexpr Index RowsAtCompileTime = Ref::RowsAtCompileTime;
|
||||
static constexpr Index ColsAtCompileTime = Ref::ColsAtCompileTime;
|
||||
static constexpr bool IsVectorAtCompileTime = Ref::IsVectorAtCompileTime;
|
||||
|
|
@ -131,21 +130,24 @@ namespace rotgen
|
|||
value_type operator()(Index i) const requires(IsVectorAtCompileTime) { return base().data()[i]; }
|
||||
value_type operator[](Index i) const requires(IsVectorAtCompileTime) { return (*this)(i); }
|
||||
|
||||
map& operator+=(map const& rhs)
|
||||
template<typename R2, int O2, typename S2>
|
||||
map& operator+=(map<R2,O2,S2> const& rhs) requires(!is_immutable)
|
||||
{
|
||||
base() += rhs.base();
|
||||
return *this;
|
||||
}
|
||||
|
||||
map& operator-=(map const& rhs)
|
||||
template<typename R2, int O2, typename S2>
|
||||
map& operator-=(map<R2,O2,S2> const& rhs) requires(!is_immutable)
|
||||
{
|
||||
base() -= rhs.base();
|
||||
return *this;
|
||||
}
|
||||
|
||||
map& operator*=(map const& rhs)
|
||||
template<typename R2, int O2, typename S2>
|
||||
map& operator*=(map<R2,O2,S2> const& rhs) requires(!is_immutable)
|
||||
{
|
||||
base() *= rhs;
|
||||
base() *= rhs.base();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -221,6 +223,18 @@ namespace rotgen
|
|||
else return base().cwiseSqrt();
|
||||
}
|
||||
|
||||
auto cross(map const& rhs) const
|
||||
{
|
||||
if constexpr(!use_expression_templates) return concrete_type{parent::cross(rhs.base())};
|
||||
else return base().cross(rhs.base());
|
||||
}
|
||||
|
||||
auto inverse() const
|
||||
{
|
||||
if constexpr(use_expression_templates) return base().inverse();
|
||||
else return as_concrete_type<decltype(base().inverse())>(base().inverse());
|
||||
}
|
||||
|
||||
auto normalized() const requires(IsVectorAtCompileTime)
|
||||
{
|
||||
if constexpr(use_expression_templates) return base().normalized();
|
||||
|
|
@ -253,7 +267,7 @@ namespace rotgen
|
|||
void transposeInPlace() { base().transposeInPlace(); }
|
||||
void adjointInPlace() { base().adjointInPlace(); }
|
||||
|
||||
auto qr_solve(map const& rhs) const
|
||||
auto qr_solve(auto const& rhs) const
|
||||
{
|
||||
return concrete_type(base().colPivHouseholderQr().solve(rhs.base()));
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue