Signature Description Parameters
template<typename T, typename I = unsigned long>
struct AffinityPropVisitor;
This is a “single action visitor”, meaning it is passed the whole data vector in one call and you must use the single_action_visit() interface.
This functor class finds clusters in data using Affinity Propagation algorithm.
The constructor takes three parameters
1. Number of iterations
2. A function to calculate distance between to data points of type T with a default value
          KMeansVisitor(size_type num_of_iter,
                        distance_func f = [](const value_type &x, const value_type &y) -> double {
                            return ((x - y) * (x - y));
                        })
        
3. Damping factor used in the algorithm. The default is 0.9. (1 – damping factor) prevents numerical oscillations.
The result type is VectorPtrView of type T containing the centers of clusters.
There is also a get_clusters() method that returns an vector of VectorPtrView’s which contain the data clustered around the centers.
T: Column data type
I: Index type