added general templated distance function to return a vector of vectors of double by going a std::func object that takes variable amount of args and just needs to be able to take in two of the what's in the template vector and give a distance as a double