it.unipd.dei.ims.nestor.experiment.primitives
Class InverseNSMUpdateOperations

java.lang.Object
  extended by it.unipd.dei.ims.nestor.experiment.primitives.InverseNSMUpdateOperations

public class InverseNSMUpdateOperations
extends java.lang.Object

Author:
gianmariasilvello

Constructor Summary
InverseNSMUpdateOperations()
           
 
Method Summary
static void deleteSet(NestorSetAndElementTables insm, java.lang.Integer setH)
          This class implements the algorithm Delete-Set-INSM(C,H) which deletes a set H from a INS-M C: Define a set, say K, containing all the elements in H minus all the elements belonging to its direct subset - i.e.
static void insert(NestorSetAndElementTables insm, int set, int element)
           
static void insertAsSubset(NestorSetAndElementTables insm, int sizeC, int setK, int elemNum)
          This class implements the InsertasSubset-INSM algorithm.
static void insertAsSuperset(NestorSetAndElementTables insm, int sizeC, int setK, int elemNum)
          This class implements the InsertasSuperset-INSM(K,H) algorithm; in this case the set H has to be added to the INS-C C as a subset of K.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InverseNSMUpdateOperations

public InverseNSMUpdateOperations()
Method Detail

insert

public static void insert(NestorSetAndElementTables insm,
                          int set,
                          int element)
Parameters:
insm -
set -
element -

insertAsSubset

public static void insertAsSubset(NestorSetAndElementTables insm,
                                  int sizeC,
                                  int setK,
                                  int elemNum)
This class implements the InsertasSubset-INSM algorithm. As an example the operation InsertasSubset-INSM(K,H) adds the set H to the INS-M C as a subset of K. The algorithm implementing the InsertasSubset-INSM(K,H) operation has to:

Parameters:
insm - The inverse nested sets and elements tables containing the lists M, S-, and D+ representing the data structure for the INS-C C.
sizeC - the number of elements in C => the max integer referring to an element.
setK - the reference to the set K, which has to be the superset of the newly inserted set.
elemNum - the cardinality of the new inserted set.

insertAsSuperset

public static void insertAsSuperset(NestorSetAndElementTables insm,
                                    int sizeC,
                                    int setK,
                                    int elemNum)
This class implements the InsertasSuperset-INSM(K,H) algorithm; in this case the set H has to be added to the INS-C C as a subset of K. The main steps that the InsertasSuperset-INSM(K,H) has to follow are to:

Parameters:
insm - The inverse nested sets and elements tables containing the lists M, S-, and D+ representing the data structure for the INS-C C.
sizeC - the number of elements in C => the max integer referring to an element.
setK - the reference to the set K, which has to be the subset of the newly inserted set.
elemNum - the cardinality of the new inserted set.

deleteSet

public static void deleteSet(NestorSetAndElementTables insm,
                             java.lang.Integer setH)
This class implements the algorithm Delete-Set-INSM(C,H) which deletes a set H from a INS-M C:

Parameters:
nsm - The three lists M, D+ and S-.
setH - The set that has to be deleted along with all of its elements.