1#ifndef STAN_MATH_PRIM_FUN_DISTANCE_HPP
2#define STAN_MATH_PRIM_FUN_DISTANCE_HPP
25template <
typename T1,
typename T2,
26 require_all_stan_scalar_t<T1, T2>* =
nullptr>
46template <
typename T1,
typename T2, require_all_vector_t<T1, T2>* =
nullptr>
typename return_type< Ts... >::type return_type_t
Convenience type for the return type of the specified template parameters.
fvar< T > abs(const fvar< T > &x)
auto distance(const T_a &a, const T_b &b)
Returns the distance between the specified vectors.
void check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Check if two structures at the same size.
fvar< T > sqrt(const fvar< T > &x)
void check_finite(const char *function, const char *name, const T_y &y)
Return true if all values in y are finite.
auto squared_distance(const T_a &a, const T_b &b)
Returns the squared distance.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...