Stan Math Library
2.20.0
reverse mode automatic differentiation
stan
math
rev
scal
fun
calculate_chain.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_SCAL_FUN_CALCULATE_CHAIN_HPP
2
#define STAN_MATH_REV_SCAL_FUN_CALCULATE_CHAIN_HPP
3
4
#include <
stan/math/rev/meta.hpp
>
5
#include <cmath>
6
7
namespace
stan
{
8
namespace
math {
9
10
inline
double
calculate_chain
(
double
x,
double
val) {
11
return
std::exp
(x - val);
// works out to inv_logit(x)
12
}
13
14
}
// namespace math
15
}
// namespace stan
16
#endif
stan
Definition:
log_sum_exp.hpp:8
stan::math::exp
fvar< T > exp(const fvar< T > &x)
Definition:
exp.hpp:11
stan::math::calculate_chain
double calculate_chain(double x, double val)
Definition:
calculate_chain.hpp:10
meta.hpp
[
Stan Home Page
]
© 2011–2018, Stan Development Team.