00001 #ifndef mbl_vector_distance_h_ 00002 #define mbl_vector_distance_h_ 00003 //: 00004 // \file 00005 // \brief Functor object to compute distance between two vectors 00006 // \author Tim Cootes 00007 00008 #include <vnl/vnl_vector.h> 00009 #include <vcl_cmath.h> 00010 00011 //: Functor object to compute distance between two vectors 00012 template<class T> 00013 class mbl_vector_distance { 00014 public: 00015 static double d(const vnl_vector<T>& v1, 00016 const vnl_vector<T>& v2) 00017 { return vcl_sqrt(vnl_vector_ssd(v1,v2)); } 00018 }; 00019 00020 #endif // mbl_vector_distance_h_