Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ distance() [2/2]

template<typename T1 , typename T2 , require_all_stan_scalar_t< T1, T2 > * = nullptr>
return_type_t< T1, T2 > stan::math::distance ( const T1 &  x1,
const T2 &  x2 
)
inline

Returns the distance between two scalars.

Returns the distance between the specified vectors.

Template Parameters
T1type of first scalar.
T2type of second scalar
Parameters
x1First scalar.
x2Second scalar.
Returns
Distance between two scalars
Exceptions
std::domain_errorIf the arguments are not finite.
Template Parameters
T1type of the first vector (must be derived from Eigen::MatrixBase and have one compile time dimension equal to 1)
T2type of the second vector (must be derived from Eigen::MatrixBase and have one compile time dimension equal to 1)
Parameters
x1First vector.
x2Second vector.
Returns
Distance between the vectors.
Exceptions
std::domain_errorIf the vectors are not the same size.

Definition at line 27 of file distance.hpp.