Class ListWeightUtils
java.lang.Object
de.uni_trier.wi2.procake.similarity.base.collection.ListWeightUtils
This class provides special methods to work with
ListWeights
and to manipulate
them.- Author:
- Justin Weich
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
arrangeAndNormalizeWeights
(LinkedList<ListWeight> listWeights, double defaultWeight) The method sorts the currentListWeight
s and fills up missingListWeight
s.static void
checkIntervalOverlap
(LinkedList<ListWeight> listWeights, ListWeight weightToCheck) The method checks if theListWeight
which should be added is overlapping with already addedListWeight
s, is that the case an exception is thrown.
-
Constructor Details
-
ListWeightUtils
public ListWeightUtils()
-
-
Method Details
-
arrangeAndNormalizeWeights
public static void arrangeAndNormalizeWeights(LinkedList<ListWeight> listWeights, double defaultWeight) The method sorts the currentListWeight
s and fills up missingListWeight
s. Additionally, the values of theListWeight
s are normalized.- Parameters:
listWeights
- the currentListWeight
sdefaultWeight
- the default weight which should be the weight for filledListWeight
s
-
checkIntervalOverlap
public static void checkIntervalOverlap(LinkedList<ListWeight> listWeights, ListWeight weightToCheck) The method checks if theListWeight
which should be added is overlapping with already addedListWeight
s, is that the case an exception is thrown.- Parameters:
listWeights
- the currentListWeight
sweightToCheck
- theListWeight
which should be added
-