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

◆ squared_distance() [4/11]

template<typename EigVec1 , typename EigVec2 , require_all_eigen_vector_t< EigVec1, EigVec2 > * = nullptr, require_all_not_eigen_vt< is_var, EigVec1, EigVec2 > * = nullptr>
return_type_t< EigVec1, EigVec2 > stan::math::squared_distance ( const EigVec1 &  v1,
const EigVec2 &  v2 
)
inline

Returns the squared distance between the specified vectors of the same dimensions.

Template Parameters
EigVec1type of the first vector (must be derived from Eigen::MatrixBase and have one compile time dimension equal to 1)
EigVec2type of the second vector (must be derived from Eigen::MatrixBase and have one compile time dimension equal to 1)
Parameters
v1First vector.
v2Second vector.
Returns
Square of distance between vectors.
Exceptions
std::domain_errorIf the vectors are not the same size.

Definition at line 50 of file squared_distance.hpp.