Learn R Programming

Rfmtool (version 5.0.3)

fm.add_tuple_sparse: Function for adding singletons to the sparse fuzzy measure

Description

This is used for populating capacities which Add a tuple of size tupsize to the structure whose Indices are 1-based in tuple.

For populating capacities, adds a whose 1-based indices are in tuple

Usage

fm.add_tuple_sparse( tuple, v, envsp=NULL)

Value

output

The output is adding a tuple of size tupsize

Arguments

tuple

Collection of objects. It is a list of cardinalities of the nonzero tuples (cardinality, tuple composition)

v

The value of the tuple to be added

envsp

Structure required for sparse representation which stores the relevant values (k-tuples). It is obtained from fm.PrepareSparseFM(n).

Author

Gleb Beliakov, Andrei Kelarev, Quan Vu, Daniela L. Calderon, Deakin University

Examples

Run this code
    n <- 4
  tups<-vector()
  tupsidx<-vector()
  envsp <- fm.PrepareSparseFM(n, tups,tupsidx) 
  envsp <- fm.add_tuple_sparse(c(1,2,3),0.2,envsp)
  envsp <- fm.add_tuple_sparse(c(1,3,4),0.3,envsp)
  

Run the code above in your browser using DataLab