| StringComparator-class {comparator} | R Documentation |
Virtual String Comparator Class
Description
Represents a comparator for pairs of strings.
Slots
.Dataa function that calls the elementwise method for this class, with arguments
x,yand....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.ignore_casea logical of length 1. If TRUE, case is ignored when comparing strings. Defaults to FALSE.
use_bytesa logical of length 1. If TRUE, strings are compared byte-by-byte rather than character-by-character.