fm.add_pair_sparse: Function for adding a pair to the sparse fuzzy measure

View source: R/Rfmtool.r

fm.add_pair_sparseR Documentation

Function for adding a pair to the sparse fuzzy measure

Description

This is used for populating capacities which Add a pair vij to the structure, their Indices are 1-based.

Usage

  fm.add_pair_sparse( i, j, v, envsp = NULL)

Arguments

i

One of the indices which are 1-based

j

One of the indices which are 1-based

v

The value to be added.

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 an added pair vij to the structure.

Author(s)

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

Examples

  n <- 3
  tups<-vector()
  tupsidx<-vector()
  envsp <- fm.PrepareSparseFM(n, tups,tupsidx) 
   envsp <-fm.add_pair_sparse(1,2, 0.4, envsp)
   envsp <-fm.add_pair_sparse(1,3, 0.3, envsp)
envsp
     envsp <- fm.FreeSparseFM(envsp)    
  

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