| Comparator-class {comparator} | R Documentation |
Virtual Comparator Class
Description
This class represents a function for comparing pairs of
objects. It is the base class from which other types of comparators (e.g.
NumericComparator and StringComparator) are derived.
Slots
.Dataa function which takes a pair of arguments
xandy, and returns the elementwise scores.symmetrica logical of length 1. If TRUE, the comparator is symmetric in its arguments—i.e.
comparator(x, y)is identical tocomparator(y, x).distancea logical of length 1. If
TRUE, the comparator produces distances and satisfiescomparator(x, x) = 0. The comparator may not satisfy all of the properties of a distance metric.similaritya logical of length 1. If
TRUE, the comparator produces similarity scores.tri_inequala logical of length 1. If
TRUE, the comparator satisfies the triangle inequality. This is only possible (but not guaranteed) ifdistance = TRUEandsymmetric = TRUE.