1#ifndef STAN_MATH_FWD_FUN_EIGEN_NUMTRAITS_HPP
2#define STAN_MATH_FWD_FUN_EIGEN_NUMTRAITS_HPP
23 RequireInitialization = 1,
28 ReadCost = 2 * NumTraits<double>::ReadCost,
37 AddCost = 2 * NumTraits<T>::AddCost,
46 MulCost = 3 * NumTraits<T>::MulCost + NumTraits<T>::AddCost
54 static int digits10() {
return std::numeric_limits<double>::digits10; }
65template <
typename T,
typename BinaryOp>
66struct ScalarBinaryOpTraits<
stan::math::fvar<T>, double, BinaryOp> {
78template <
typename T,
typename BinaryOp>
79struct ScalarBinaryOpTraits<double,
stan::math::fvar<T>, BinaryOp> {
91template <
typename T,
typename BinaryOp>
92struct ScalarBinaryOpTraits<
stan::math::fvar<T>, int, BinaryOp> {
104template <
typename T,
typename BinaryOp>
105struct ScalarBinaryOpTraits<int,
stan::math::fvar<T>, BinaryOp> {
117template <
typename T,
typename BinaryOp>
118struct ScalarBinaryOpTraits<double,
std::complex<stan::math::fvar<T>>,
131template <
typename T,
typename BinaryOp>
132struct ScalarBinaryOpTraits<
std::complex<stan::math::fvar<T>>, double,
145template <
typename T,
typename BinaryOp>
146struct ScalarBinaryOpTraits<int,
std::complex<stan::math::fvar<T>>, BinaryOp> {
158template <
typename T,
typename BinaryOp>
159struct ScalarBinaryOpTraits<
std::complex<stan::math::fvar<T>>, int, BinaryOp> {
171template <
typename T,
typename BinaryOp>
172struct ScalarBinaryOpTraits<
stan::math::fvar<T>, std::complex<double>,
185template <
typename T,
typename BinaryOp>
199template <
typename T,
typename BinaryOp>
200struct ScalarBinaryOpTraits<
std::complex<double>,
201 std::complex<stan::math::fvar<T>>, BinaryOp> {
213template <
typename T,
typename BinaryOp>
214struct ScalarBinaryOpTraits<
std::complex<stan::math::fvar<T>>,
215 std::complex<double>, BinaryOp> {
224template <
typename EigFvar,
typename EigOut>
225struct functor_has_linear_access<
226 stan::math::read_fvar_functor<EigFvar, EigOut>> {
Specialization of the standard library complex number type for reverse-mode autodiff type stan::math:...
(Expert) Numerical traits for algorithmic differentiation variables.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
static int digits10()
Return the number of decimal digits that can be represented without change.
This template class represents scalars used in forward-mode automatic differentiation,...