How do you save the function from a function pointer as a class' member function?
===

Basically, I have a templated class that runs some algorithm, and that algorithm needs a `similarity(T t1, T t2)` function that returns a double defining how similar two objects of type T are.  This similarity function varies greatly depending on what T is defined as, so the caller of this class needs to define the similarity function.  I assume a function pointer is in order, but how do I save a function from a function pointer as a member function for use in the algorithm?  

That is, I want to pass in `similarity(T t1, T t2)` in the class' constructor and be able to call that as a member function throughout the class.  How do I do that?  Thanks