Package toxi.color
Class HistEntry
java.lang.Object
toxi.color.HistEntry
- All Implemented Interfaces:
Comparable<HistEntry>
This class constitutes a single histogram entry, a coupling of color &
frequency. Also implements a comparator to sort histogram entries based on
frequency.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Comparator implementation used to sort entries by frequency (descending order).getColor()
Returns the color of this histogram entry.float
Returns the normalized frequency associated with this entry.
-
Constructor Details
-
HistEntry
-
-
Method Details
-
compareTo
Comparator implementation used to sort entries by frequency (descending order).- Specified by:
compareTo
in interfaceComparable<HistEntry>
-
getColor
Returns the color of this histogram entry.- Returns:
- color
-
getFrequency
public float getFrequency()Returns the normalized frequency associated with this entry. Values will always be within the 0.0 ... 1.0 range.- Returns:
- frequency
-