Package pl.poznan.put.circular
Class Histogram
java.lang.Object
pl.poznan.put.circular.Histogram
- Direct Known Subclasses:
ImmutableHistogram
A collection of angular observations put into bins of specified width.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<pl.poznan.put.circular.Histogram.Bin>
bins()
abstract double
binWidth()
protected void
check()
abstract Collection<Angle>
data()
final Collection<Angle>
findBin
(double radiansStart) Finds a bin which starts at a given point.final double
Finds the largest bin and calculate its relative size.
-
Constructor Details
-
Histogram
public Histogram()
-
-
Method Details
-
data
- Returns:
- A collection of angular data.
-
binWidth
@Parameter(order=2) public abstract double binWidth()- Returns:
- The width of bin in range [0, pi).
-
largestBinSize
public final double largestBinSize()Finds the largest bin and calculate its relative size.- Returns:
- Value in range [0; 1] describing relative size of the largest bin.
-
findBin
Finds a bin which starts at a given point.- Parameters:
radiansStart
- Value in radians which describes bin starting point (precision 1.0e-3).- Returns:
- A collection of circular values in the found bin.
-
bins
-
check
@Check protected void check()
-