Class VariableGranularityBlocker

  • All Implemented Interfaces:
    IBlockingModule

    public class VariableGranularityBlocker
    extends Object
    implements IBlockingModule
    Author:
    Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de)
    • Constructor Detail

      • VariableGranularityBlocker

        public VariableGranularityBlocker​(String props,
                                          String measureName,
                                          double threshold)
      • VariableGranularityBlocker

        public VariableGranularityBlocker​(String props,
                                          String measureName,
                                          double threshold,
                                          int _granularity)
    • Method Detail

      • setGranularity

        public void setGranularity​(int n)
      • getBlocksToCompare

        public ArrayList<ArrayList<Integer>> getBlocksToCompare​(ArrayList<Integer> blockId)
        Computes the block ID for a given instance a. The idea behind the blocking is to tile the target space into blocks of dimension thresdhold^dimensions. Each instance s from the source space is then compared with the blocks lying directly around s's block and the block where s is.
        Specified by:
        getBlocksToCompare in interface IBlockingModule
        Parameters:
        blockId - The instance whose blockId is to be computed
        Returns:
        The ID for the block of a
      • getAllBlockIds

        public ArrayList<ArrayList<Integer>> getAllBlockIds​(Instance a)
        Computes all the block ids for a given instance. If it is known that the coordinates of an instance are unique, then use getBlockId. If not, use this method.
        Specified by:
        getAllBlockIds in interface IBlockingModule
        Parameters:
        a - Instance, whose ids are to be returned
        Returns:
        An ArrayList of blockids
      • getAllSourceIds

        public ArrayList<ArrayList<Integer>> getAllSourceIds​(Instance a,
                                                             String props)
        Computes all the block ids for a given instance. If it is known that the coordinates of an instance are unique, then use getBlockId. If not, use this method.
        Specified by:
        getAllSourceIds in interface IBlockingModule
        Parameters:
        a - Instance, whose ids are to be returned
        Returns:
        An ArrayList of blockids