1 #ifndef STAN__MATH__MATRIX__DISTANCE_HPP
2 #define STAN__MATH__MATRIX__DISTANCE_HPP
6 #include <boost/math/tools/promotion.hpp>
23 template<
typename T1,
int R1,
int C1,
typename T2,
int R2,
int C2>
24 inline typename boost::math::tools::promote_args<T1,T2>::type
26 const Eigen::Matrix<T2, R2, C2>& v2) {
bool check_vector(const char *function, const Eigen::Matrix< T, R, C > &x, const char *name, T_result *result)
fvar< T > sqrt(const fvar< T > &x)
bool check_matching_sizes(const char *function, const T_y1 &y1, const char *name1, const T_y2 &y2, const char *name2, T_result *result)
boost::math::tools::promote_args< T1, T2 >::type squared_distance(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
Returns the squared distance between the specified vectors.
boost::math::tools::promote_args< T1, T2 >::type distance(const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2)
Returns the distance between the specified vectors.