mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
big change: MatrixBase only takes one template parameter "Derived", the
template parameter "Scalar" is removed. This is achieved by introducting a template <typename Derived> struct Scalar to achieve a forward-declaration of the Scalar typedefs.
This commit is contained in:
@@ -9,9 +9,9 @@ struct CwiseMinOp EIGEN_EMPTY_STRUCT {
|
||||
};
|
||||
|
||||
// define a custom binary operator between two matrices
|
||||
template<typename Scalar, typename Derived1, typename Derived2>
|
||||
template<typename Derived1, typename Derived2>
|
||||
const Eigen::CwiseBinaryOp<CwiseMinOp, Derived1, Derived2>
|
||||
cwiseMin(const MatrixBase<Scalar, Derived1> &mat1, const MatrixBase<Scalar, Derived2> &mat2)
|
||||
cwiseMin(const MatrixBase<Derived1> &mat1, const MatrixBase<Derived2> &mat2)
|
||||
{
|
||||
return Eigen::CwiseBinaryOp<CwiseMinOp, Derived1, Derived2>(mat1.asArg(), mat2.asArg());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user