mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
- Introduce aliasing system
- Remove operator<<, use .alias() instead - Introduce operator/ (scalar) - Cleanup, unit-tests update.
This commit is contained in:
@@ -116,6 +116,30 @@ operator *(typename Derived::Scalar scalar,
|
||||
return XprType(ProductType(matrix.constRef(), scalar));
|
||||
}
|
||||
|
||||
template<typename Content>
|
||||
const MatrixConstXpr<
|
||||
const ScalarProduct<
|
||||
MatrixConstXpr<Content>
|
||||
>
|
||||
>
|
||||
operator /(const MatrixConstXpr<Content>& xpr,
|
||||
typename Content::Scalar scalar)
|
||||
{
|
||||
return xpr * (static_cast<typename Content::Scalar>(1) / scalar);
|
||||
}
|
||||
|
||||
template<typename Derived>
|
||||
const MatrixConstXpr<
|
||||
const ScalarProduct<
|
||||
MatrixConstRef<MatrixBase<Derived> >
|
||||
>
|
||||
>
|
||||
operator /(const MatrixBase<Derived>& matrix,
|
||||
typename Derived::Scalar scalar)
|
||||
{
|
||||
return matrix * (static_cast<typename Derived::Scalar>(1) / scalar);
|
||||
}
|
||||
|
||||
} // namespace Eigen
|
||||
|
||||
#endif // EIGEN_SCALAROPS_H
|
||||
|
||||
Reference in New Issue
Block a user