Tensor comparison and asymmetric comparison between two vectors
zzasym_compare.RdTensor comparison and asymmetric comparison between two vectors.
Details
.ocompare (for "outer compare") returns a matrix whose (i,j)th
element is TRUE if x[i] is identical to y[j], and FALSE otherwise.
.asym_compare calls .ocompare and iterprets its result
asymmetrically. Elements of x that are not in y ae
considered "new". Similarly, Elements of y that are not in
x ae considered "removed". Elements that are in both are
"common".
Todo: check if the above is correct or the other way round! !!!
Value
For .ocompare, a matrix as described in Details.
For .asym_compare a list with indices as follows.
- i_new
new elements, indices in
xof elements that are not iny.- i_removed
removed elements, indices in
yof elements that are not inx.- i_common
common elements, indices in
xof elements that are in both,xandy.