1#ifndef STAN_MATH_PRIM_FUN_CONJ_HPP
2#define STAN_MATH_PRIM_FUN_CONJ_HPP
18inline std::complex<V>
conj(
const std::complex<V>& z) {
29template <
typename Eig, require_eigen_vt<is_complex, Eig>* =
nullptr>
30inline auto conj(
const Eig& z) {
41template <
typename StdVec, require_std_vector_st<is_complex, StdVec>* =
nullptr>
42inline auto conj(
const StdVec& z) {
44 std::transform(z.begin(), z.end(), result.begin(),
45 [](
auto&& x) { return stan::math::conj(x); });
59 return {z.real(), -z.imag()};
std::complex< V > complex_conj(const std::complex< V > &z)
Return the complex conjugate the complex argument.
typename promote_scalar_type< std::decay_t< T >, std::decay_t< S > >::type promote_scalar_t
std::complex< fvar< T > > conj(const std::complex< fvar< T > > &z)
Return the phase angle of the complex argument.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...