fm.is_subset_sparse {Rfmtool} | R Documentation |
Function for checking if tuple B is subset of tuple A
Description
Checks if tuple B is a subset of tuple A, The cardinalities of both tuples need to be supplied.
Usage
fm.is_subset_sparse(A, cardA, B, cardB, envsp = NULL)
Arguments
A |
Tuple |
cardA |
Whose cardinality can be 1,2, other (automatically determined) |
B |
Tuple, tup=0 |
cardB |
Whose cardinality can be 1,2, other (automatically determined) |
envsp |
Structure required for sparse representation which stores the relevant values (k-tuples). It is obtained from fm.PrepareSparseFM(n). |
Value
output |
The output is a logical value. |
Author(s)
Gleb Beliakov, Andrei Kelarev, Quan Vu, Daniela L. Calderon, Deakin University
Examples
n <- 3
envsp <- fm.PrepareSparseFM(n, vector(), vector())
envsp <- fm.add_singletons_sparse(c(0.2,0.1,0.2),envsp)
envsp <- fm.add_tuple_sparse(c(1,2,3),0.4,envsp);
envsp <- fm.add_pair_sparse(1,2,0.2,envsp);
envsp <- fm.add_pair_sparse(1,3,0.3,envsp);
fm.is_subset_sparse(0,3,0,2,envsp) #is 0th pair a subset of the 0th tuple?
fm.is_subset_sparse(0,3,1,2,envsp) #is 1th pair a subset of the 0th tuple?
envsp<-fm.FreeSparseFM(envsp)
[Package Rfmtool version 5.0.4 Index]