Package org.epics.util.stats
Class Ranges
- java.lang.Object
-
- org.epics.util.stats.Ranges
-
public class Ranges extends Object
Utility classes to compute ranges.- Author:
- carcassi
-
-
Constructor Summary
Constructors Constructor Description Ranges()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Range
absRange(Range range)
Returns the range of the absolute values within the range.static double
overlap(Range range, Range otherRange)
Percentage, from 0 to 1, of the first range that is contained by the second range.
-
-
-
Method Detail
-
absRange
public static Range absRange(Range range)
Returns the range of the absolute values within the range.If the range is all positive, it returns the same range.
- Parameters:
range
- a range- Returns:
- the range of the absolute values
-
overlap
public static double overlap(Range range, Range otherRange)
Percentage, from 0 to 1, of the first range that is contained by the second range.- Parameters:
range
- the range to be contained by the secondotherRange
- the range that has to contain the first- Returns:
- from 0 (if there is no intersection) to 1 (if the ranges are the same)
-
-