Class DuplicateScoringSupport
java.lang.Object
org.onebusaway.gtfs_merge.strategies.scoring.DuplicateScoringSupport
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> doublescoreElementOverlap(Collection<T> a, Collection<T> b) Computes a numeric score that captures how much overlap there is between the elements in two collections, given their set of overlapping elements.static <T> doublescoreElementOverlap(Collection<T> a, Collection<T> b, Set<T> common) Same asscoreElementOverlap(Collection, Collection)with the exception that overlapping elements between the two collections are automatically added to the 'common' set.static <T> doublescoreElementOverlap(SortedSet<T> a, SortedSet<T> b) A faster implementation ofscoreElementOverlap(Collection, Collection), when the Collections are SortedSets.static doublescoreIntervalOverlap(int[] sourceInterval, int[] targetInterval)
-
Constructor Details
-
DuplicateScoringSupport
public DuplicateScoringSupport()
-
-
Method Details
-
scoreElementOverlap
Computes a numeric score that captures how much overlap there is between the elements in two collections, given their set of overlapping elements. The score is [0.0, 1.0], where a score of 0.0 indicates absolutely no overlap and 1.0 indicate the two collections are the same.- Parameters:
a-b-- Returns:
- the numeric overlap score
-
scoreElementOverlap
Same asscoreElementOverlap(Collection, Collection)with the exception that overlapping elements between the two collections are automatically added to the 'common' set.- Parameters:
a-b-common-- Returns:
- the numeric overlap score
-
scoreElementOverlap
A faster implementation ofscoreElementOverlap(Collection, Collection), when the Collections are SortedSets.- Parameters:
a-b-- Returns:
- the numeric overlap score
-
scoreIntervalOverlap
public static double scoreIntervalOverlap(int[] sourceInterval, int[] targetInterval)
-