Given a set of similarities, data, this function computes a lower bound, pmin, on the value for the preference where the optimal number of clusters (exemplars) changes from 1 to 2,
and the exact value of the preference, pmax, where the optimal number of clusters changes from n-1 to n. For N data points, there may be as many as N^2-N pair-wise similarities (note that
the similarity of data point i to k need not be equal to the similarity of data point k to i). These may be passed in an NxN matrix of similarities, data, where data(i,k) is the similarity of
point i to point k. In fact, only a smaller number of relevant similarities need to be provided, in which case the others are assumed to be -Inf. M similarity values are known, can be passed
in an Mx3 matrix data, where each row of data contains a pair of data point indices and a corresponding similarity value: data(j,3) is the similarity of data point data(j,1) to
data point data(j,2).
A single-cluster solution may not exist, in which case pmin is set to NaN. The AP_preferenceRange uses one of the methods below to compute pmin and pmax:
exact : Computes the exact values for pmin and pmax (Warning: This can be quite slow)
bound : Computes the exact value for pmax, but estimates pmin using a bound (default)