DatesSelector
public class BurstSelector extends Object implements DatesSelector
The dates can be aligned to whole steps in some time scale. So for example
if a rest period of 3600s is used and the alignment time scale is set to
UTC
, the earliest date of
each burst will occur at whole hours in UTC time.
This class stores internally the last selected dates, so it is not thread-safe. A separate selector should be used for each thread in multi-threading context.
Constructor | Description |
---|---|
BurstSelector(int maxBurstSize,
double highRateStep,
double burstPeriod,
TimeScale alignmentTimeScale) |
Simple constructor.
|
Modifier and Type | Method | Description |
---|---|---|
List<AbsoluteDate> |
selectDates(AbsoluteDate start,
AbsoluteDate end) |
Select dates within an interval.
|
public BurstSelector(int maxBurstSize, double highRateStep, double burstPeriod, TimeScale alignmentTimeScale)
The burstPeriod
ignores the duration of the burst itself. This
means that if burst of maxBurstSize=256
dates each separated by
highRateStep=100ms
should be selected with burstPeriod=300s
,
then the first burst would contain 256 dates from t0
to t0+25.5s
and the second burst would start at t0+300s
, not at
t0+325.5s
.
If alignment to some time scale is needed, it applies only to the first date in each burst.
maxBurstSize
- maximum number of selected dates in a bursthighRateStep
- step between two consecutive dates within a burst (s)burstPeriod
- period between the start of each burst (s)alignmentTimeScale
- alignment time scale for first date in burst
(null is alignment is not needed)public List<AbsoluteDate> selectDates(AbsoluteDate start, AbsoluteDate end)
The start
and end
date may be either in direct or reverse
chronological order. The list is produced in the same order as start
and end
, i.e. direct chronological order if start
is earlier
than end
or reverse chronological order if start
is later
than end
.
The ordering (direct or reverse chronological order) should not be changed between calls, otherwise unpredictable results may occur.
selectDates
in interface DatesSelector
start
- interval startend
- interval endCopyright © 2002-2019 CS Systèmes d'information. All rights reserved.