Learn R Programming

Rfmtool (version 5.0.3)

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

Description

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

Usage

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

Value

output

The output is an added pair v_ij to the structure.

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)

Author

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

Examples

Run this code
  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)    
  

Run the code above in your browser using DataLab