de.hpi.fgis.dude.algorithm.duplicatedetection
Class SortedNeighborhoodMethod
java.lang.Object
de.hpi.fgis.dude.util.AbstractCleanable
de.hpi.fgis.dude.algorithm.AbstractAlgorithm
de.hpi.fgis.dude.algorithm.AbstractDuplicateDetection
de.hpi.fgis.dude.algorithm.SortingDuplicateDetection
de.hpi.fgis.dude.algorithm.duplicatedetection.SortedNeighborhoodMethod
- All Implemented Interfaces:
- Algorithm, Cleanable, AutoJsonable, Iterable<DuDeObjectPair>
public class SortedNeighborhoodMethod
- extends SortingDuplicateDetection
SortedNeighborhoodMethod
is a simple Sorted-Neighborhood Method implementation without allowing multiple runs.
- Author:
- Matthias Pohl
Field Summary |
static int |
DEFAULT_WINDOW_SIZE
The default window size that is used, if no window size was specified. |
Methods inherited from class de.hpi.fgis.dude.algorithm.AbstractAlgorithm |
addDataSource, addPreprocessor, addPreprocessor, analyzeDuDeObject, createStorage, dataExtracted, disableInMemoryProcessing, enableInMemoryProcessing, finishExtraction, finishPreprocessing, forceExtraction, getDataSize, getExtractedData, inMemoryProcessingEnabled |
DEFAULT_WINDOW_SIZE
public static final int DEFAULT_WINDOW_SIZE
- The default window size that is used, if no window size was specified.
- See Also:
- Constant Field Values
SortedNeighborhoodMethod
protected SortedNeighborhoodMethod()
- For serialization
SortedNeighborhoodMethod
public SortedNeighborhoodMethod(SortingKey key)
- Initializes a
SortedNeighborhoodMethod
instance with the passed SortingKey
the DEFAULT_WINDOW_SIZE
.
- Parameters:
key
- The SortingKey
that defines the sorting order during the preprocessing.
- Throws:
NullPointerException
- If null
was passed instead of a SortingKey
.
IllegalArgumentException
- If a window size less than 2 was passed.
SortedNeighborhoodMethod
public SortedNeighborhoodMethod(SortingKey key,
int windowSz)
- Initializes a
SortedNeighborhoodMethod
instance with the passed SortingKey
and a window size.
- Parameters:
key
- The SortingKey
that defines the sorting order during the preprocessing.windowSz
- The size of the underlying window.
- Throws:
NullPointerException
- If null
was passed instead of a SortingKey
.
IllegalArgumentException
- If a window size less than 2 was passed.
getWindowSize
public int getWindowSize()
- Returns the window size of this instance.
- Returns:
- The window size of this instance.
setWindowSize
public void setWindowSize(int windowSz)
- Sets the window size.
- Parameters:
windowSz
- The window size.
- Throws:
IllegalArgumentException
- If a window size less than 2 was passed.
createIteratorInstance
protected Iterator<DuDeObjectPair> createIteratorInstance()
- Description copied from class:
AbstractDuplicateDetection
- Returns a new
Iterator
instance.
- Specified by:
createIteratorInstance
in class SortingDuplicateDetection
- Returns:
- The
Iterator
instance.
Copyright © 2011 Hasso Plattner Institute - Chair of Information Systems. All Rights Reserved.