Stan Math Library
5.0.0
Automatic Differentiation
Loading...
Searching...
No Matches
polar.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_FUN_POLAR_HPP
2
#define STAN_MATH_REV_FUN_POLAR_HPP
3
4
#include <
stan/math/rev/core.hpp
>
5
#include <
stan/math/rev/fun/is_inf.hpp
>
6
#include <
stan/math/rev/fun/cos.hpp
>
7
#include <
stan/math/rev/fun/sin.hpp
>
8
#include <
stan/math/prim/meta.hpp
>
9
#include <
stan/math/prim/fun/isinf.hpp
>
10
#include <
stan/math/prim/fun/isfinite.hpp
>
11
#include <
stan/math/prim/fun/is_inf.hpp
>
12
#include <
stan/math/prim/fun/polar.hpp
>
13
#include <complex>
14
#include <type_traits>
15
16
namespace
stan
{
17
namespace
math {
18
26
inline
std::complex<var>
polar
(
const
var
& r,
const
var
& theta) {
27
return
internal::complex_polar
(r, theta);
28
}
29
38
template
<
typename
T>
39
inline
std::complex<var>
polar
(T r,
const
var
& theta) {
40
return
internal::complex_polar
(r, theta);
41
}
42
51
template
<
typename
T>
52
inline
std::complex<var>
polar
(
const
var
& r, T theta) {
53
return
internal::complex_polar
(r, theta);
54
}
55
56
}
// namespace math
57
}
// namespace stan
58
59
#endif
stan::math::var_value< double >
isfinite.hpp
isinf.hpp
stan::math::internal::complex_polar
complex_return_t< U, V > complex_polar(const U &r, const V &theta)
Returns complex number with specified magnitude and phase angle.
Definition
polar.hpp:23
stan::math::polar
std::complex< fvar< T > > polar(const fvar< T > &r, const fvar< T > &theta)
Returns complex number with specified magnitude and phase angle.
Definition
polar.hpp:25
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
is_inf.hpp
polar.hpp
meta.hpp
core.hpp
cos.hpp
is_inf.hpp
sin.hpp
stan
math
rev
fun
polar.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.