10#ifndef EIGEN_CXX11_TENSOR_TENSOR_BASE_H
11#define EIGEN_CXX11_TENSOR_TENSOR_BASE_H
16#include "./InternalHeaderCheck.h"
28#ifndef EIGEN_PARSED_BY_DOXYGEN
31template<
typename Derived>
35 typedef internal::traits<Derived> DerivedTraits;
36 typedef typename DerivedTraits::Scalar Scalar;
37 typedef typename DerivedTraits::Index
Index;
38 typedef std::remove_const_t<Scalar> CoeffReturnType;
39 static constexpr int NumDimensions = DerivedTraits::NumDimensions;
42 template <
typename CustomNullaryOp> EIGEN_DEVICE_FUNC
43 EIGEN_STRONG_INLINE
const TensorCwiseNullaryOp<CustomNullaryOp, const Derived>
44 nullaryExpr(
const CustomNullaryOp& func)
const {
45 return TensorCwiseNullaryOp<CustomNullaryOp, const Derived>(derived(), func);
50 EIGEN_STRONG_INLINE
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived>
51 constant(
const Scalar& value)
const {
52 return nullaryExpr(internal::scalar_constant_op<Scalar>(value));
56 EIGEN_STRONG_INLINE
const TensorCwiseNullaryOp<internal::UniformRandomGenerator<Scalar>,
const Derived>
58 return nullaryExpr(internal::UniformRandomGenerator<Scalar>());
60 template <
typename RandomGenerator> EIGEN_DEVICE_FUNC
61 EIGEN_STRONG_INLINE
const TensorCwiseNullaryOp<RandomGenerator, const Derived>
62 random(
const RandomGenerator& gen = RandomGenerator())
const {
63 return nullaryExpr(gen);
67 template <
typename Generator> EIGEN_DEVICE_FUNC
68 EIGEN_STRONG_INLINE
const TensorGeneratorOp<Generator, const Derived>
69 generate(
const Generator& generator)
const {
70 return TensorGeneratorOp<Generator, const Derived>(derived(), generator);
74 template <
typename CustomUnaryOp> EIGEN_DEVICE_FUNC
75 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<CustomUnaryOp, const Derived>
76 unaryExpr(
const CustomUnaryOp& func)
const {
77 return TensorCwiseUnaryOp<CustomUnaryOp, const Derived>(derived(), func);
82 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_opposite_op<Scalar>,
const Derived>
84 return unaryExpr(internal::scalar_opposite_op<Scalar>());
88 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_sqrt_op<Scalar>,
const Derived>
90 return unaryExpr(internal::scalar_sqrt_op<Scalar>());
94 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_sign_op<Scalar>,
const Derived>
96 return unaryExpr(internal::scalar_sign_op<Scalar>());
100 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_rsqrt_op<Scalar>,
const Derived>
102 return unaryExpr(internal::scalar_rsqrt_op<Scalar>());
106 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_square_op<Scalar>,
const Derived>
108 return unaryExpr(internal::scalar_square_op<Scalar>());
112 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_cube_op<Scalar>,
const Derived>
114 return unaryExpr(internal::scalar_cube_op<Scalar>());
118 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_inverse_op<Scalar>,
const Derived>
120 return unaryExpr(internal::scalar_inverse_op<Scalar>());
124 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_tanh_op<Scalar>,
const Derived>
126 return unaryExpr(internal::scalar_tanh_op<Scalar>());
130 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_lgamma_op<Scalar>,
const Derived>
132 return unaryExpr(internal::scalar_lgamma_op<Scalar>());
136 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_digamma_op<Scalar>,
const Derived>
138 return unaryExpr(internal::scalar_digamma_op<Scalar>());
142 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_i0_op<Scalar>,
const Derived>
144 return unaryExpr(internal::scalar_bessel_i0_op<Scalar>());
148 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_i0e_op<Scalar>,
const Derived>
150 return unaryExpr(internal::scalar_bessel_i0e_op<Scalar>());
154 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_i1_op<Scalar>,
const Derived>
156 return unaryExpr(internal::scalar_bessel_i1_op<Scalar>());
160 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_i1e_op<Scalar>,
const Derived>
162 return unaryExpr(internal::scalar_bessel_i1e_op<Scalar>());
166 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_j0_op<Scalar>,
const Derived>
168 return unaryExpr(internal::scalar_bessel_j0_op<Scalar>());
172 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_y0_op<Scalar>,
const Derived>
174 return unaryExpr(internal::scalar_bessel_y0_op<Scalar>());
178 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_j1_op<Scalar>,
const Derived>
180 return unaryExpr(internal::scalar_bessel_j1_op<Scalar>());
184 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_y1_op<Scalar>,
const Derived>
186 return unaryExpr(internal::scalar_bessel_y1_op<Scalar>());
190 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_k0_op<Scalar>,
const Derived>
192 return unaryExpr(internal::scalar_bessel_k0_op<Scalar>());
196 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_k0e_op<Scalar>,
const Derived>
198 return unaryExpr(internal::scalar_bessel_k0e_op<Scalar>());
202 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_k1_op<Scalar>,
const Derived>
204 return unaryExpr(internal::scalar_bessel_k1_op<Scalar>());
208 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_bessel_k1e_op<Scalar>,
const Derived>
210 return unaryExpr(internal::scalar_bessel_k1e_op<Scalar>());
214 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
215 const TensorCwiseBinaryOp<internal::scalar_igamma_op<Scalar>,
const Derived,
const OtherDerived>
216 igamma(
const OtherDerived& other)
const {
217 return binaryExpr(other.derived(), internal::scalar_igamma_op<Scalar>());
221 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
222 const TensorCwiseBinaryOp<internal::scalar_igamma_der_a_op<Scalar>,
const Derived,
const OtherDerived>
224 return binaryExpr(other.derived(), internal::scalar_igamma_der_a_op<Scalar>());
228 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
229 const TensorCwiseBinaryOp<internal::scalar_gamma_sample_der_alpha_op<Scalar>,
const Derived,
const OtherDerived>
231 return binaryExpr(other.derived(), internal::scalar_gamma_sample_der_alpha_op<Scalar>());
235 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
236 const TensorCwiseBinaryOp<internal::scalar_igammac_op<Scalar>,
const Derived,
const OtherDerived>
237 igammac(
const OtherDerived& other)
const {
238 return binaryExpr(other.derived(), internal::scalar_igammac_op<Scalar>());
242 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
243 const TensorCwiseBinaryOp<internal::scalar_zeta_op<Scalar>,
const Derived,
const OtherDerived>
244 zeta(
const OtherDerived& other)
const {
245 return binaryExpr(other.derived(), internal::scalar_zeta_op<Scalar>());
249 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
250 const TensorCwiseBinaryOp<internal::scalar_polygamma_op<Scalar>,
const Derived,
const OtherDerived>
251 polygamma(
const OtherDerived& other)
const {
252 return binaryExpr(other.derived(), internal::scalar_polygamma_op<Scalar>());
256 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_erf_op<Scalar>,
const Derived>
258 return unaryExpr(internal::scalar_erf_op<Scalar>());
262 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_erfc_op<Scalar>,
const Derived>
264 return unaryExpr(internal::scalar_erfc_op<Scalar>());
268 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_ndtri_op<Scalar>,
const Derived>
270 return unaryExpr(internal::scalar_ndtri_op<Scalar>());
274 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_logistic_op<Scalar>,
const Derived>
276 return unaryExpr(internal::scalar_logistic_op<Scalar>());
280 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_exp_op<Scalar>,
const Derived>
282 return unaryExpr(internal::scalar_exp_op<Scalar>());
286 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_expm1_op<Scalar>,
const Derived>
288 return unaryExpr(internal::scalar_expm1_op<Scalar>());
292 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_log_op<Scalar>,
const Derived>
294 return unaryExpr(internal::scalar_log_op<Scalar>());
298 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_log1p_op<Scalar>,
const Derived>
300 return unaryExpr(internal::scalar_log1p_op<Scalar>());
304 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_log2_op<Scalar>,
const Derived>
306 return unaryExpr(internal::scalar_log2_op<Scalar>());
310 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_abs_op<Scalar>,
const Derived>
312 return unaryExpr(internal::scalar_abs_op<Scalar>());
316 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_arg_op<Scalar>,
const Derived>
318 return unaryExpr(internal::scalar_arg_op<Scalar>());
322 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_clamp_op<Scalar>,
const Derived>
323 clip(Scalar min, Scalar max)
const {
324 return unaryExpr(internal::scalar_clamp_op<Scalar>(min, max));
328 EIGEN_STRONG_INLINE
const std::conditional_t<NumTraits<CoeffReturnType>::IsComplex,
329 TensorCwiseUnaryOp<internal::scalar_conjugate_op<Scalar>,
const Derived>,
332 return choose(Cond<NumTraits<CoeffReturnType>::IsComplex>(), unaryExpr(internal::scalar_conjugate_op<Scalar>()), derived());
335 template<
typename ScalarExponent>
336 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const std::enable_if_t<internal::is_arithmetic<typename NumTraits<ScalarExponent>::Real>::value,
337 TensorCwiseUnaryOp<internal::scalar_unary_pow_op<Scalar, ScalarExponent>,
const Derived>>
338 pow(ScalarExponent exponent)
const
340 return unaryExpr(internal::scalar_unary_pow_op<Scalar, ScalarExponent>(exponent));
344 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_real_op<Scalar>,
const Derived>
346 return unaryExpr(internal::scalar_real_op<Scalar>());
350 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_imag_op<Scalar>,
const Derived>
352 return unaryExpr(internal::scalar_imag_op<Scalar>());
356 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_sum_op<Scalar,Scalar> >,
const Derived>
357 operator+ (Scalar rhs)
const {
358 return unaryExpr(internal::bind2nd_op<internal::scalar_sum_op<Scalar,Scalar> >(rhs));
362 EIGEN_STRONG_INLINE
friend
363 const TensorCwiseUnaryOp<internal::bind1st_op<internal::scalar_sum_op<Scalar> >,
const Derived>
364 operator+ (Scalar lhs,
const Derived& rhs) {
365 return rhs.unaryExpr(internal::bind1st_op<internal::scalar_sum_op<Scalar> >(lhs));
369 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_difference_op<Scalar,Scalar> >,
const Derived>
370 operator- (Scalar rhs)
const {
371 EIGEN_STATIC_ASSERT((NumTraits<Scalar>::IsSigned || internal::is_same<Scalar,
const std::complex<float> >::value), YOU_MADE_A_PROGRAMMING_MISTAKE);
372 return unaryExpr(internal::bind2nd_op<internal::scalar_difference_op<Scalar,Scalar> >(rhs));
376 EIGEN_STRONG_INLINE
friend
377 const TensorCwiseUnaryOp<internal::bind1st_op<internal::scalar_difference_op<Scalar> >,
const Derived>
378 operator- (Scalar lhs,
const Derived& rhs) {
379 return rhs.unaryExpr(internal::bind1st_op<internal::scalar_difference_op<Scalar> >(lhs));
383 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_product_op<Scalar,Scalar> >,
const Derived>
385 return unaryExpr(internal::bind2nd_op<internal::scalar_product_op<Scalar,Scalar> >(rhs));
389 EIGEN_STRONG_INLINE
friend
390 const TensorCwiseUnaryOp<internal::bind1st_op<internal::scalar_product_op<Scalar> >,
const Derived>
391 operator* (Scalar lhs,
const Derived& rhs) {
392 return rhs.unaryExpr(internal::bind1st_op<internal::scalar_product_op<Scalar> >(lhs));
396 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::bind2nd_op<internal::scalar_quotient_op<Scalar,Scalar> >,
const Derived>
397 operator/ (Scalar rhs)
const {
398 return unaryExpr(internal::bind2nd_op<internal::scalar_quotient_op<Scalar,Scalar> >(rhs));
402 EIGEN_STRONG_INLINE
friend
403 const TensorCwiseUnaryOp<internal::bind1st_op<internal::scalar_quotient_op<Scalar> >,
const Derived>
404 operator/ (Scalar lhs,
const Derived& rhs) {
405 return rhs.unaryExpr(internal::bind1st_op<internal::scalar_quotient_op<Scalar> >(lhs));
409 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_mod_op<Scalar>,
const Derived>
410 operator% (Scalar rhs)
const {
411 EIGEN_STATIC_ASSERT(NumTraits<Scalar>::IsInteger, YOU_MADE_A_PROGRAMMING_MISTAKE_TRY_MOD);
412 return unaryExpr(internal::scalar_mod_op<Scalar>(rhs));
415 template <
int NanPropagation=PropagateFast>
417 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar,NanPropagation>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
418 cwiseMax(Scalar threshold)
const {
419 return cwiseMax<NanPropagation>(constant(threshold));
422 template <
int NanPropagation=PropagateFast>
424 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar,NanPropagation>,
const Derived,
const TensorCwiseNullaryOp<internal::scalar_constant_op<Scalar>,
const Derived> >
425 cwiseMin(Scalar threshold)
const {
426 return cwiseMin<NanPropagation>(constant(threshold));
429 template<
typename NewType>
431 EIGEN_STRONG_INLINE
const std::conditional_t<internal::is_same<NewType, CoeffReturnType>::value,
433 TensorConversionOp<NewType, const Derived> >
435 return choose(Cond<internal::is_same<NewType, CoeffReturnType>::value>(), derived(), TensorConversionOp<NewType, const Derived>(derived()));
439 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_round_op<Scalar>,
const Derived>
441 return unaryExpr(internal::scalar_round_op<Scalar>());
445 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_rint_op<Scalar>,
const Derived>
447 return unaryExpr(internal::scalar_rint_op<Scalar>());
451 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_ceil_op<Scalar>,
const Derived>
453 return unaryExpr(internal::scalar_ceil_op<Scalar>());
457 EIGEN_STRONG_INLINE
const TensorCwiseUnaryOp<internal::scalar_floor_op<Scalar>,
const Derived>
459 return unaryExpr(internal::scalar_floor_op<Scalar>());
463 template <
typename CustomBinaryOp,
typename OtherDerived> EIGEN_DEVICE_FUNC
464 EIGEN_STRONG_INLINE
const TensorCwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>
465 binaryExpr(
const OtherDerived& other,
const CustomBinaryOp& func)
const {
466 return TensorCwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>(derived(), other, func);
470 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
471 const TensorCwiseBinaryOp<internal::scalar_sum_op<Scalar>,
const Derived,
const OtherDerived>
472 operator+(
const OtherDerived& other)
const {
473 return binaryExpr(other.derived(), internal::scalar_sum_op<Scalar>());
476 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
477 const TensorCwiseBinaryOp<internal::scalar_difference_op<Scalar>,
const Derived,
const OtherDerived>
478 operator-(
const OtherDerived& other)
const {
479 return binaryExpr(other.derived(), internal::scalar_difference_op<Scalar>());
482 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
483 const TensorCwiseBinaryOp<internal::scalar_product_op<Scalar>,
const Derived,
const OtherDerived>
484 operator*(
const OtherDerived& other)
const {
485 return binaryExpr(other.derived(), internal::scalar_product_op<Scalar>());
488 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
489 const TensorCwiseBinaryOp<internal::scalar_quotient_op<Scalar>,
const Derived,
const OtherDerived>
490 operator/(
const OtherDerived& other)
const {
491 return binaryExpr(other.derived(), internal::scalar_quotient_op<Scalar>());
494 template<
int NaNPropagation=PropagateFast,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
495 const TensorCwiseBinaryOp<internal::scalar_max_op<Scalar,Scalar, NaNPropagation>,
const Derived,
const OtherDerived>
496 cwiseMax(
const OtherDerived& other)
const {
497 return binaryExpr(other.derived(), internal::scalar_max_op<Scalar,Scalar, NaNPropagation>());
500 template<
int NaNPropagation=PropagateFast,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
501 const TensorCwiseBinaryOp<internal::scalar_min_op<Scalar,Scalar, NaNPropagation>,
const Derived,
const OtherDerived>
502 cwiseMin(
const OtherDerived& other)
const {
503 return binaryExpr(other.derived(), internal::scalar_min_op<Scalar,Scalar, NaNPropagation>());
507 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
508 const TensorCwiseBinaryOp<internal::scalar_boolean_and_op<Scalar>,
const Derived,
const OtherDerived>
509 operator&&(
const OtherDerived& other)
const {
510 return binaryExpr(other.derived(), internal::scalar_boolean_and_op<Scalar>());
513 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
514 const TensorCwiseBinaryOp<internal::scalar_boolean_or_op<Scalar>,
const Derived,
const OtherDerived>
515 operator||(
const OtherDerived& other)
const {
516 return binaryExpr(other.derived(), internal::scalar_boolean_or_op<Scalar>());
519 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
520 const TensorCwiseBinaryOp<internal::scalar_bitwise_and_op<Scalar>,
const Derived,
const OtherDerived>
521 operator&(
const OtherDerived& other)
const {
522 return binaryExpr(other.derived(), internal::scalar_bitwise_and_op<Scalar>());
525 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
526 const TensorCwiseBinaryOp<internal::scalar_bitwise_or_op<Scalar>,
const Derived,
const OtherDerived>
527 operator|(
const OtherDerived& other)
const {
528 return binaryExpr(other.derived(), internal::scalar_bitwise_or_op<Scalar>());
531 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
532 const TensorCwiseBinaryOp<internal::scalar_bitwise_xor_op<Scalar>,
const Derived,
const OtherDerived>
533 operator^(
const OtherDerived& other)
const {
534 return binaryExpr(other.derived(), internal::scalar_bitwise_xor_op<Scalar>());
537 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
538 const TensorCwiseUnaryOp<internal::scalar_boolean_not_op<Scalar>,
const Derived>
540 return unaryExpr(internal::scalar_boolean_not_op<Scalar>());
543 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
544 const TensorCwiseUnaryOp<internal::scalar_bitwise_not_op<Scalar>,
const Derived>
546 return unaryExpr(internal::scalar_bitwise_not_op<Scalar>());
550 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
551 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>,
const Derived,
const OtherDerived>
552 operator<(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
553 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LT>());
555 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
556 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>,
const Derived,
const OtherDerived>
557 operator<=(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
558 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_LE>());
560 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
561 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>,
const Derived,
const OtherDerived>
562 operator>(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
563 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GT>());
565 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
566 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>,
const Derived,
const OtherDerived>
567 operator>=(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
568 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_GE>());
571 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
572 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>,
const Derived,
const OtherDerived>
573 operator==(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
574 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_EQ>());
577 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
578 const TensorCwiseBinaryOp<internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>,
const Derived,
const OtherDerived>
579 operator!=(
const TensorBase<OtherDerived, ReadOnlyAccessors>& other)
const {
580 return binaryExpr(other.derived(), internal::scalar_cmp_op<Scalar, Scalar, internal::cmp_NEQ>());
585 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> >
586 operator<(Scalar threshold)
const {
587 return operator<(constant(threshold));
590 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> >
591 operator<=(Scalar threshold)
const {
592 return operator<=(constant(threshold));
595 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> >
596 operator>(Scalar threshold)
const {
597 return operator>(constant(threshold));
600 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> >
601 operator>=(Scalar threshold)
const {
602 return operator>=(constant(threshold));
605 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> >
606 operator==(Scalar threshold)
const {
607 return operator==(constant(threshold));
610 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> >
611 operator!=(Scalar threshold)
const {
612 return operator!=(constant(threshold));
617 EIGEN_STRONG_INLINE
const TensorConversionOp<bool, const TensorCwiseUnaryOp<internal::scalar_isnan_op<Scalar, true>,
const Derived>>
619 return unaryExpr(internal::scalar_isnan_op<Scalar, true>()).template cast<bool>();
622 EIGEN_STRONG_INLINE
const TensorConversionOp<bool, const TensorCwiseUnaryOp<internal::scalar_isinf_op<Scalar, true>,
const Derived>>
624 return unaryExpr(internal::scalar_isinf_op<Scalar, true>()).template cast<bool>();
627 EIGEN_STRONG_INLINE
const TensorConversionOp<bool, const TensorCwiseUnaryOp<internal::scalar_isfinite_op<Scalar, true>,
const Derived>>
629 return unaryExpr(internal::scalar_isfinite_op<Scalar, true>()).template cast<bool>();
633 template<
typename ThenDerived,
typename ElseDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
634 const TensorSelectOp<const Derived, const ThenDerived, const ElseDerived>
635 select(
const ThenDerived& thenTensor,
const ElseDerived& elseTensor)
const {
636 return TensorSelectOp<const Derived, const ThenDerived, const ElseDerived>(derived(), thenTensor.derived(), elseTensor.derived());
640 typedef Eigen::IndexPair<Index> DimensionPair;
642 template<
typename OtherDerived,
typename Dimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
643 const TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const NoOpOutputKernel>
644 contract(
const OtherDerived& other,
const Dimensions& dims)
const {
645 return TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const NoOpOutputKernel>(derived(), other.derived(), dims);
648 template<
typename OtherDerived,
typename Dimensions,
typename OutputKernel> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
649 const TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const OutputKernel>
650 contract(
const OtherDerived& other,
const Dimensions& dims,
const OutputKernel& output_kernel)
const {
651 return TensorContractionOp<const Dimensions, const Derived, const OtherDerived, const OutputKernel>(derived(), other.derived(), dims, output_kernel);
655 template<
typename KernelDerived,
typename Dimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
656 const TensorConvolutionOp<const Dimensions, const Derived, const KernelDerived>
657 convolve(
const KernelDerived& kernel,
const Dimensions& dims)
const {
658 return TensorConvolutionOp<const Dimensions, const Derived, const KernelDerived>(derived(), kernel.derived(), dims);
662 template <
int FFTDataType,
int FFTDirection,
typename FFT> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
663 const TensorFFTOp<const FFT, const Derived, FFTDataType, FFTDirection>
664 fft(
const FFT& dims)
const {
665 return TensorFFTOp<const FFT, const Derived, FFTDataType, FFTDirection>(derived(), dims);
669 typedef TensorScanOp<internal::SumReducer<CoeffReturnType>,
const Derived> TensorScanSumOp;
670 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
671 const TensorScanSumOp
672 cumsum(
const Index& axis,
bool exclusive =
false)
const {
673 return TensorScanSumOp(derived(), axis, exclusive);
676 typedef TensorScanOp<internal::ProdReducer<CoeffReturnType>,
const Derived> TensorScanProdOp;
677 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
678 const TensorScanProdOp
679 cumprod(
const Index& axis,
bool exclusive =
false)
const {
680 return TensorScanProdOp(derived(), axis, exclusive);
683 template <
typename Reducer>
684 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
685 const TensorScanOp<Reducer, const Derived>
686 scan(
const Index& axis,
const Reducer& reducer,
bool exclusive =
false)
const {
687 return TensorScanOp<Reducer, const Derived>(derived(), axis, exclusive, reducer);
691 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
692 const TensorReductionOp<internal::SumReducer<CoeffReturnType>,
const Dims,
const Derived>
693 sum(
const Dims& dims)
const {
694 return TensorReductionOp<internal::SumReducer<CoeffReturnType>,
const Dims,
const Derived>(derived(), dims, internal::SumReducer<CoeffReturnType>());
697 const TensorReductionOp<internal::SumReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
699 DimensionList<Index, NumDimensions> in_dims;
700 return TensorReductionOp<internal::SumReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims, internal::SumReducer<CoeffReturnType>());
703 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
704 const TensorReductionOp<internal::MeanReducer<CoeffReturnType>,
const Dims,
const Derived>
705 mean(
const Dims& dims)
const {
706 return TensorReductionOp<internal::MeanReducer<CoeffReturnType>,
const Dims,
const Derived>(derived(), dims, internal::MeanReducer<CoeffReturnType>());
709 const TensorReductionOp<internal::MeanReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
711 DimensionList<Index, NumDimensions> in_dims;
712 return TensorReductionOp<internal::MeanReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims, internal::MeanReducer<CoeffReturnType>());
715 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
716 const TensorReductionOp<internal::ProdReducer<CoeffReturnType>,
const Dims,
const Derived>
717 prod(
const Dims& dims)
const {
718 return TensorReductionOp<internal::ProdReducer<CoeffReturnType>,
const Dims,
const Derived>(derived(), dims, internal::ProdReducer<CoeffReturnType>());
721 const TensorReductionOp<internal::ProdReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>
723 DimensionList<Index, NumDimensions> in_dims;
724 return TensorReductionOp<internal::ProdReducer<CoeffReturnType>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims, internal::ProdReducer<CoeffReturnType>());
727 template <
typename Dims,
int NanPropagation=PropagateFast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
728 const TensorReductionOp<internal::MaxReducer<CoeffReturnType,NanPropagation>,
const Dims,
const Derived>
729 maximum(
const Dims& dims)
const {
730 return TensorReductionOp<internal::MaxReducer<CoeffReturnType,NanPropagation>,
const Dims,
const Derived>(derived(), dims, internal::MaxReducer<CoeffReturnType,NanPropagation>());
733 template <
int NanPropagation=PropagateFast>
734 const TensorReductionOp<internal::MaxReducer<CoeffReturnType,NanPropagation>,
const DimensionList<Index, NumDimensions>,
const Derived>
736 DimensionList<Index, NumDimensions> in_dims;
737 return TensorReductionOp<internal::MaxReducer<CoeffReturnType,NanPropagation>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims, internal::MaxReducer<CoeffReturnType,NanPropagation>());
740 template <
typename Dims,
int NanPropagation=PropagateFast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
741 const TensorReductionOp<internal::MinReducer<CoeffReturnType,NanPropagation>,
const Dims,
const Derived>
742 minimum(
const Dims& dims)
const {
743 return TensorReductionOp<internal::MinReducer<CoeffReturnType,NanPropagation>,
const Dims,
const Derived>(derived(), dims, internal::MinReducer<CoeffReturnType,NanPropagation>());
746 template <
int NanPropagation=PropagateFast>
747 const TensorReductionOp<internal::MinReducer<CoeffReturnType,NanPropagation>,
const DimensionList<Index, NumDimensions>,
const Derived>
749 DimensionList<Index, NumDimensions> in_dims;
750 return TensorReductionOp<internal::MinReducer<CoeffReturnType,NanPropagation>,
const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims, internal::MinReducer<CoeffReturnType,NanPropagation>());
753 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
754 const TensorReductionOp<internal::AndReducer, const Dims, const std::conditional_t<internal::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> > >
755 all(
const Dims& dims)
const {
756 return cast<bool>().reduce(dims, internal::AndReducer());
759 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
760 const TensorReductionOp<internal::AndReducer, const DimensionList<Index, NumDimensions>,
const std::conditional_t<internal::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> > >
762 DimensionList<Index, NumDimensions> in_dims;
763 return cast<bool>().reduce(in_dims, internal::AndReducer());
766 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
767 const TensorReductionOp<internal::OrReducer, const Dims, const std::conditional_t<internal::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> > >
768 any(
const Dims& dims)
const {
769 return cast<bool>().reduce(dims, internal::OrReducer());
772 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
773 const TensorReductionOp<internal::OrReducer, const DimensionList<Index, NumDimensions>,
const std::conditional_t<internal::is_same<bool, CoeffReturnType>::value, Derived, TensorConversionOp<bool, const Derived> > >
775 DimensionList<Index, NumDimensions> in_dims;
776 return cast<bool>().reduce(in_dims, internal::OrReducer());
779 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
780 const TensorPairReducerOp<
781 internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >,
782 const array<Index, NumDimensions>,
const Derived>
784 array<Index, NumDimensions> in_dims;
785 for (
Index d = 0; d < NumDimensions; ++d) in_dims[d] = d;
786 return TensorPairReducerOp<
787 internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >,
788 const array<Index, NumDimensions>,
789 const Derived>(derived(), internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >(), -1, in_dims);
792 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
793 const TensorPairReducerOp<
794 internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >,
795 const array<Index, NumDimensions>,
const Derived>
797 array<Index, NumDimensions> in_dims;
798 for (
Index d = 0; d < NumDimensions; ++d) in_dims[d] = d;
799 return TensorPairReducerOp<
800 internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >,
801 const array<Index, NumDimensions>,
802 const Derived>(derived(), internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >(), -1, in_dims);
805 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
806 const TensorPairReducerOp<
807 internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >,
808 const array<Index, 1>,
const Derived>
809 argmax(
const Index return_dim)
const {
810 array<Index, 1> in_dims;
811 in_dims[0] = return_dim;
812 return TensorPairReducerOp<
813 internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >,
814 const array<Index, 1>,
815 const Derived>(derived(), internal::ArgMaxPairReducer<Pair<Index, CoeffReturnType> >(), return_dim, in_dims);
818 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
819 const TensorPairReducerOp<
820 internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >,
821 const array<Index, 1>,
const Derived>
822 argmin(
const Index return_dim)
const {
823 array<Index, 1> in_dims;
824 in_dims[0] = return_dim;
825 return TensorPairReducerOp<
826 internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >,
827 const array<Index, 1>,
828 const Derived>(derived(), internal::ArgMinPairReducer<Pair<Index, CoeffReturnType> >(), return_dim, in_dims);
831 template <
typename Reducer,
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
832 const TensorReductionOp<Reducer, const Dims, const Derived>
833 reduce(
const Dims& dims,
const Reducer& reducer)
const {
834 return TensorReductionOp<Reducer, const Dims, const Derived>(derived(), dims, reducer);
837 template <
typename Dims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
838 const TensorTraceOp<const Dims, const Derived>
839 trace(
const Dims& dims)
const {
840 return TensorTraceOp<const Dims, const Derived>(derived(), dims);
843 const TensorTraceOp<const DimensionList<Index, NumDimensions>,
const Derived>
845 DimensionList<Index, NumDimensions> in_dims;
846 return TensorTraceOp<const DimensionList<Index, NumDimensions>,
const Derived>(derived(), in_dims);
849 template <
typename Broadcast> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
850 const TensorBroadcastingOp<const Broadcast, const Derived>
851 broadcast(
const Broadcast& bcast)
const {
852 return TensorBroadcastingOp<const Broadcast, const Derived>(derived(), bcast);
855 template <
typename Axis,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
856 const TensorConcatenationOp<Axis, const Derived, const OtherDerived>
857 concatenate(
const OtherDerived& other, Axis axis)
const {
858 return TensorConcatenationOp<Axis, const Derived, const OtherDerived>(derived(), other.derived(), axis);
861 template <
typename PatchDims> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
862 const TensorPatchOp<const PatchDims, const Derived>
863 extract_patches(
const PatchDims& patch_dims)
const {
864 return TensorPatchOp<const PatchDims, const Derived>(derived(), patch_dims);
867 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
868 const TensorImagePatchOp<Dynamic, Dynamic, const Derived>
869 extract_image_patches(
const Index patch_rows = 1,
const Index patch_cols = 1,
870 const Index row_stride = 1,
const Index col_stride = 1,
871 const Index in_row_stride = 1,
const Index in_col_stride = 1,
872 const PaddingType padding_type = PADDING_SAME,
const Scalar padding_value = Scalar(0))
const {
873 return TensorImagePatchOp<Dynamic, Dynamic, const Derived>(derived(), patch_rows, patch_cols, row_stride, col_stride,
874 in_row_stride, in_col_stride, 1, 1, padding_type, padding_value);
877 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
878 const TensorImagePatchOp<Dynamic, Dynamic, const Derived>
879 extract_image_patches(
const Index patch_rows,
const Index patch_cols,
880 const Index row_stride,
const Index col_stride,
881 const Index in_row_stride,
const Index in_col_stride,
882 const Index row_inflate_stride,
const Index col_inflate_stride,
883 const Index padding_top,
const Index padding_bottom,
884 const Index padding_left,
const Index padding_right,
885 const Scalar padding_value)
const {
886 return TensorImagePatchOp<Dynamic, Dynamic, const Derived>(derived(), patch_rows, patch_cols, row_stride, col_stride,
887 in_row_stride, in_col_stride, row_inflate_stride, col_inflate_stride,
888 padding_top, padding_bottom, padding_left, padding_right, padding_value);
891 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
892 const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>
893 extract_volume_patches(
const Index patch_planes,
const Index patch_rows,
const Index patch_cols,
894 const Index plane_stride = 1,
const Index row_stride = 1,
const Index col_stride = 1,
895 const PaddingType padding_type = PADDING_SAME,
const Scalar padding_value = Scalar(0))
const {
896 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);
900 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
901 const TensorVolumePatchOp<Dynamic, Dynamic, Dynamic, const Derived>
902 extract_volume_patches(
const Index patch_planes,
const Index patch_rows,
const Index patch_cols,
903 const Index plane_stride,
const Index row_stride,
const Index col_stride,
904 const Index plane_inflate_stride,
const Index row_inflate_stride,
const Index col_inflate_stride,
905 const Index padding_top_z,
const Index padding_bottom_z,
906 const Index padding_top,
const Index padding_bottom,
907 const Index padding_left,
const Index padding_right,
const Scalar padding_value = Scalar(0))
const {
908 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);
912 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
913 const TensorLayoutSwapOp<const Derived>
914 swap_layout()
const {
915 return TensorLayoutSwapOp<const Derived>(derived());
917 template <
typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
918 const TensorReshapingOp<const NewDimensions, const Derived>
919 reshape(
const NewDimensions& newDimensions)
const {
920 return TensorReshapingOp<const NewDimensions, const Derived>(derived(), newDimensions);
922 template <
typename StartIndices,
typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
923 const TensorSlicingOp<const StartIndices, const Sizes, const Derived>
924 slice(
const StartIndices& startIndices,
const Sizes& sizes)
const {
925 return TensorSlicingOp<const StartIndices, const Sizes, const Derived>(derived(), startIndices, sizes);
927 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
928 const TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides, const Derived>
929 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides)
const {
930 return TensorStridingSlicingOp<
const StartIndices,
const StopIndices,
const Strides,
931 const Derived>(derived(), startIndices, stopIndices, strides);
933 template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
934 const TensorChippingOp<DimId, const Derived>
935 chip(
const Index offset)
const {
936 EIGEN_STATIC_ASSERT(DimId < Derived::NumDimensions && DimId >= 0, Chip_Dim_out_of_range)
937 return TensorChippingOp<DimId, const Derived>(derived(), offset, DimId);
939 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
940 const TensorChippingOp<Dynamic, const Derived>
941 chip(
const Index offset,
const Index dim)
const {
942 return TensorChippingOp<Dynamic, const Derived>(derived(), offset, dim);
944 template <
typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
945 const TensorReverseOp<const ReverseDimensions, const Derived>
946 reverse(
const ReverseDimensions& rev)
const {
947 return TensorReverseOp<const ReverseDimensions, const Derived>(derived(), rev);
949 template <
typename Rolls> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
950 const TensorRollOp<const Rolls, const Derived>
951 roll(
const Rolls& rolls)
const {
952 return TensorRollOp<const Rolls, const Derived>(derived(), rolls);
954 template <
typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
955 const TensorPaddingOp<const PaddingDimensions, const Derived>
956 pad(
const PaddingDimensions& padding)
const {
957 return TensorPaddingOp<const PaddingDimensions, const Derived>(derived(), padding, internal::scalar_cast_op<int, Scalar>()(0));
959 template <
typename PaddingDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
960 const TensorPaddingOp<const PaddingDimensions, const Derived>
961 pad(
const PaddingDimensions& padding,
const Scalar padding_value)
const {
962 return TensorPaddingOp<const PaddingDimensions, const Derived>(derived(), padding, padding_value);
964 template <
typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
965 const TensorShufflingOp<const Shuffle, const Derived>
966 shuffle(
const Shuffle& shfl)
const {
967 return TensorShufflingOp<const Shuffle, const Derived>(derived(), shfl);
969 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
970 const TensorStridingOp<const Strides, const Derived>
971 stride(
const Strides& strides)
const {
972 return TensorStridingOp<const Strides, const Derived>(derived(), strides);
974 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
975 const TensorInflationOp<const Strides, const Derived>
976 inflate(
const Strides& strides)
const {
977 return TensorInflationOp<const Strides, const Derived>(derived(), strides);
981 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
982 const TensorIndexPairOp<const Derived>
983 index_pairs()
const {
984 return TensorIndexPairOp<const Derived>(derived());
988 template <
typename CustomUnaryFunc>
989 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
990 const TensorCustomUnaryOp<const CustomUnaryFunc, const Derived> customOp(
const CustomUnaryFunc& op)
const {
991 return TensorCustomUnaryOp<const CustomUnaryFunc, const Derived>(derived(), op);
993 template <
typename OtherDerived,
typename CustomBinaryFunc>
994 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
995 const TensorCustomBinaryOp<const CustomBinaryFunc, const Derived, const OtherDerived> customOp(
const OtherDerived& other,
const CustomBinaryFunc& op)
const {
996 return TensorCustomBinaryOp<const CustomBinaryFunc, const Derived, const OtherDerived>(derived(), other, op);
1000 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1001 const TensorForcedEvalOp<const Derived> eval()
const {
1002 return TensorForcedEvalOp<const Derived>(derived());
1006 template<
typename Format>
1007 inline const TensorWithFormat<Derived,DerivedTraits::Layout,DerivedTraits::NumDimensions, Format> format(
const Format& fmt)
const {
1008 return TensorWithFormat<Derived,DerivedTraits::Layout,DerivedTraits::NumDimensions, Format>(derived(), fmt);
1011 #ifdef EIGEN_READONLY_TENSORBASE_PLUGIN
1012 #include EIGEN_READONLY_TENSORBASE_PLUGIN
1016 EIGEN_STRONG_INLINE
const Derived& derived()
const {
return *
static_cast<const Derived*
>(
this); }
1019 template <
typename Scalar,
int NumIndices,
int Options,
typename IndexType>
friend class Tensor;
1020 template <
typename Scalar,
typename Dimensions,
int Option,
typename IndexTypes>
friend class TensorFixedSize;
1022 template <
typename OtherDerived,
int AccessLevel>
friend class Eigen::TensorBase;
1025template<typename Derived, int AccessLevel = internal::accessors_level<Derived>::value>
1028 typedef TensorBase<Derived, ReadOnlyAccessors> Base;
1029 typedef internal::traits<Derived> DerivedTraits;
1030 typedef typename DerivedTraits::Scalar Scalar;
1031 typedef typename DerivedTraits::Index
Index;
1032 typedef Scalar CoeffReturnType;
1033 static constexpr int NumDimensions = DerivedTraits::NumDimensions;
1035 template <
typename Scalar,
int NumIndices,
int Options,
typename IndexType>
friend class Tensor;
1036 template <
typename Scalar,
typename Dimensions,
int Option,
typename IndexTypes>
friend class TensorFixedSize;
1038 template <
typename OtherDerived,
int OtherAccessLevel>
friend class Eigen::TensorBase;
1041 EIGEN_STRONG_INLINE Derived& setZero() {
1042 return setConstant(Scalar(0));
1045 EIGEN_STRONG_INLINE Derived& setConstant(
const Scalar& val) {
1046 return derived() = this->constant(val);
1049 EIGEN_STRONG_INLINE Derived& setRandom() {
1050 return derived() = this->random();
1052 template <
typename RandomGenerator> EIGEN_DEVICE_FUNC
1053 EIGEN_STRONG_INLINE Derived& setRandom() {
1054 return derived() = this->
template random<RandomGenerator>();
1058 EIGEN_STRONG_INLINE Derived& setValues(
1059 const typename internal::Initializer<Derived, NumDimensions>::InitList& vals) {
1060 TensorEvaluator<Derived, DefaultDevice> eval(derived(), DefaultDevice());
1061 internal::initialize_tensor<Derived, NumDimensions>(eval, vals);
1065 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1066 Derived& operator+=(
const OtherDerived& other) {
1067 return derived() = derived() + other.derived();
1069 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1070 Derived& operator-=(
const OtherDerived& other) {
1071 return derived() = derived() - other.derived();
1073 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1074 Derived& operator*=(
const OtherDerived& other) {
1075 return derived() = derived() * other.derived();
1077 template<
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1078 Derived& operator/=(
const OtherDerived& other) {
1079 return derived() = derived() / other.derived();
1082 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1083 const TensorLayoutSwapOp<const Derived>
1084 swap_layout()
const {
1085 return TensorLayoutSwapOp<const Derived>(derived());
1087 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1088 TensorLayoutSwapOp<Derived>
1090 return TensorLayoutSwapOp<Derived>(derived());
1093 template <
typename Axis,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1094 const TensorConcatenationOp<const Axis, const Derived, const OtherDerived>
1095 concatenate(
const OtherDerived& other,
const Axis& axis)
const {
1096 return TensorConcatenationOp<const Axis, const Derived, const OtherDerived>(derived(), other, axis);
1098 template <
typename Axis,
typename OtherDerived> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1099 TensorConcatenationOp<const Axis, Derived, OtherDerived>
1100 concatenate(
const OtherDerived& other,
const Axis& axis) {
1101 return TensorConcatenationOp<const Axis, Derived, OtherDerived>(derived(), other, axis);
1104 template <
typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1105 const TensorReshapingOp<const NewDimensions, const Derived>
1106 reshape(
const NewDimensions& newDimensions)
const {
1107 return TensorReshapingOp<const NewDimensions, const Derived>(derived(), newDimensions);
1109 template <
typename NewDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1110 TensorReshapingOp<const NewDimensions, Derived>
1111 reshape(
const NewDimensions& newDimensions) {
1112 return TensorReshapingOp<const NewDimensions, Derived>(derived(), newDimensions);
1115 template <
typename StartIndices,
typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1116 const TensorSlicingOp<const StartIndices, const Sizes, const Derived>
1117 slice(
const StartIndices& startIndices,
const Sizes& sizes)
const {
1118 return TensorSlicingOp<const StartIndices, const Sizes, const Derived>(derived(), startIndices, sizes);
1120 template <
typename StartIndices,
typename Sizes> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1121 TensorSlicingOp<const StartIndices, const Sizes, Derived>
1122 slice(
const StartIndices& startIndices,
const Sizes& sizes) {
1123 return TensorSlicingOp<const StartIndices, const Sizes, Derived>(derived(), startIndices, sizes);
1126 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1127 const TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides, const Derived>
1128 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides)
const {
1129 return TensorStridingSlicingOp<
const StartIndices,
const StopIndices,
const Strides,
1130 const Derived>(derived(), startIndices, stopIndices, strides);
1132 template <
typename StartIndices,
typename StopIndices,
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1133 TensorStridingSlicingOp<const StartIndices, const StopIndices, const Strides, Derived>
1134 stridedSlice(
const StartIndices& startIndices,
const StopIndices& stopIndices,
const Strides& strides) {
1135 return TensorStridingSlicingOp<
const StartIndices,
const StopIndices,
const Strides,
1136 Derived>(derived(), startIndices, stopIndices, strides);
1139 template <DenseIndex DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1140 const TensorChippingOp<DimId, const Derived>
1141 chip(
const Index offset)
const {
1142 EIGEN_STATIC_ASSERT(DimId < Derived::NumDimensions && DimId >= 0, Chip_Dim_out_of_range)
1143 return TensorChippingOp<DimId, const Derived>(derived(), offset, DimId);
1145 template <Index DimId> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1146 TensorChippingOp<DimId, Derived>
1147 chip(
const Index offset) {
1148 EIGEN_STATIC_ASSERT(DimId < Derived::NumDimensions && DimId >= 0, Chip_Dim_out_of_range)
1149 return TensorChippingOp<DimId, Derived>(derived(), offset, DimId);
1152 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1153 const TensorChippingOp<Dynamic, const Derived>
1154 chip(
const Index offset,
const Index dim)
const {
1155 return TensorChippingOp<Dynamic, const Derived>(derived(), offset, dim);
1157 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1158 TensorChippingOp<Dynamic, Derived>
1160 return TensorChippingOp<Dynamic, Derived>(derived(), offset, dim);
1163 template <
typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1164 const TensorReverseOp<const ReverseDimensions, const Derived>
1165 reverse(
const ReverseDimensions& rev)
const {
1166 return TensorReverseOp<const ReverseDimensions, const Derived>(derived(), rev);
1168 template <
typename ReverseDimensions> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1169 TensorReverseOp<const ReverseDimensions, Derived>
1170 reverse(
const ReverseDimensions& rev) {
1171 return TensorReverseOp<const ReverseDimensions, Derived>(derived(), rev);
1174 template <
typename Rolls> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1175 const TensorRollOp<const Rolls, const Derived>
1176 roll(
const Rolls& roll)
const {
1177 return TensorRollOp<const Rolls, const Derived>(derived(), roll);
1179 template <
typename Rolls> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1180 TensorRollOp<const Rolls, Derived>
1181 roll(
const Rolls& roll) {
1182 return TensorRollOp<const Rolls, Derived>(derived(), roll);
1185 template <
typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1186 const TensorShufflingOp<const Shuffle, const Derived>
1187 shuffle(
const Shuffle& shfl)
const {
1188 return TensorShufflingOp<const Shuffle, const Derived>(derived(), shfl);
1190 template <
typename Shuffle> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1191 TensorShufflingOp<const Shuffle, Derived>
1192 shuffle(
const Shuffle& shfl) {
1193 return TensorShufflingOp<const Shuffle, Derived>(derived(), shfl);
1196 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1197 const TensorStridingOp<const Strides, const Derived>
1198 stride(
const Strides& strides)
const {
1199 return TensorStridingOp<const Strides, const Derived>(derived(), strides);
1201 template <
typename Str
ides> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
1202 TensorStridingOp<const Strides, Derived>
1203 stride(
const Strides& strides) {
1204 return TensorStridingOp<const Strides, Derived>(derived(), strides);
1208 template <
typename DeviceType>
1209 TensorDevice<Derived, DeviceType> device(
const DeviceType& dev) {
1210 return TensorDevice<Derived, DeviceType>(dev, derived());
1214 template <
typename DeviceType,
typename DoneCallback>
1215 TensorAsyncDevice<Derived, DeviceType, DoneCallback> device(
const DeviceType& dev, DoneCallback done) {
1216 return TensorAsyncDevice<Derived, DeviceType, DoneCallback>(dev, derived(), std::move(done));
1220 EIGEN_STRONG_INLINE Derived& derived() {
return *
static_cast<Derived*
>(
this); }
1222 EIGEN_STRONG_INLINE
const Derived& derived()
const {
return *
static_cast<const Derived*
>(
this); }
1224 #ifdef EIGEN_TENSORBASE_PLUGIN
1225 #include EIGEN_TENSORBASE_PLUGIN
1229 EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(TensorBase)
1230 EIGEN_DEFAULT_COPY_CONSTRUCTOR(TensorBase)
1232 template<
typename OtherDerived> EIGEN_DEVICE_FUNC
1233 EIGEN_STRONG_INLINE Derived& operator=(
const OtherDerived& other)
1235 typedef TensorAssignOp<Derived, const OtherDerived> Assign;
1236 Assign assign(derived(), other.derived());
1237 internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());
The tensor base class.
Definition TensorForwardDeclarations.h:68
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:269
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k0e_op< typename Derived::Scalar >, const Derived > bessel_k0e(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:142
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k0_op< typename Derived::Scalar >, const Derived > bessel_k0(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:120
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sqrt_op< typename Derived::Scalar >, const Derived > sqrt(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_real_op< typename Derived::Scalar >, const Derived > real(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_rint_op< typename Derived::Scalar >, const Derived > rint(const Eigen::ArrayBase< Derived > &x)
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:93
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_inverse_op< typename Derived::Scalar >, const Derived > inverse(const Eigen::ArrayBase< Derived > &x)
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:52
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_expm1_op< typename Derived::Scalar >, const Derived > expm1(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_exp_op< typename Derived::Scalar >, const Derived > exp(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_rsqrt_op< typename Derived::Scalar >, const Derived > rsqrt(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_cube_op< typename Derived::Scalar >, const Derived > cube(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_log2_op< typename Derived::Scalar >, const Derived > log2(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_square_op< typename Derived::Scalar >, const Derived > square(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_abs_op< typename Derived::Scalar >, const Derived > abs(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sign_op< typename Derived::Scalar >, const Derived > sign(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k1_op< typename Derived::Scalar >, const Derived > bessel_k1(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:163
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i1_op< typename Derived::Scalar >, const Derived > bessel_i1(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:77
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i0e_op< typename Derived::Scalar >, const Derived > bessel_i0e(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:56
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_lgamma_op< typename Derived::Scalar >, const Derived > lgamma(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i1e_op< typename Derived::Scalar >, const Derived > bessel_i1e(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:99
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_j1_op< typename Derived::Scalar >, const Derived > bessel_j1(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:248
const Product< Inverse< PermutationType >, SparseDerived, AliasFreeProduct > operator*(const InverseImpl< PermutationType, PermutationStorage > &tperm, const SparseMatrixBase< SparseDerived > &matrix)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_y0_op< typename Derived::Scalar >, const Derived > bessel_y0(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:227
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i0_op< typename Derived::Scalar >, const Derived > bessel_i0(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:34
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_round_op< typename Derived::Scalar >, const Derived > round(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_isinf_op< typename Derived::Scalar >, const Derived > isinf(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_log1p_op< typename Derived::Scalar >, const Derived > log1p(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_erf_op< typename Derived::Scalar >, const Derived > erf(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_imag_op< typename Derived::Scalar >, const Derived > imag(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_log_op< typename Derived::Scalar >, const Derived > log(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_isfinite_op< typename Derived::Scalar >, const Derived > isfinite(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k1e_op< typename Derived::Scalar >, const Derived > bessel_k1e(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:185
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:75
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_erfc_op< typename Derived::Scalar >, const Derived > erfc(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_ndtri_op< typename Derived::Scalar >, const Derived > ndtri(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_tanh_op< typename Derived::Scalar >, const Derived > tanh(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_arg_op< typename Derived::Scalar >, const Derived > arg(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_isnan_op< typename Derived::Scalar >, const Derived > isnan(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_digamma_op< typename Derived::Scalar >, const Derived > digamma(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_floor_op< typename Derived::Scalar >, const Derived > floor(const Eigen::ArrayBase< Derived > &x)
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:113
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_j0_op< typename Derived::Scalar >, const Derived > bessel_j0(const Eigen::ArrayBase< Derived > &x)
Definition BesselFunctionsArrayAPI.h:206
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:152
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_ceil_op< typename Derived::Scalar >, const Derived > ceil(const Eigen::ArrayBase< Derived > &x)