Home | History | Annotate | Download | only in doc

Lines Matching full:scalar_sum_op

134 CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>
175 const CwiseBinaryOp<internal::scalar_sum_op<typename internal::traits<Derived>::Scalar>, Derived, OtherDerived>
184 As we said, CwiseBinaryOp is also used for other operations such as substration, so it takes another template parameter determining the operation that will be applied to coefficients. This template parameter is a functor, that is, a class in which we have an operator() so it behaves like a function. Here, the functor used is internal::scalar_sum_op. It is defined in src/Core/Functors.h.
186 Let us now explain the internal::traits here. The internal::scalar_sum_op class takes one template parameter: the type of the numbers to handle. Here of course we want to pass the scalar type (a.k.a. numeric type) of VectorXf, which is \c float. How do we determine which is the scalar type of \a Derived ? Throughout Eigen, all matrix and expression types define a typedef \a Scalar which gives its scalar type. For example, VectorXf::Scalar is a typedef for \c float. So here, if life was easy, we could find the numeric type of \a Derived as just
202 const CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>
237 CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>
241 VectorXf& MatrixBase<VectorXf>::operator=(const MatrixBase<CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf> > & other);
456 CwiseBinaryOp<internal::scalar_sum_op<float>, VectorXf, VectorXf>
458 So m_functor is an object of the empty class internal::scalar_sum_op<float>. As we mentioned above, don't worry about why we constructed an object of this empty class at all -- it's an implementation detail, the point is that some other functors need to store member data.
460 Anyway, internal::scalar_sum_op is defined in src/Core/Functors.h:
462 template<typename Scalar> struct internal::scalar_sum_op EIGEN_EMPTY_STRUCT {