// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2014 Gael Guennebaud <[email protected]> // Copyright (C) 2006-2008 Benoit Jacob <[email protected]> // Copyright (C) 2016 Eugene Brevdo <[email protected]> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifndef EIGEN_CWISE_TERNARY_OP_H #define EIGEN_CWISE_TERNARY_OP_H // IWYU pragma: private #include "./InternalHeaderCheck.h" namespace Eigen { namespace internal { traits<CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3>>; } // end namespace internal template <typename TernaryOp, typename Arg1, typename Arg2, typename Arg3, typename StorageKind> class CwiseTernaryOpImpl; /** \class CwiseTernaryOp * \ingroup Core_Module * * \brief Generic expression where a coefficient-wise ternary operator is * applied to two expressions * * \tparam TernaryOp template functor implementing the operator * \tparam Arg1Type the type of the first argument * \tparam Arg2Type the type of the second argument * \tparam Arg3Type the type of the third argument * * This class represents an expression where a coefficient-wise ternary * operator is applied to three expressions. * It is the return type of ternary operators, by which we mean only those * ternary operators where * all three arguments are Eigen expressions. * For example, the return type of betainc(matrix1, matrix2, matrix3) is a * CwiseTernaryOp. * * Most of the time, this is the only way that it is used, so you typically * don't have to name * CwiseTernaryOp types explicitly. * * \sa MatrixBase::ternaryExpr(const MatrixBase<Argument2> &, const * MatrixBase<Argument3> &, const CustomTernaryOp &) const, class CwiseBinaryOp, * class CwiseUnaryOp, class CwiseNullaryOp */ template <typename TernaryOp, typename Arg1Type, typename Arg2Type, typename Arg3Type> class CwiseTernaryOp : public CwiseTernaryOpImpl<TernaryOp, Arg1Type, Arg2Type, Arg3Type, typename internal::traits<Arg1Type>::StorageKind>, internal::no_assignment_operator { … }; // Generic API dispatcher template <typename TernaryOp, typename Arg1, typename Arg2, typename Arg3, typename StorageKind> class CwiseTernaryOpImpl : public internal::generic_xpr_base<CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3>>::type { … }; } // end namespace Eigen #endif // EIGEN_CWISE_TERNARY_OP_H