- java.lang.Object
-
- jp.cafebabe.birthmarks.AbstractTask<ComparatorType>
-
- jp.cafebabe.birthmarks.comparators.AbstractComparator
-
- All Implemented Interfaces:
Comparator
,Task<ComparatorType>
- Direct Known Subclasses:
CosineComparator
,EditDistanceComparator
,IndexComparator
public abstract class AbstractComparator extends AbstractTask<ComparatorType> implements Comparator
-
-
Constructor Summary
Constructors Constructor Description AbstractComparator(ComparatorType type, Configuration config)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract <T> Similarity
calculate(Birthmark<T> left, Birthmark<T> right)
<T> Comparisons<T>
compare(Birthmarks<T> left, Birthmarks<T> right, PairMatcher<Birthmark<T>> maker)
<T> Comparisons<T>
compare(Birthmarks<T> results, PairMatcher<Birthmark<T>> maker)
void
setProgressNotifier(Consumer<Percentage> notifier)
<T> Either<Exception,Similarity>
similarity(Pair<Birthmark<T>> pair)
-
Methods inherited from class jp.cafebabe.birthmarks.AbstractTask
configuration, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jp.cafebabe.birthmarks.comparators.Comparator
compare, compare, type
-
Methods inherited from interface jp.cafebabe.birthmarks.Task
configuration, stripEither, stripOptional
-
-
-
-
Constructor Detail
-
AbstractComparator
public AbstractComparator(ComparatorType type, Configuration config)
-
-
Method Detail
-
setProgressNotifier
public void setProgressNotifier(Consumer<Percentage> notifier)
-
similarity
public final <T> Either<Exception,Similarity> similarity(Pair<Birthmark<T>> pair)
- Specified by:
similarity
in interfaceComparator
-
compare
public <T> Comparisons<T> compare(Birthmarks<T> results, PairMatcher<Birthmark<T>> maker)
- Specified by:
compare
in interfaceComparator
-
compare
public <T> Comparisons<T> compare(Birthmarks<T> left, Birthmarks<T> right, PairMatcher<Birthmark<T>> maker)
- Specified by:
compare
in interfaceComparator
-
calculate
protected abstract <T> Similarity calculate(Birthmark<T> left, Birthmark<T> right)
-
-