10 #ifndef EIGEN_SPARSE_DOT_H
11 #define EIGEN_SPARSE_DOT_H
17 template<
typename Derived>
18 template<
typename OtherDerived>
19 typename internal::traits<Derived>::Scalar
26 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
31 internal::evaluator<Derived> thisEval(derived());
32 typename internal::evaluator<Derived>::InnerIterator
i(thisEval, 0);
42 template<
typename Derived>
43 template<
typename OtherDerived>
44 typename internal::traits<Derived>::Scalar
51 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
55 internal::evaluator<Derived> thisEval(derived());
56 typename internal::evaluator<Derived>::InnerIterator
i(thisEval, 0);
58 internal::evaluator<OtherDerived> otherEval(other.
derived());
59 typename internal::evaluator<OtherDerived>::InnerIterator
j(otherEval, 0);
64 if (
i.index()==
j.index())
69 else if (
i.index()<
j.index())
77 template<
typename Derived>
84 template<
typename Derived>
89 return sqrt(squaredNorm());
92 template<
typename Derived>
const SqrtReturnType sqrt() const
RealReturnType real() const
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
#define EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(TYPE0, TYPE1)
#define EIGEN_STATIC_ASSERT(X, MSG)
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
CoeffReturnType coeff(Index row, Index col) const
Base class for all dense matrices, vectors, and expressions.
Base class of any sparse matrices or sparse expressions.
RealScalar blueNorm() const
internal::traits< Derived >::Scalar Scalar
Scalar dot(const MatrixBase< OtherDerived > &other) const
RealScalar squaredNorm() const
NumTraits< typename traits< Derived >::Scalar >::Real blueNorm_impl(const EigenBase< Derived > &_vec)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_conjugate_op< typename Derived::Scalar >, const Derived > conj(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sqrt_op< typename Derived::Scalar >, const Derived > sqrt(const Eigen::ArrayBase< Derived > &x)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.