Documentation API of the 'org.apache.commons.math3.stat.Frequency' Java class
Frequency
org.apache.commons.math3.stat

Class Frequency

  • All Implemented Interfaces:
    Serializable


    public class Frequencyextends Objectimplements Serializable
    Maintains a frequency distribution.

    Accepts int, long, char or Comparable values. New values added must be comparable to those that have been added, otherwise the add method will throw an IllegalArgumentException.

    Integer values (int, long, Integer, Long) are not distinguished by type -- i.e. addValue(Long.valueOf(2)), addValue(2), addValue(2l) all have the same effect (similarly for arguments to getCount, etc.).

    NOTE: byte and short values will be implicitly converted to int values by the compiler, thus there are no explicit overloaded methods for these primitive types.

    char values are converted by addValue to Character instances. As such, these values are not comparable to integral values, so attempts to combine integral types with chars in a frequency distribution will fail.

    Float is not coerced to Double. Since they are not Comparable with each other the user must do any necessary coercion. Float.NaN and Double.NaN are not treated specially; they may occur in input and will occur in output if appropriate.

    The values are ordered using the default (natural order), unless a Comparator is supplied in the constructor.

    See Also:
    Serialized Form

Warning: You see this message because an access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To enable the description of all Java classes of dataMelt, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.