public final class CircularDescriptiveStatistics extends Object
Modifier and Type | Method and Description |
---|---|
static double |
dispersionAboutAngle(List<Double> dataList,
double angle)
Calculates the dispersion of a list of angles about a given angle.
|
static double |
meanDifference(List<Double> dataList)
Calculates the mean angular distance between angles in a list.
|
static double |
meanDirection(List<Double> dataList)
Calculates the mean direction of a list of angles.
|
static double |
meanResultantLength(List<Double> dataList)
Calculates the mean resultant length of a list of angles.
|
static double |
medianDirection(List<Double> dataList)
Calculates the median of a list of angles by minimizing E[ π - | π - | θ - φ | | ]
where φ is the median angle sought, and θ represents the angles from the input data list.
|
static double |
standardDeviation(List<Double> dataList)
Calculates the standard deviation of a list of angles.
|
static double |
variance(List<Double> dataList)
Calculates the variance of a list of angles.
|
public static double meanDirection(@Nonnull List<Double> dataList)
The output range is (-π, π] and disregards winding. If the mean resultant length is zero, this will return a nonsensical value.
dataList
- The list of angles to use to calculate the mean.ArgumentNullException
- Thrown when dataList
is null
.ArgumentException
- Thrown when dataList
is empty.public static double meanResultantLength(@Nonnull List<Double> dataList)
The output range is 0 ≤ R ≤ 1.
dataList
- The list of angles to use to calculate the mean resultant length.ArgumentNullException
- Thrown when dataList
is null
.ArgumentException
- Thrown when dataList
is empty.public static double variance(@Nonnull List<Double> dataList)
The output range is 0 ≤ V ≤ 1.
dataList
- The list of angles to use to calculate the variance.ArgumentNullException
- Thrown when dataList
is null
.ArgumentException
- Thrown when dataList
is empty.public static double medianDirection(@Nonnull List<Double> dataList)
The output range is (-π, π] and disregards winding.
dataList
- The list of angles to use to calculate the median.Double.NaN
is returned.ArgumentNullException
- Thrown when dataList
is null
.ArgumentException
- Thrown when dataList
is empty.public static double standardDeviation(@Nonnull List<Double> dataList)
The output range is [0, ∞]. Returns Double.NaN
if the mean resultant length is exactly zero.
dataList
- The list of angles to use to calculate the standard deviation.ArgumentNullException
- Thrown when dataList
is null
.ArgumentException
- Thrown when dataList
is empty.public static double meanDifference(@Nonnull List<Double> dataList)
The output range is [0, π/2].
dataList
- The list of angles to use to calculate the mean difference.ArgumentNullException
- Thrown when dataList
is null
.ArgumentException
- Thrown when dataList
is empty.public static double dispersionAboutAngle(@Nonnull List<Double> dataList, double angle)
The output range is [0, π]. Winding is ignored.
dataList
- The list of angles to use to calculate the dispersion.angle
- The angle around which dispersion is measured.ArgumentNullException
- Thrown when dataList
is null
.ArgumentException
- Thrown when dataList
is empty.