10 #ifndef EIGEN_SPARSE_DOT_H
11 #define EIGEN_SPARSE_DOT_H
15 template<
typename Derived>
16 template<
typename OtherDerived>
17 typename internal::traits<Derived>::Scalar
24 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
27 eigen_assert(other.size()>0 &&
"you are using a non initialized vector");
34 res += numext::conj(i.value()) * other.coeff(i.index());
40 template<
typename Derived>
41 template<
typename OtherDerived>
49 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
62 if (i.index()==j.index())
64 res += numext::conj(i.value()) * j.value();
67 else if (i.index()<j.index())
75 template<
typename Derived>
82 template<
typename Derived>
87 return sqrt(squaredNorm());
90 template<
typename Derived>
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Definition: ArrayCwiseUnaryOps.h:187
EIGEN_DEVICE_FUNC RealReturnType real() const
Definition: CommonCwiseUnaryOps.h:100
#define eigen_assert(x)
Definition: Macros.h:1037
#define EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(TYPE0, TYPE1)
Definition: StaticAssert.h:167
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:142
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:127
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:50
Base class of any sparse matrices or sparse expressions.
Definition: SparseMatrixBase.h:28
Index size() const
Definition: SparseMatrixBase.h:181
RealScalar blueNorm() const
Definition: SparseDot.h:92
internal::traits< Derived >::Scalar Scalar
Definition: SparseMatrixBase.h:31
Scalar dot(const MatrixBase< OtherDerived > &other) const
RealScalar squaredNorm() const
Definition: SparseDot.h:77
const Derived & derived() const
Definition: SparseMatrixBase.h:143
RealScalar norm() const
Definition: SparseDot.h:84
NumTraits< typename traits< Derived >::Scalar >::Real blueNorm_impl(const EigenBase< Derived > &_vec)
Definition: StableNorm.h:120
EIGEN_CONSTEXPR Index size(const T &x)
Definition: Meta.h:479
Namespace containing all symbols from the Eigen library.
Definition: LDLT.h:16
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:233
Definition: CoreEvaluators.h:91
Definition: ForwardDeclarations.h:17