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

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

public class NSMUpdateOperations
extends java.lang.Object


Constructor Summary
NSMUpdateOperations()
           
 
Method Summary
static void delete(NestorSetAndElementTables nsm, java.lang.Integer element)
           
static void deleteSet(NestorSetAndElementTables nsm, java.lang.Integer setH)
          This class implements the algorithm Delete-Set-NSM(C,H) which deletes a set H from a NS-M C: Define a set, say K, containing all the elements in H minus all the elements belonging to its direct subsets - i.e.
static void insert(NestorSetAndElementTables nsm, int set, int element)
           
static void insertAsSubset(NestorSetAndElementTables nsm, int setK, int elemNum)
          The id of the added set is automatically assigned.
static void insertAsSuperset(NestorSetAndElementTables nsm, int setK, int elemNum)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NSMUpdateOperations

public NSMUpdateOperations()
Method Detail

insert

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

delete

public static void delete(NestorSetAndElementTables nsm,
                          java.lang.Integer element)
Parameters:
nsm - The three lists M, D+ and S-.
element - The id of the element that has to be deleted.

insertAsSubset

public static void insertAsSubset(NestorSetAndElementTables nsm,
                                  int setK,
                                  int elemNum)
The id of the added set is automatically assigned.

Parameters:
nsm - The three lists M, D+ and S-.
setK - The id of the set which will become the superset of the set that has to be added.
elemNum - The cardinality of the new set.

insertAsSuperset

public static void insertAsSuperset(NestorSetAndElementTables nsm,
                                    int setK,
                                    int elemNum)
Parameters:
nsm -
setK -
elemNum -

deleteSet

public static void deleteSet(NestorSetAndElementTables nsm,
                             java.lang.Integer setH)
This class implements the algorithm Delete-Set-NSM(C,H) which deletes a set H from a NS-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.