Class VariableGranularityBlocker
- java.lang.Object
-
- org.aksw.limes.core.measures.mapper.space.blocking.VariableGranularityBlocker
-
- All Implemented Interfaces:
IBlockingModule
public class VariableGranularityBlocker extends Object implements IBlockingModule
- Author:
- Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de)
-
-
Constructor Summary
Constructors Constructor Description VariableGranularityBlocker(String props, String measureName, double threshold)VariableGranularityBlocker(String props, String measureName, double threshold, int _granularity)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ArrayList<ArrayList<Double>>addIdsToList(ArrayList<ArrayList<Double>> keys, TreeSet<String> propValues)static ArrayList<Double>copyList(ArrayList<Double> list)ArrayList<ArrayList<Integer>>getAllBlockIds(Instance a)Computes all the block ids for a given instance.ArrayList<ArrayList<Integer>>getAllSourceIds(Instance a, String props)Computes all the block ids for a given instance.ArrayList<Integer>getBlockId(Instance a)ArrayList<ArrayList<Integer>>getBlocksToCompare(ArrayList<Integer> blockId)Computes the block ID for a given instance a.voidsetGranularity(int n)
-
-
-
Method Detail
-
addIdsToList
public static ArrayList<ArrayList<Double>> addIdsToList(ArrayList<ArrayList<Double>> keys, TreeSet<String> propValues)
-
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:
getBlocksToComparein interfaceIBlockingModule- Parameters:
blockId- The instance whose blockId is to be computed- Returns:
- The ID for the block of a
-
getBlockId
public ArrayList<Integer> getBlockId(Instance a)
- Specified by:
getBlockIdin interfaceIBlockingModule
-
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:
getAllBlockIdsin interfaceIBlockingModule- 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:
getAllSourceIdsin interfaceIBlockingModule- Parameters:
a- Instance, whose ids are to be returned- Returns:
- An ArrayList of blockids
-
-