de.hpi.fgis.dude.algorithm.duplicatedetection
Class SortedNeighborhoodMethod

java.lang.Object
  extended by de.hpi.fgis.dude.util.AbstractCleanable
      extended by de.hpi.fgis.dude.algorithm.AbstractAlgorithm
          extended by de.hpi.fgis.dude.algorithm.AbstractDuplicateDetection
              extended by de.hpi.fgis.dude.algorithm.SortingDuplicateDetection
                  extended by 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

Nested Class Summary
protected static class SortedNeighborhoodMethod.SortedNeighborhoodMethodIterator
          SortedNeighborhoodMethod.SortedNeighborhoodMethodIterator implements the behavior of a simple Sorted-Neighborhood-Method implementation.
 
Nested classes/interfaces inherited from class de.hpi.fgis.dude.algorithm.AbstractAlgorithm
AbstractAlgorithm.AlgorithmIteratorWrapper
 
Field Summary
static int DEFAULT_WINDOW_SIZE
          The default window size that is used, if no window size was specified.
 
Constructor Summary
protected SortedNeighborhoodMethod()
          For serialization
  SortedNeighborhoodMethod(SortingKey key)
          Initializes a SortedNeighborhoodMethod instance with the passed SortingKey the DEFAULT_WINDOW_SIZE.
  SortedNeighborhoodMethod(SortingKey key, int windowSz)
          Initializes a SortedNeighborhoodMethod instance with the passed SortingKey and a window size.
 
Method Summary
protected  Iterator<DuDeObjectPair> createIteratorInstance()
          Returns a new Iterator instance.
 int getWindowSize()
          Returns the window size of this instance.
 void setWindowSize(int windowSz)
          Sets the window size.
 
Methods inherited from class de.hpi.fgis.dude.algorithm.SortingDuplicateDetection
getSortingKey, preprocessData, setSortingKey
 
Methods inherited from class de.hpi.fgis.dude.algorithm.AbstractDuplicateDetection
addSource, dataSourceAttached, equals, getData, getDataSize, getMaximumPairCount, hashCode, iterator, unregisterDataSources
 
Methods inherited from class de.hpi.fgis.dude.algorithm.AbstractAlgorithm
addDataSource, addPreprocessor, addPreprocessor, analyzeDuDeObject, createStorage, dataExtracted, disableInMemoryProcessing, enableInMemoryProcessing, finishExtraction, finishPreprocessing, forceExtraction, getDataSize, getExtractedData, inMemoryProcessingEnabled
 
Methods inherited from class de.hpi.fgis.dude.util.AbstractCleanable
cleanUp, registerCleanable, registerCloseable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.hpi.fgis.dude.util.Cleanable
cleanUp, registerCleanable, registerCloseable
 

Field Detail

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
Constructor Detail

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.
Method Detail

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.