11#ifndef EIGEN_TENSOR_TENSOR_BASE_H
12#define EIGEN_TENSOR_TENSOR_BASE_H
17#include "./InternalHeaderCheck.h"
24template <
typename OtherScalar,
typename Scalar>
25struct is_scalar_operand
26 : bool_constant<std::is_same<typename std::remove_cv<OtherScalar>::type,
27 typename std::remove_cv<Scalar>::type>::value ||
28 ((std::is_arithmetic<OtherScalar>::value || std::is_enum<OtherScalar>::value) &&
29 std::is_convertible<OtherScalar, Scalar>::value)> {};
40#ifndef EIGEN_PARSED_BY_DOXYGEN
43template<
typename Derived>
47 typedef internal::traits<Derived> DerivedTraits;
48 typedef typename DerivedTraits::Scalar Scalar;
49 typedef typename DerivedTraits::Index Index;
50 typedef std::remove_const_t<Scalar> CoeffReturnType;
51 static constexpr int NumDimensions = DerivedTraits::NumDimensions;
54 template <
typename CustomNullaryOp> EIGEN_DEVICE_FUNC
55 EIGEN_STRONG_INLINE
const TensorCwiseNullaryOp<CustomNullaryOp, const Derived>
56 nullaryExpr(
const CustomNullaryOp& func)
const {
57 return TensorCwiseNullaryOp<CustomNullaryOp, const Derived>(derived(), func);
62 EIGEN_STRONG_INLINE
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived>
63 constant(
const Scalar& value)
const {
64 return nullaryExpr(internal::scalar_constant_op<Scalar>(value));
68 EIGEN_STRONG_INLINE
const TensorCwiseNullaryOp<internal::UniformRandomGenerator<Scalar>,
const Derived>
70 return nullaryExpr(internal::UniformRandomGenerator<Scalar>());
72 template <
typename RandomGenerator> EIGEN_DEVICE_FUNC
73 EIGEN_STRONG_INLINE
const TensorCwiseNullaryOp<RandomGenerator, const Derived>
74 random(
const RandomGenerator& gen = RandomGenerator())
const {
75 return nullaryExpr(gen);
79 template <
typename Generator> EIGEN_DEVICE_FUNC
80 EIGEN_STRONG_INLINE
const TensorGeneratorOp<Generator, const Derived>
81 generate(
const Generator& generator)
const {
82 return TensorGeneratorOp<Generator, const Derived>(derived(), generator);
86 template <
typename CustomUnaryOp> EIGEN_DEVICE_FUNC
87 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<CustomUnaryOp, const Derived>
88 unaryExpr(
const CustomUnaryOp& func)
const {
89 return TensorCwiseUnaryOp<CustomUnaryOp, const Derived>(derived(), func);
94 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_opposite_op<Scalar>,
const Derived>
96 return unaryExpr(internal::scalar_opposite_op<Scalar>());
100 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_sqrt_op<Scalar>,
const Derived>
102 return unaryExpr(internal::scalar_sqrt_op<Scalar>());
106 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_sign_op<Scalar>,
const Derived>
108 return unaryExpr(internal::scalar_sign_op<Scalar>());
112 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_rsqrt_op<Scalar>,
const Derived>
114 return unaryExpr(internal::scalar_rsqrt_op<Scalar>());
118 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_square_op<Scalar>,
const Derived>
120 return unaryExpr(internal::scalar_square_op<Scalar>());
124 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_cube_op<Scalar>,
const Derived>
126 return unaryExpr(internal::scalar_cube_op<Scalar>());
130 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_inverse_op<Scalar>,
const Derived>
132 return unaryExpr(internal::scalar_inverse_op<Scalar>());
136 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_tanh_op<Scalar>,
const Derived>
138 return unaryExpr(internal::scalar_tanh_op<Scalar>());
142 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_lgamma_op<Scalar>,
const Derived>
144 return unaryExpr(internal::scalar_lgamma_op<Scalar>());
148 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_digamma_op<Scalar>,
const Derived>
150 return unaryExpr(internal::scalar_digamma_op<Scalar>());
154 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_i0_op<Scalar>,
const Derived>
156 return unaryExpr(internal::scalar_bessel_i0_op<Scalar>());
160 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_i0e_op<Scalar>,
const Derived>
162 return unaryExpr(internal::scalar_bessel_i0e_op<Scalar>());
166 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_i1_op<Scalar>,
const Derived>
168 return unaryExpr(internal::scalar_bessel_i1_op<Scalar>());
172 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_i1e_op<Scalar>,
const Derived>
174 return unaryExpr(internal::scalar_bessel_i1e_op<Scalar>());
178 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_j0_op<Scalar>,
const Derived>
180 return unaryExpr(internal::scalar_bessel_j0_op<Scalar>());
184 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_y0_op<Scalar>,
const Derived>
186 return unaryExpr(internal::scalar_bessel_y0_op<Scalar>());
190 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_j1_op<Scalar>,
const Derived>
192 return unaryExpr(internal::scalar_bessel_j1_op<Scalar>());
196 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_y1_op<Scalar>,
const Derived>
198 return unaryExpr(internal::scalar_bessel_y1_op<Scalar>());
202 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_k0_op<Scalar>,
const Derived>
204 return unaryExpr(internal::scalar_bessel_k0_op<Scalar>());
208 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_k0e_op<Scalar>,
const Derived>
210 return unaryExpr(internal::scalar_bessel_k0e_op<Scalar>());
214 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_k1_op<Scalar>,
const Derived>
216 return unaryExpr(internal::scalar_bessel_k1_op<Scalar>());
220 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_k1e_op<Scalar>,
const Derived>
222 return unaryExpr(internal::scalar_bessel_k1e_op<Scalar>());
226 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
227 const TensorCwiseBinaryOp<internal::scalar_igamma_op<Scalar>,
const Derived,
const OtherDerived>
228 igamma(
const OtherDerived& other)
const {
229 return binaryExpr(other.derived(), internal::scalar_igamma_op<Scalar>());
233 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
234 const TensorCwiseBinaryOp<internal::scalar_igamma_der_a_op<Scalar>,
const Derived,
const OtherDerived>
236 return binaryExpr(other.derived(), internal::scalar_igamma_der_a_op<Scalar>());
240 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
241 const TensorCwiseBinaryOp<internal::scalar_gamma_sample_der_alpha_op<Scalar>,
const Derived,
const OtherDerived>
243 return binaryExpr(other.derived(), internal::scalar_gamma_sample_der_alpha_op<Scalar>());
247 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
248 const TensorCwiseBinaryOp<internal::scalar_igammac_op<Scalar>,
const Derived,
const OtherDerived>
249 igammac(
const OtherDerived& other)
const {
250 return binaryExpr(other.derived(), internal::scalar_igammac_op<Scalar>());
254 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
255 const TensorCwiseBinaryOp<internal::scalar_zeta_op<Scalar>,
const Derived,
const OtherDerived>
256 zeta(
const OtherDerived& other)
const {
257 return binaryExpr(other.derived(), internal::scalar_zeta_op<Scalar>());
261 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
262 const TensorCwiseBinaryOp<internal::scalar_polygamma_op<Scalar>,
const Derived,
const OtherDerived>
263 polygamma(
const OtherDerived& other)
const {
264 return binaryExpr(other.derived(), internal::scalar_polygamma_op<Scalar>());
268 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_erf_op<Scalar>,
const Derived>
270 return unaryExpr(internal::scalar_erf_op<Scalar>());
274 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_erfc_op<Scalar>,
const Derived>
276 return unaryExpr(internal::scalar_erfc_op<Scalar>());
280 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_ndtri_op<Scalar>,
const Derived>
282 return unaryExpr(internal::scalar_ndtri_op<Scalar>());
286 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_logistic_op<Scalar>,
const Derived>
288 return unaryExpr(internal::scalar_logistic_op<Scalar>());
292 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_exp_op<Scalar>,
const Derived>
294 return unaryExpr(internal::scalar_exp_op<Scalar>());
298 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_expm1_op<Scalar>,
const Derived>
300 return unaryExpr(internal::scalar_expm1_op<Scalar>());
304 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_log_op<Scalar>,
const Derived>
306 return unaryExpr(internal::scalar_log_op<Scalar>());
310 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_log1p_op<Scalar>,
const Derived>
312 return unaryExpr(internal::scalar_log1p_op<Scalar>());
316 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_log2_op<Scalar>,
const Derived>
318 return unaryExpr(internal::scalar_log2_op<Scalar>());
322 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_abs_op<Scalar>,
const Derived>
324 return unaryExpr(internal::scalar_abs_op<Scalar>());
328 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_arg_op<Scalar>,
const Derived>
330 return unaryExpr(internal::scalar_arg_op<Scalar>());
334 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_clamp_op<Scalar>,
const Derived>
335 clip(Scalar min, Scalar max)
const {
336 return unaryExpr(internal::scalar_clamp_op<Scalar>(min, max));
340 EIGEN_STRONG_INLINE
const std::conditional_t<NumTraits<CoeffReturnType>::IsComplex,
341 TensorCwiseUnaryOp<internal::scalar_conjugate_op<Scalar>,
const Derived>,
344 return choose(Cond<NumTraits<CoeffReturnType>::IsComplex>(), unaryExpr(internal::scalar_conjugate_op<Scalar>()), derived());
347 template<
typename ScalarExponent>
348 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const std::enable_if_t<internal::is_arithmetic<typename NumTraits<ScalarExponent>::Real>::value,
349 TensorCwiseUnaryOp<internal::scalar_unary_pow_op<Scalar, ScalarExponent>,
const Derived>>
350 pow(ScalarExponent exponent)
const
352 return unaryExpr(internal::scalar_unary_pow_op<Scalar, ScalarExponent>(exponent));
356 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_real_op<Scalar>,
const Derived>
358 return unaryExpr(internal::scalar_real_op<Scalar>());
362 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_imag_op<Scalar>,
const Derived>
364 return unaryExpr(internal::scalar_imag_op<Scalar>());
368 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_sum_op<Scalar,Scalar> >,
const Derived>
369 operator+ (Scalar rhs)
const {
370 return unaryExpr(internal::bind2nd_op<internal::scalar_sum_op<Scalar,Scalar> >(rhs));
374 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_difference_op<Scalar,Scalar> >,
const Derived>
375 operator- (Scalar rhs)
const {
376 EIGEN_STATIC_ASSERT((NumTraits<Scalar>::IsSigned || std::is_same<Scalar,
const std::complex<float> >::value), YOU_MADE_A_PROGRAMMING_MISTAKE);
377 return unaryExpr(internal::bind2nd_op<internal::scalar_difference_op<Scalar,Scalar> >(rhs));
381 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_product_op<Scalar,Scalar> >,
const Derived>
382 operator* (Scalar rhs)
const {
383 return unaryExpr(internal::bind2nd_op<internal::scalar_product_op<Scalar,Scalar> >(rhs));
387 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_quotient_op<Scalar,Scalar> >,
const Derived>
388 operator/ (Scalar rhs)
const {
389 return unaryExpr(internal::bind2nd_op<internal::scalar_quotient_op<Scalar,Scalar> >(rhs));
393 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_mod_op<Scalar>,
const Derived>
394 operator% (Scalar rhs)
const {
395 EIGEN_STATIC_ASSERT(NumTraits<Scalar>::IsInteger, YOU_MADE_A_PROGRAMMING_MISTAKE_TRY_MOD);
396 return unaryExpr(internal::scalar_mod_op<Scalar>(rhs));
399 template <
typename OtherScalar, EIGEN_SFINAE_ENABLE_IF((
internal::is_scalar_operand<OtherScalar, Scalar>::value))>
401 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_mod_op<Scalar>,
const Derived>
402 operator% (OtherScalar rhs)
const {
403 return operator%(
static_cast<Scalar
>(rhs));
406 template <
int NanPropagation=PropagateFast>
408 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar,NanPropagation>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
409 cwiseMax(Scalar threshold)
const {
410 return cwiseMax<NanPropagation>(constant(threshold));
413 template <
int NanPropagation=PropagateFast>
415 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar,NanPropagation>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
416 cwiseMin(Scalar threshold)
const {
417 return cwiseMin<NanPropagation>(constant(threshold));
420 template<
typename NewType>
422 EIGEN_STRONG_INLINE
const std::conditional_t<std::is_same<NewType, CoeffReturnType>::value,
424 TensorConversionOp<NewType, const Derived> >
426 return choose(Cond<std::is_same<NewType, CoeffReturnType>::value>(), derived(), TensorConversionOp<NewType, const Derived>(derived()));
430 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_round_op<Scalar>,
const Derived>
432 return unaryExpr(internal::scalar_round_op<Scalar>());
436 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_rint_op<Scalar>,
const Derived>
438 return unaryExpr(internal::scalar_rint_op<Scalar>());
442 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_ceil_op<Scalar>,
const Derived>
444 return unaryExpr(internal::scalar_ceil_op<Scalar>());
448 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_floor_op<Scalar>,
const Derived>
450 return unaryExpr(internal::scalar_floor_op<Scalar>());
454 template <
typename CustomBinaryOp,
typename OtherDerived> EIGEN_DEVICE_FUNC
455 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>
456 binaryExpr(
const OtherDerived& other,
const CustomBinaryOp& func)
const {
457 return TensorCwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>(derived(), other, func);
463 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
464 const TensorCwiseBinaryOp<internal::scalar_sum_op<Scalar>,
const Derived,
const OtherDerived>
465 operator+(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
466 return binaryExpr(other.derived(), internal::scalar_sum_op<Scalar>());
469 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
470 const TensorCwiseBinaryOp<internal::scalar_difference_op<Scalar>,
const Derived,
const OtherDerived>
471 operator-(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
472 return binaryExpr(other.derived(), internal::scalar_difference_op<Scalar>());
475 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
476 const TensorCwiseBinaryOp<internal::scalar_product_op<Scalar>,
const Derived,
const OtherDerived>
477 operator*(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
478 return binaryExpr(other.derived(), internal::scalar_product_op<Scalar>());
481 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
482 const TensorCwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>
483 operator/(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
484 return binaryExpr(other.derived(), internal::scalar_quotient_op<Scalar>());
487 template<
int NaNPropagation=PropagateFast,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
488 const TensorCwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar, NaNPropagation>,
const Derived,
const OtherDerived>
489 cwiseMax(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
490 return binaryExpr(other.derived(), internal::scalar_max_op<Scalar,Scalar, NaNPropagation>());
493 template<
int NaNPropagation=PropagateFast,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
494 const TensorCwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar, NaNPropagation>,
const Derived,
const OtherDerived>
495 cwiseMin(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
496 return binaryExpr(other.derived(), internal::scalar_min_op<Scalar,Scalar, NaNPropagation>());
500 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
501 const TensorCwiseBinaryOp<internal::scalar_boolean_and_op<Scalar>,
const Derived,
const OtherDerived>
502 operator&&(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
503 return binaryExpr(other.derived(), internal::scalar_boolean_and_op<Scalar>());
506 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
507 const TensorCwiseBinaryOp<internal::scalar_boolean_or_op<Scalar>,
const Derived,
const OtherDerived>
508 operator||(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
509 return binaryExpr(other.derived(), internal::scalar_boolean_or_op<Scalar>());
512 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
513 const TensorCwiseBinaryOp<internal::scalar_bitwise_and_op<Scalar>,
const Derived,
const OtherDerived>
514 operator&(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
515 return binaryExpr(other.derived(), internal::scalar_bitwise_and_op<Scalar>());
518 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
519 const TensorCwiseBinaryOp<internal::scalar_bitwise_or_op<Scalar>,
const Derived,
const OtherDerived>
520 operator|(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
521 return binaryExpr(other.derived(), internal::scalar_bitwise_or_op<Scalar>());
524 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
525 const TensorCwiseBinaryOp<internal::scalar_bitwise_xor_op<Scalar>,
const Derived,
const OtherDerived>
526 operator^(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
527 return binaryExpr(other.derived(), internal::scalar_bitwise_xor_op<Scalar>());
530 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
531 const TensorCwiseUnaryOp<internal::scalar_boolean_not_op<Scalar>,
const Derived>
533 return unaryExpr(internal::scalar_boolean_not_op<Scalar>());
536 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
537 const TensorCwiseUnaryOp<internal::scalar_bitwise_not_op<Scalar>,
const Derived>
539 return unaryExpr(internal::scalar_bitwise_not_op<Scalar>());
543 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
544 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>,
const Derived,
const OtherDerived>
545 operator<(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
546 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>());
548 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
549 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>,
const Derived,
const OtherDerived>
550 operator<=(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
551 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>());
553 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
554 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>,
const Derived,
const OtherDerived>
555 operator>(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
556 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>());
558 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
559 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>,
const Derived,
const OtherDerived>
560 operator>=(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
561 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>());
564 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
565 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>,
const Derived,
const OtherDerived>
566 operator==(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
567 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>());
570 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
571 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>,
const Derived,
const OtherDerived>
572 operator!=(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
573 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>());
578 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
579 operator<(Scalar threshold)
const {
580 return operator<(constant(threshold));
583 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
584 operator<=(Scalar threshold)
const {
585 return operator<=(constant(threshold));
588 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
589 operator>(Scalar threshold)
const {
590 return operator>(constant(threshold));
593 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
594 operator>=(Scalar threshold)
const {
595 return operator>=(constant(threshold));
598 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
599 operator==(Scalar threshold)
const {
600 return operator==(constant(threshold));
603 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
604 operator!=(Scalar threshold)
const {
605 return operator!=(constant(threshold));
609#define EIGEN_FORWARD_SCALAR_CMP(op, tag) \
610 template <typename OtherScalar, EIGEN_SFINAE_ENABLE_IF((internal::is_scalar_operand<OtherScalar, Scalar>::value))> \
611 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const \
612 TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_##tag>, const Derived, \
613 const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>, const Derived> > \
614 op(OtherScalar threshold) const { \
615 return op(static_cast<Scalar>(threshold)); \
617 EIGEN_FORWARD_SCALAR_CMP(
operator<, LT)
618 EIGEN_FORWARD_SCALAR_CMP(
operator<=, LE)
619 EIGEN_FORWARD_SCALAR_CMP(
operator>, GT)
620 EIGEN_FORWARD_SCALAR_CMP(
operator>=, GE)
621 EIGEN_FORWARD_SCALAR_CMP(
operator==, EQ)
622 EIGEN_FORWARD_SCALAR_CMP(
operator!=, NEQ)
623#undef EIGEN_FORWARD_SCALAR_CMP
627 EIGEN_STRONG_INLINE
const TensorConversionOp<bool, const TensorCwiseUnaryOp<internal::scalar_isnan_op<Scalar, true>,
const Derived>>
629 return unaryExpr(internal::scalar_isnan_op<Scalar, true>()).template cast<bool>();
632 EIGEN_STRONG_INLINE
const TensorConversionOp<bool, const TensorCwiseUnaryOp<internal::scalar_isinf_op<Scalar, true>,
const Derived>>
634 return unaryExpr(internal::scalar_isinf_op<Scalar, true>()).template cast<bool>();
637 EIGEN_STRONG_INLINE
const TensorConversionOp<bool, const TensorCwiseUnaryOp<internal::scalar_isfinite_op<Scalar, true>,
const Derived>>
639 return unaryExpr(internal::scalar_isfinite_op<Scalar, true>()).template cast<bool>();
643 template<
typename ThenDerived,
typename ElseDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
644 const TensorSelectOp<const Derived, const ThenDerived, const ElseDerived>
645 select(
const ThenDerived& thenTensor,
const ElseDerived& elseTensor)
const {
646 return TensorSelectOp<const Derived, const ThenDerived, const ElseDerived>(derived(), thenTensor.derived(), elseTensor.derived());
650 typedef Eigen::IndexPair<Index> DimensionPair;
652 template<
typename OtherDerived,
typename Dimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
653 const TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const NoOpOutputKernel>
654 contract(
const OtherDerived& other,
const Dimensions& dims)
const {
655 return TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const NoOpOutputKernel>(derived(), other.derived(), dims);
658 template<
typename OtherDerived,
typename Dimensions,
typename OutputKernel> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
659 const TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const OutputKernel>
660 contract(
const OtherDerived& other,
const Dimensions& dims,
const OutputKernel& output_kernel)
const {
661 return TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const OutputKernel>(derived(), other.derived(), dims, output_kernel);
665 template<
typename KernelDerived,
typename Dimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
666 const TensorConvolutionOp<const Dimensions, const Derived, const KernelDerived>
667 convolve(
const KernelDerived& kernel,
const Dimensions& dims)
const {
668 return TensorConvolutionOp<const Dimensions, const Derived, const KernelDerived>(derived(), kernel.derived(), dims);
672 template <
int FFTDataType,
int FFTDirection,
typename FFT> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
673 const TensorFFTOp<const FFT, const Derived, FFTDataType, FFTDirection>
674 fft(
const FFT& dims)
const {
675 return TensorFFTOp<const FFT, const Derived, FFTDataType, FFTDirection>(derived(), dims);
679 typedef TensorScanOp<internal::SumReducer<CoeffReturnType>,
const Derived> TensorScanSumOp;
680 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
681 const TensorScanSumOp
682 cumsum(
const Index& axis,
bool exclusive =
false)
const {
683 return TensorScanSumOp(derived(), axis, exclusive);
686 typedef TensorScanOp<internal::ProdReducer<CoeffReturnType>,
const Derived> TensorScanProdOp;
687 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
688 const TensorScanProdOp
689 cumprod(
const Index& axis,
bool exclusive =
false)
const {
690 return TensorScanProdOp(derived(), axis, exclusive);
693 template <
typename Reducer>
694 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
695 const TensorScanOp<Reducer, const Derived>
696 scan(
const Index& axis,
const Reducer& reducer,
bool exclusive =
false)
const {
697 return TensorScanOp<Reducer, const Derived>(derived(), axis, exclusive, reducer);
701 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
702 const TensorReductionOp<internal::SumReducer<CoeffReturnType>,
const Dims,
const Derived>
703 sum(
const Dims& dims)
const {
704 return TensorReductionOp<internal::SumReducer<CoeffReturnType>,
const Dims,
const Derived>(derived(), dims, internal::SumReducer<CoeffReturnType>());
707 const TensorReductionOp<internal::SumReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
709 DimensionList<Index, NumDimensions> in_dims;
710 return TensorReductionOp<internal::SumReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims, internal::SumReducer<CoeffReturnType>());
713 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
714 const TensorReductionOp<internal::MeanReducer<CoeffReturnType>,
const Dims,
const Derived>
715 mean(
const Dims& dims)
const {
716 return TensorReductionOp<internal::MeanReducer<CoeffReturnType>,
const Dims,
const Derived>(derived(), dims, internal::MeanReducer<CoeffReturnType>());
719 const TensorReductionOp<internal::MeanReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
721 DimensionList<Index, NumDimensions> in_dims;
722 return TensorReductionOp<internal::MeanReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims, internal::MeanReducer<CoeffReturnType>());
725 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
726 const TensorReductionOp<internal::ProdReducer<CoeffReturnType>,
const Dims,
const Derived>
727 prod(
const Dims& dims)
const {
728 return TensorReductionOp<internal::ProdReducer<CoeffReturnType>,
const Dims,
const Derived>(derived(), dims, internal::ProdReducer<CoeffReturnType>());
731 const TensorReductionOp<internal::ProdReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
733 DimensionList<Index, NumDimensions> in_dims;
734 return TensorReductionOp<internal::ProdReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims, internal::ProdReducer<CoeffReturnType>());
737 template <
typename Dims,
int NanPropagation=PropagateFast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
738 const TensorReductionOp<internal::MaxReducer<CoeffReturnType,NanPropagation>,
const Dims,
const Derived>
739 maximum(
const Dims& dims)
const {
740 return TensorReductionOp<internal::MaxReducer<CoeffReturnType,NanPropagation>,
const Dims,
const Derived>(derived(), dims, internal::MaxReducer<CoeffReturnType,NanPropagation>());
743 template <
int NanPropagation=PropagateFast>
744 const TensorReductionOp<internal::MaxReducer<CoeffReturnType,NanPropagation>,
const DimensionList<Index, NumDimensions>,
const Derived>
746 DimensionList<Index, NumDimensions> in_dims;
747 return TensorReductionOp<internal::MaxReducer<CoeffReturnType,NanPropagation>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims, internal::MaxReducer<CoeffReturnType,NanPropagation>());
750 template <
typename Dims,
int NanPropagation=PropagateFast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
751 const TensorReductionOp<internal::MinReducer<CoeffReturnType,NanPropagation>,
const Dims,
const Derived>
752 minimum(
const Dims& dims)
const {
753 return TensorReductionOp<internal::MinReducer<CoeffReturnType,NanPropagation>,
const Dims,
const Derived>(derived(), dims, internal::MinReducer<CoeffReturnType,NanPropagation>());
756 template <
int NanPropagation=PropagateFast>
757 const TensorReductionOp<internal::MinReducer<CoeffReturnType,NanPropagation>,
const DimensionList<Index, NumDimensions>,
const Derived>
759 DimensionList<Index, NumDimensions> in_dims;
760 return TensorReductionOp<internal::MinReducer<CoeffReturnType,NanPropagation>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims, internal::MinReducer<CoeffReturnType,NanPropagation>());
763 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
764 const TensorReductionOp<internal::AndReducer, const Dims, const std::conditional_t<std::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> > >
765 all(
const Dims& dims)
const {
766 return cast<bool>().reduce(dims, internal::AndReducer());
769 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
770 const TensorReductionOp<internal::AndReducer, const DimensionList<Index, NumDimensions>,
const std::conditional_t<std::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> > >
772 DimensionList<Index, NumDimensions> in_dims;
773 return cast<bool>().reduce(in_dims, internal::AndReducer());
776 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
777 const TensorReductionOp<internal::OrReducer, const Dims, const std::conditional_t<std::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> > >
778 any(
const Dims& dims)
const {
779 return cast<bool>().reduce(dims, internal::OrReducer());
782 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
783 const TensorReductionOp<internal::OrReducer, const DimensionList<Index, NumDimensions>,
const std::conditional_t<std::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> > >
785 DimensionList<Index, NumDimensions> in_dims;
786 return cast<bool>().reduce(in_dims, internal::OrReducer());
789 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
790 const TensorPairReducerOp<
791 internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >,
792 const array<Index, NumDimensions>,
const Derived>
794 array<Index, NumDimensions> in_dims;
795 for (Index d = 0; d < NumDimensions; ++d) in_dims[d] = d;
796 return TensorPairReducerOp<
797 internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >,
798 const array<Index, NumDimensions>,
799 const Derived>(derived(), internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >(), -1, in_dims);
802 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
803 const TensorPairReducerOp<
804 internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >,
805 const array<Index, NumDimensions>,
const Derived>
807 array<Index, NumDimensions> in_dims;
808 for (Index d = 0; d < NumDimensions; ++d) in_dims[d] = d;
809 return TensorPairReducerOp<
810 internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >,
811 const array<Index, NumDimensions>,
812 const Derived>(derived(), internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >(), -1, in_dims);
815 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
816 const TensorPairReducerOp<
817 internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >,
818 const array<Index, 1>,
const Derived>
819 argmax(
const Index return_dim)
const {
820 array<Index, 1> in_dims;
821 in_dims[0] = return_dim;
822 return TensorPairReducerOp<
823 internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >,
824 const array<Index, 1>,
825 const Derived>(derived(), internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >(), return_dim, in_dims);
828 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
829 const TensorPairReducerOp<
830 internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >,
831 const array<Index, 1>,
const Derived>
832 argmin(
const Index return_dim)
const {
833 array<Index, 1> in_dims;
834 in_dims[0] = return_dim;
835 return TensorPairReducerOp<
836 internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >,
837 const array<Index, 1>,
838 const Derived>(derived(), internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >(), return_dim, in_dims);
841 template <
typename Reducer,
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
842 const TensorReductionOp<Reducer, const Dims, const Derived>
843 reduce(
const Dims& dims,
const Reducer& reducer)
const {
844 return TensorReductionOp<Reducer, const Dims, const Derived>(derived(), dims, reducer);
847 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
848 const TensorTraceOp<const Dims, const Derived>
849 trace(
const Dims& dims)
const {
850 return TensorTraceOp<const Dims, const Derived>(derived(), dims);
853 const TensorTraceOp<const DimensionList<Index, NumDimensions>,
const Derived>
855 DimensionList<Index, NumDimensions> in_dims;
856 return TensorTraceOp<const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims);
859 template <
typename Broadcast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
860 const TensorBroadcastingOp<const Broadcast, const Derived>
861 broadcast(
const Broadcast& bcast)
const {
862 return TensorBroadcastingOp<const Broadcast, const Derived>(derived(), bcast);
865 template <
typename Axis,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
866 const TensorConcatenationOp<Axis, const Derived, const OtherDerived>
867 concatenate(
const OtherDerived& other, Axis axis)
const {
868 return TensorConcatenationOp<Axis, const Derived, const OtherDerived>(derived(), other.derived(), axis);
871 template <
typename PatchDims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
872 const TensorPatchOp<const PatchDims, const Derived>
873 extract_patches(
const PatchDims& patch_dims)
const {
874 return TensorPatchOp<const PatchDims, const Derived>(derived(), patch_dims);
877 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
878 const TensorImagePatchOp<Dynamic, Dynamic, const Derived>
879 extract_image_patches(
const Index patch_rows = 1,
const Index patch_cols = 1,
880 const Index row_stride = 1,
const Index col_stride = 1,
881 const Index in_row_stride = 1,
const Index in_col_stride = 1,
882 const PaddingType padding_type = PADDING_SAME,
const Scalar padding_value = Scalar(0))
const {
883 return TensorImagePatchOp<Dynamic, Dynamic, const Derived>(derived(), patch_rows, patch_cols, row_stride, col_stride,
884 in_row_stride, in_col_stride, 1, 1, padding_type, padding_value);
887 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
888 const TensorImagePatchOp<Dynamic, Dynamic, const Derived>
889 extract_image_patches(
const Index patch_rows,
const Index patch_cols,
890 const Index row_stride,
const Index col_stride,
891 const Index in_row_stride,
const Index in_col_stride,
892 const Index row_inflate_stride,
const Index col_inflate_stride,
893 const Index padding_top,
const Index padding_bottom,
894 const Index padding_left,
const Index padding_right,
895 const Scalar padding_value)
const {
896 return TensorImagePatchOp<Dynamic, Dynamic, const Derived>(derived(), patch_rows, patch_cols, row_stride, col_stride,
897 in_row_stride, in_col_stride, row_inflate_stride, col_inflate_stride,
898 padding_top, padding_bottom, padding_left, padding_right, padding_value);
901 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
902 const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>
903 extract_volume_patches(
const Index patch_planes,
const Index patch_rows,
const Index patch_cols,
904 const Index plane_stride = 1,
const Index row_stride = 1,
const Index col_stride = 1,
905 const PaddingType padding_type = PADDING_SAME,
const Scalar padding_value = Scalar(0))
const {
906 return TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>(derived(), patch_planes, patch_rows, patch_cols, plane_stride, row_stride, col_stride, 1, 1, 1, 1, 1, 1, padding_type, padding_value);
910 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
911 const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>
912 extract_volume_patches(
const Index patch_planes,
const Index patch_rows,
const Index patch_cols,
913 const Index plane_stride,
const Index row_stride,
const Index col_stride,
914 const Index plane_inflate_stride,
const Index row_inflate_stride,
const Index col_inflate_stride,
915 const Index padding_top_z,
const Index padding_bottom_z,
916 const Index padding_top,
const Index padding_bottom,
917 const Index padding_left,
const Index padding_right,
const Scalar padding_value = Scalar(0))
const {
918 return TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>(derived(), patch_planes, patch_rows, patch_cols, plane_stride, row_stride, col_stride, 1, 1, 1, plane_inflate_stride, row_inflate_stride, col_inflate_stride, padding_top_z, padding_bottom_z, padding_top, padding_bottom, padding_left, padding_right, padding_value);
922 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
923 const TensorLayoutSwapOp<const Derived>
924 swap_layout()
const {
925 return TensorLayoutSwapOp<const Derived>(derived());
927 template <
typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
928 const TensorReshapingOp<const NewDimensions, const Derived>
929 reshape(
const NewDimensions& newDimensions)
const {
930 return TensorReshapingOp<const NewDimensions, const Derived>(derived(), newDimensions);
932 template <
typename StartIndices,
typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
933 const TensorSlicingOp<const StartIndices, const Sizes, const Derived>
934 slice(
const StartIndices& startIndices,
const Sizes& sizes)
const {
935 return TensorSlicingOp<const StartIndices, const Sizes, const Derived>(derived(), startIndices, sizes);
937 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
938 const TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides, const Derived>
939 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides)
const {
940 return TensorStridingSlicingOp<
const StartIndices,
const StopIndices,
const Strides,
941 const Derived>(derived(), startIndices, stopIndices, strides);
943 template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
944 const TensorChippingOp<DimId, const Derived>
945 chip(
const Index offset)
const {
946 EIGEN_STATIC_ASSERT(DimId < Derived::NumDimensions && DimId >= 0, Chip_Dim_out_of_range)
947 return TensorChippingOp<DimId, const Derived>(derived(), offset, DimId);
949 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
950 const TensorChippingOp<Dynamic, const Derived>
951 chip(
const Index offset,
const Index dim)
const {
952 return TensorChippingOp<Dynamic, const Derived>(derived(), offset, dim);
954 template <
typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
955 const TensorReverseOp<const ReverseDimensions, const Derived>
956 reverse(
const ReverseDimensions& rev)
const {
957 return TensorReverseOp<const ReverseDimensions, const Derived>(derived(), rev);
959 template <
typename Rolls> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
960 const TensorRollOp<const Rolls, const Derived>
961 roll(
const Rolls& rolls)
const {
962 return TensorRollOp<const Rolls, const Derived>(derived(), rolls);
964 template <
typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
965 const TensorPaddingOp<const PaddingDimensions, const Derived>
966 pad(
const PaddingDimensions& padding)
const {
967 return TensorPaddingOp<const PaddingDimensions, const Derived>(derived(), padding, internal::scalar_cast_op<int, Scalar>()(0));
969 template <
typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
970 const TensorPaddingOp<const PaddingDimensions, const Derived>
971 pad(
const PaddingDimensions& padding,
const Scalar padding_value)
const {
972 return TensorPaddingOp<const PaddingDimensions, const Derived>(derived(), padding, padding_value);
974 template <
typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
975 const TensorShufflingOp<const Shuffle, const Derived>
976 shuffle(
const Shuffle& shfl)
const {
977 return TensorShufflingOp<const Shuffle, const Derived>(derived(), shfl);
979 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
980 const TensorStridingOp<const Strides, const Derived>
981 stride(
const Strides& strides)
const {
982 return TensorStridingOp<const Strides, const Derived>(derived(), strides);
984 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
985 const TensorInflationOp<const Strides, const Derived>
986 inflate(
const Strides& strides)
const {
987 return TensorInflationOp<const Strides, const Derived>(derived(), strides);
991 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
992 const TensorIndexPairOp<const Derived>
993 index_pairs()
const {
994 return TensorIndexPairOp<const Derived>(derived());
998 template <
typename CustomUnaryFunc>
999 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1000 const TensorCustomUnaryOp<const CustomUnaryFunc, const Derived> customOp(
const CustomUnaryFunc& op)
const {
1001 return TensorCustomUnaryOp<const CustomUnaryFunc, const Derived>(derived(), op);
1003 template <
typename OtherDerived,
typename CustomBinaryFunc>
1004 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1005 const TensorCustomBinaryOp<const CustomBinaryFunc, const Derived, const OtherDerived> customOp(
const OtherDerived& other,
const CustomBinaryFunc& op)
const {
1006 return TensorCustomBinaryOp<const CustomBinaryFunc, const Derived, const OtherDerived>(derived(), other, op);
1010 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1011 const TensorForcedEvalOp<const Derived> eval()
const {
1012 return TensorForcedEvalOp<const Derived>(derived());
1016 template<
typename Format>
1017 inline const TensorWithFormat<Derived,DerivedTraits::Layout,DerivedTraits::NumDimensions, Format> format(
const Format& fmt)
const {
1018 return TensorWithFormat<Derived,DerivedTraits::Layout,DerivedTraits::NumDimensions, Format>(derived(), fmt);
1021 #ifdef EIGEN_READONLY_TENSORBASE_PLUGIN
1022 #include EIGEN_READONLY_TENSORBASE_PLUGIN
1026 EIGEN_STRONG_INLINE
const Derived& derived()
const {
return *
static_cast<const Derived*
>(
this); }
1029 template <
typename Scalar,
int NumIndices,
int Options,
typename IndexType>
friend class Tensor;
1030 template <
typename Scalar,
typename Dimensions,
int Option,
typename IndexTypes>
friend class TensorFixedSize;
1032 template <
typename OtherDerived,
int AccessLevel>
friend class Eigen::TensorBase;
1035template<typename Derived, int AccessLevel = internal::accessors_level<Derived>::value>
1038 typedef TensorBase<Derived, ReadOnlyAccessors> Base;
1039 typedef internal::traits<Derived> DerivedTraits;
1040 typedef typename DerivedTraits::Scalar Scalar;
1041 typedef typename DerivedTraits::Index Index;
1042 typedef Scalar CoeffReturnType;
1043 static constexpr int NumDimensions = DerivedTraits::NumDimensions;
1045 template <
typename Scalar,
int NumIndices,
int Options,
typename IndexType>
friend class Tensor;
1046 template <
typename Scalar,
typename Dimensions,
int Option,
typename IndexTypes>
friend class TensorFixedSize;
1048 template <
typename OtherDerived,
int OtherAccessLevel>
friend class Eigen::TensorBase;
1051 EIGEN_STRONG_INLINE Derived& setZero() {
1052 return setConstant(Scalar(0));
1055 EIGEN_STRONG_INLINE Derived& setConstant(
const Scalar& val) {
1056 return derived() = this->constant(val);
1059 EIGEN_STRONG_INLINE Derived& setRandom() {
1060 return derived() = this->random();
1062 template <
typename RandomGenerator> EIGEN_DEVICE_FUNC
1063 EIGEN_STRONG_INLINE Derived& setRandom() {
1064 return derived() = this->
template random<RandomGenerator>();
1068 EIGEN_STRONG_INLINE Derived& setValues(
1069 const typename internal::Initializer<Derived, NumDimensions>::InitList& vals) {
1070 TensorEvaluator<Derived, DefaultDevice> eval(derived(), DefaultDevice());
1071 internal::initialize_tensor<Derived, NumDimensions>(eval, vals);
1075 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1076 Derived& operator+=(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other) {
1077 return derived() = derived() + other.derived();
1079 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1080 Derived& operator-=(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other) {
1081 return derived() = derived() - other.derived();
1083 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1084 Derived& operator*=(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other) {
1085 return derived() = derived() * other.derived();
1087 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1088 Derived& operator/=(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other) {
1089 return derived() = derived() / other.derived();
1092 template <
typename OtherScalar, EIGEN_SFINAE_ENABLE_IF((
internal::is_scalar_operand<OtherScalar, Scalar>::value))>
1093 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator+=(OtherScalar other) {
1094 return derived() = derived() +
static_cast<Scalar
>(other);
1096 template <
typename OtherScalar, EIGEN_SFINAE_ENABLE_IF((
internal::is_scalar_operand<OtherScalar, Scalar>::value))>
1097 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator-=(OtherScalar other) {
1098 return derived() = derived() -
static_cast<Scalar
>(other);
1100 template <
typename OtherScalar, EIGEN_SFINAE_ENABLE_IF((
internal::is_scalar_operand<OtherScalar, Scalar>::value))>
1101 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator*=(OtherScalar other) {
1102 return derived() = derived() *
static_cast<Scalar
>(other);
1104 template <
typename OtherScalar, EIGEN_SFINAE_ENABLE_IF((
internal::is_scalar_operand<OtherScalar, Scalar>::value))>
1105 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator/=(OtherScalar other) {
1106 return derived() = derived() /
static_cast<Scalar
>(other);
1109 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1110 const TensorLayoutSwapOp<const Derived>
1111 swap_layout()
const {
1112 return TensorLayoutSwapOp<const Derived>(derived());
1114 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1115 TensorLayoutSwapOp<Derived>
1117 return TensorLayoutSwapOp<Derived>(derived());
1120 template <
typename Axis,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1121 const TensorConcatenationOp<const Axis, const Derived, const OtherDerived>
1122 concatenate(
const OtherDerived& other,
const Axis& axis)
const {
1123 return TensorConcatenationOp<const Axis, const Derived, const OtherDerived>(derived(), other, axis);
1125 template <
typename Axis,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1126 TensorConcatenationOp<const Axis, Derived, OtherDerived>
1127 concatenate(
const OtherDerived& other,
const Axis& axis) {
1128 return TensorConcatenationOp<const Axis, Derived, OtherDerived>(derived(), other, axis);
1131 template <
typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1132 const TensorReshapingOp<const NewDimensions, const Derived>
1133 reshape(
const NewDimensions& newDimensions)
const {
1134 return TensorReshapingOp<const NewDimensions, const Derived>(derived(), newDimensions);
1136 template <
typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1137 TensorReshapingOp<const NewDimensions, Derived>
1138 reshape(
const NewDimensions& newDimensions) {
1139 return TensorReshapingOp<const NewDimensions, Derived>(derived(), newDimensions);
1142 template <
typename StartIndices,
typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1143 const TensorSlicingOp<const StartIndices, const Sizes, const Derived>
1144 slice(
const StartIndices& startIndices,
const Sizes& sizes)
const {
1145 return TensorSlicingOp<const StartIndices, const Sizes, const Derived>(derived(), startIndices, sizes);
1147 template <
typename StartIndices,
typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1148 TensorSlicingOp<const StartIndices, const Sizes, Derived>
1149 slice(
const StartIndices& startIndices,
const Sizes& sizes) {
1150 return TensorSlicingOp<const StartIndices, const Sizes, Derived>(derived(), startIndices, sizes);
1153 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1154 const TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides, const Derived>
1155 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides)
const {
1156 return TensorStridingSlicingOp<
const StartIndices,
const StopIndices,
const Strides,
1157 const Derived>(derived(), startIndices, stopIndices, strides);
1159 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1160 TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides, Derived>
1161 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides) {
1162 return TensorStridingSlicingOp<
const StartIndices,
const StopIndices,
const Strides,
1163 Derived>(derived(), startIndices, stopIndices, strides);
1166 template <DenseIndex DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1167 const TensorChippingOp<DimId, const Derived>
1168 chip(
const Index offset)
const {
1169 EIGEN_STATIC_ASSERT(DimId < Derived::NumDimensions && DimId >= 0, Chip_Dim_out_of_range)
1170 return TensorChippingOp<DimId, const Derived>(derived(), offset, DimId);
1172 template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1173 TensorChippingOp<DimId, Derived>
1174 chip(
const Index offset) {
1175 EIGEN_STATIC_ASSERT(DimId < Derived::NumDimensions && DimId >= 0, Chip_Dim_out_of_range)
1176 return TensorChippingOp<DimId, Derived>(derived(), offset, DimId);
1179 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1180 const TensorChippingOp<Dynamic, const Derived>
1181 chip(
const Index offset,
const Index dim)
const {
1182 return TensorChippingOp<Dynamic, const Derived>(derived(), offset, dim);
1184 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1185 TensorChippingOp<Dynamic, Derived>
1186 chip(
const Index offset,
const Index dim) {
1187 return TensorChippingOp<Dynamic, Derived>(derived(), offset, dim);
1190 template <
typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1191 const TensorReverseOp<const ReverseDimensions, const Derived>
1192 reverse(
const ReverseDimensions& rev)
const {
1193 return TensorReverseOp<const ReverseDimensions, const Derived>(derived(), rev);
1195 template <
typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1196 TensorReverseOp<const ReverseDimensions, Derived>
1197 reverse(
const ReverseDimensions& rev) {
1198 return TensorReverseOp<const ReverseDimensions, Derived>(derived(), rev);
1201 template <
typename Rolls> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1202 const TensorRollOp<const Rolls, const Derived>
1203 roll(
const Rolls& roll)
const {
1204 return TensorRollOp<const Rolls, const Derived>(derived(), roll);
1206 template <
typename Rolls> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1207 TensorRollOp<const Rolls, Derived>
1208 roll(
const Rolls& roll) {
1209 return TensorRollOp<const Rolls, Derived>(derived(), roll);
1212 template <
typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1213 const TensorShufflingOp<const Shuffle, const Derived>
1214 shuffle(
const Shuffle& shfl)
const {
1215 return TensorShufflingOp<const Shuffle, const Derived>(derived(), shfl);
1217 template <
typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1218 TensorShufflingOp<const Shuffle, Derived>
1219 shuffle(
const Shuffle& shfl) {
1220 return TensorShufflingOp<const Shuffle, Derived>(derived(), shfl);
1223 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1224 const TensorStridingOp<const Strides, const Derived>
1225 stride(
const Strides& strides)
const {
1226 return TensorStridingOp<const Strides, const Derived>(derived(), strides);
1228 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1229 TensorStridingOp<const Strides, Derived>
1230 stride(
const Strides& strides) {
1231 return TensorStridingOp<const Strides, Derived>(derived(), strides);
1235 template <
typename DeviceType>
1236 TensorDevice<Derived, DeviceType> device(
const DeviceType& dev) {
1237 return TensorDevice<Derived, DeviceType>(dev, derived());
1241 template <
typename DeviceType,
typename DoneCallback>
1242 TensorAsyncDevice<Derived, DeviceType, DoneCallback> device(
const DeviceType& dev, DoneCallback done) {
1243 return TensorAsyncDevice<Derived, DeviceType, DoneCallback>(dev, derived(), std::move(done));
1247 EIGEN_STRONG_INLINE Derived& derived() {
return *
static_cast<Derived*
>(
this); }
1249 EIGEN_STRONG_INLINE
const Derived& derived()
const {
return *
static_cast<const Derived*
>(
this); }
1251 #ifdef EIGEN_TENSORBASE_PLUGIN
1252 #include EIGEN_TENSORBASE_PLUGIN
1256 EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(TensorBase)
1257 EIGEN_DEFAULT_COPY_CONSTRUCTOR(TensorBase)
1259 template<
typename OtherDerived> EIGEN_DEVICE_FUNC
1260 EIGEN_STRONG_INLINE Derived& operator=(
const OtherDerived& other)
1262 typedef TensorAssignOp<Derived, const OtherDerived> Assign;
1263 Assign assign(derived(), other.derived());
1264 internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());
1272#define EIGEN_FORWARD_SCALAR_BINOP(op, name) \
1273 template <typename OtherScalar, typename Derived, \
1274 EIGEN_SFINAE_ENABLE_IF((internal::is_scalar_operand< \
1275 OtherScalar, typename internal::traits<Derived>::Scalar>::value))> \
1276 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp< \
1277 internal::bind1st_op<internal::scalar_##name##_op<typename internal::traits<Derived>::Scalar> >, const Derived> \
1278 op(OtherScalar lhs, const TensorBase<Derived, ReadOnlyAccessors>& rhs) { \
1279 typedef typename internal::traits<Derived>::Scalar Scalar; \
1280 return rhs.derived().unaryExpr( \
1281 internal::bind1st_op<internal::scalar_##name##_op<Scalar> >(static_cast<Scalar>(lhs))); \
1283EIGEN_FORWARD_SCALAR_BINOP(
operator+, sum)
1284EIGEN_FORWARD_SCALAR_BINOP(
operator-, difference)
1285EIGEN_FORWARD_SCALAR_BINOP(
operator*, product)
1286EIGEN_FORWARD_SCALAR_BINOP(
operator/, quotient)
1287#undef EIGEN_FORWARD_SCALAR_BINOP
1292#define EIGEN_FORWARD_SCALAR_CMP_LHS(op, reflected, tag) \
1293 template <typename OtherScalar, typename Derived, \
1294 EIGEN_SFINAE_ENABLE_IF((internal::is_scalar_operand< \
1295 OtherScalar, typename internal::traits<Derived>::Scalar>::value))> \
1296 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseBinaryOp< \
1297 internal::scalar_cmp_op<typename internal::traits<Derived>::Scalar, \
1298 typename internal::traits<Derived>::Scalar, internal::cmp_##tag>, \
1300 const TensorCwiseNullaryOp<internal::scalar_constant_op<typename internal::traits<Derived>::Scalar>, \
1302 op(OtherScalar lhs, const TensorBase<Derived, ReadOnlyAccessors>& rhs) { \
1303 typedef typename internal::traits<Derived>::Scalar Scalar; \
1304 return rhs.derived().reflected(static_cast<Scalar>(lhs)); \
1306EIGEN_FORWARD_SCALAR_CMP_LHS(operator<, operator>, GT)
1307EIGEN_FORWARD_SCALAR_CMP_LHS(operator<=, operator>=, GE)
1308EIGEN_FORWARD_SCALAR_CMP_LHS(
operator>,
operator<, LT)
1309EIGEN_FORWARD_SCALAR_CMP_LHS(
operator>=,
operator<=, LE)
1310EIGEN_FORWARD_SCALAR_CMP_LHS(
operator==,
operator==, EQ)
1311EIGEN_FORWARD_SCALAR_CMP_LHS(
operator!=,
operator!=, NEQ)
1312#undef EIGEN_FORWARD_SCALAR_CMP_LHS
The tensor base class.
Definition TensorForwardDeclarations.h:69
Namespace containing all symbols from the Eigen library.
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_y1_op< typename Derived::Scalar >, const Derived > bessel_y1(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:270
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k0e_op< typename Derived::Scalar >, const Derived > bessel_k0e(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:143
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k0_op< typename Derived::Scalar >, const Derived > bessel_k0(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:121
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_igammac_op< typename Derived::Scalar >, const Derived, const ExponentDerived > igammac(const Eigen::ArrayBase< Derived > &a, const Eigen::ArrayBase< ExponentDerived > &x)
Definition SpecialFunctionsArrayAPI.h:86
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_igamma_der_a_op< typename Derived::Scalar >, const Derived, const ExponentDerived > igamma_der_a(const Eigen::ArrayBase< Derived > &a, const Eigen::ArrayBase< ExponentDerived > &x)
Definition SpecialFunctionsArrayAPI.h:49
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k1_op< typename Derived::Scalar >, const Derived > bessel_k1(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:164
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i1_op< typename Derived::Scalar >, const Derived > bessel_i1(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:78
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i0e_op< typename Derived::Scalar >, const Derived > bessel_i0e(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:57
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i1e_op< typename Derived::Scalar >, const Derived > bessel_i1e(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:100
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_j1_op< typename Derived::Scalar >, const Derived > bessel_j1(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:249
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_y0_op< typename Derived::Scalar >, const Derived > bessel_y0(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:228
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i0_op< typename Derived::Scalar >, const Derived > bessel_i0(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:35
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k1e_op< typename Derived::Scalar >, const Derived > bessel_k1e(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:186
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_gamma_sample_der_alpha_op< typename AlphaDerived::Scalar >, const AlphaDerived, const SampleDerived > gamma_sample_der_alpha(const Eigen::ArrayBase< AlphaDerived > &alpha, const Eigen::ArrayBase< SampleDerived > &sample)
Definition SpecialFunctionsArrayAPI.h:69
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_polygamma_op< typename DerivedX::Scalar >, const DerivedN, const DerivedX > polygamma(const Eigen::ArrayBase< DerivedN > &n, const Eigen::ArrayBase< DerivedX > &x)
Definition SpecialFunctionsArrayAPI.h:103
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_j0_op< typename Derived::Scalar >, const Derived > bessel_j0(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:207
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_igamma_op< typename Derived::Scalar >, const Derived, const ExponentDerived > igamma(const Eigen::ArrayBase< Derived > &a, const Eigen::ArrayBase< ExponentDerived > &x)
Definition SpecialFunctionsArrayAPI.h:31
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition SpecialFunctionsArrayAPI.h:141