Stan Math Library
2.15.0
reverse mode automatic differentiation
stan
math
rev
mat
fun
divide.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_MAT_FUN_DIVIDE_HPP
2
#define STAN_MATH_REV_MAT_FUN_DIVIDE_HPP
3
4
#include <
stan/math/prim/mat/fun/Eigen.hpp
>
5
#include <
stan/math/prim/mat/fun/typedefs.hpp
>
6
#include <
stan/math/rev/core.hpp
>
7
#include <
stan/math/rev/mat/fun/to_var.hpp
>
8
#include <
stan/math/rev/mat/fun/typedefs.hpp
>
9
#include <vector>
10
11
namespace
stan
{
12
namespace
math {
13
21
template
<
typename
T1,
typename
T2,
int
R,
int
C>
22
inline
Eigen::Matrix<var, R, C>
23
divide
(
const
Eigen::Matrix<T1, R, C>& v,
const
T2& c) {
24
return
to_var
(v) /
to_var
(c);
25
}
26
27
}
28
}
29
#endif
core.hpp
stan
Definition:
log_sum_exp.hpp:8
to_var.hpp
typedefs.hpp
stan::math::divide
Eigen::Matrix< fvar< T >, R, C > divide(const Eigen::Matrix< fvar< T >, R, C > &v, const fvar< T > &c)
Definition:
divide.hpp:16
Eigen.hpp
stan::math::to_var
std::vector< var > to_var(const std::vector< double > &v)
Converts argument to an automatic differentiation variable.
Definition:
to_var.hpp:20
typedefs.hpp
[
Stan Home Page
]
© 2011–2016, Stan Development Team.