Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. template <int Dim>
  2. double KDTree<Dim>::dist(const Point<Dim>& a, const Point<Dim>& b) const
  3. {
  4. /**
  5. * @todo Implement this function!
  6. */
  7. double pa = 0;
  8. for(int i = 0; i < Dim; i++){
  9. pa+=((a[i] - b[i])*(a[i] - b[i]));
  10. }
  11. return pa;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement