Class Counter<T>
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.util.Counter<T>
Deprecated.
use the counter in matching-jena-matchers.
A Counter is for counting arbitrary objects.
-
Field Summary
Modifier and TypeFieldDescriptionDeprecated.protected int
Deprecated. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Collection<T> collection) Deprecated.Add a collection of elements to the counter.void
Deprecated.Add one element to the countervoid
Deprecated.Add the element (first parameter) multiple times (amount is specified in the second parameter).int
Deprecated.Returns the amount of distinct elements.int
getCount()
Deprecated.Get the number of how many elements which were added to this counter (this includes duplicates).int
Deprecated.Get the count for a specific element.Deprecated.Returns the set of distinct elements.Deprecated.Return a list of the most common elements and their counts.mostCommon
(int n) Deprecated.Return a list of the n most common elements and their counts.
-
Field Details
-
counts
Deprecated. -
overallCount
protected int overallCountDeprecated.
-
-
Constructor Details
-
Counter
public Counter()Deprecated.
-
-
Method Details
-
add
Deprecated.Add a collection of elements to the counter.- Parameters:
collection
- the collection to be added.
-
add
Deprecated.Add one element to the counter- Parameters:
t
- the element to add
-
add
Deprecated.Add the element (first parameter) multiple times (amount is specified in the second parameter).- Parameters:
it
- the element to addv
- how often does this element should be added
-
getCount
Deprecated.Get the count for a specific element.- Parameters:
t
- the element for which the count should be returned- Returns:
- how often this element occured.
-
getCount
public int getCount()Deprecated.Get the number of how many elements which were added to this counter (this includes duplicates).- Returns:
- how many elements are added to this list
-
getDistinctElements
Deprecated.Returns the set of distinct elements.- Returns:
- the set of distinct elements
-
getAmountOfDistinctElements
public int getAmountOfDistinctElements()Deprecated.Returns the amount of distinct elements.- Returns:
- amount of distinct elements
-
mostCommon
Deprecated.Return a list of the n most common elements and their counts. Ordered from the most common to the least.- Parameters:
n
- number of common elements to return- Returns:
- list of entries
-
mostCommon
Deprecated.Return a list of the most common elements and their counts. Ordered from the most common to the least.- Returns:
- list of entries
-