Package org.egothor.stemmer.trie
Class LocalValueSummary<V>
java.lang.Object
org.egothor.stemmer.trie.LocalValueSummary<V>
- Type Parameters:
V- value type
Local terminal value summary of a node.
-
Constructor Summary
ConstructorsConstructorDescriptionLocalValueSummary(V[] orderedValues, int[] orderedCounts, int totalCount, V dominantValue, int dominantCount, int secondCount) Creates a summary. -
Method Summary
Modifier and TypeMethodDescriptionstatic <V> LocalValueSummary<V> of(Map<V, Integer> counts, IntFunction<V[]> arrayFactory) Builds a summary from local counts.int[]Returns ordered counts.V[]Returns ordered values.
-
Constructor Details
-
LocalValueSummary
public LocalValueSummary(V[] orderedValues, int[] orderedCounts, int totalCount, V dominantValue, int dominantCount, int secondCount) Creates a summary.- Parameters:
orderedValues- ordered valuesorderedCounts- ordered countstotalCount- total countdominantValue- dominant valuedominantCount- dominant countsecondCount- second count
-
-
Method Details
-
of
Builds a summary from local counts.- Type Parameters:
V- value type- Parameters:
counts- local countsarrayFactory- array factory- Returns:
- summary
-
orderedValues
Returns ordered values.- Returns:
- ordered values
-
orderedCounts
public int[] orderedCounts()Returns ordered counts.- Returns:
- ordered counts
-