fm.is_inset_sparse: Function for checking if i belongs to the tuple A

View source: R/Rfmtool.r

fm.is_inset_sparse R Documentation

Function for checking if i belongs to the tuple A

Description

Checks if element i (1-based) belongs to the tuple indexed A (whose cardinality can be 1,2, other (automatically determined)).

Usage

  fm.is_inset_sparse(A, card, i, envsp=NULL)

Arguments

A

Tuple indexed.

card

Whose cardinality can be 1,2, other (automatically determined)

i

Element (1-based)

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);

  fm.is_inset_sparse(0,3,1,envsp)
  fm.is_inset_sparse(0,3,4,envsp)

  envsp <- fm.FreeSparseFM(envsp)


Rfmtool documentation built on Feb. 16, 2023, 9:21 p.m.