Stan Math Library
2.10.0
reverse mode automatic differentiation
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
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 <valarray>
5
6
namespace
stan
{
7
namespace
math {
8
inline
double
calculate_chain
(
const
double
& x,
const
double
& val) {
9
return
std::exp
(x - val);
// works out to inv_logit(x)
10
}
11
}
12
}
13
#endif
stan
Definition:
log_sum_exp.hpp:8
stan::math::calculate_chain
double calculate_chain(const double &x, const double &val)
Definition:
calculate_chain.hpp:8
stan::math::exp
fvar< T > exp(const fvar< T > &x)
Definition:
exp.hpp:10
[
Stan Home Page
]
© 2011–2016, Stan Development Team.