Functions and objects for VSA similarity values.
Functions to convert between
simvals and ordinary scalar values.
a numeric value (i.e., a vector of length 1 )
simval ("Similarity value") is a numeric vector of length 1
with the S3 class
simval. Various functions, e.g.,
simval objects. A object with a class
is used instead of an ordinary scalar so as to catch some possible
operator precedence errors such as writing
x * y %.% z with the
(false) belief that it will be parsed as
(x * y) %.% z when in
fact it will be parsed as
x * (y %.% z). Having
simval object allows the expression
x * y %.% z
to result in an error, because it is illegal to multiple a vector by a
x * (y %.% z) really was intended, then it
must be written as
x * scalar(y %.% z).
simval() returns a vector with the S3 class
scalar() strips off the S3 class
simval (i.e., it returns a numeric vector with no S3 class).
Tony Plate firstname.lastname@example.org
1 2 3 4 5
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.