public class AbsoluteDateArrayHandling extends Object
Constructor and Description |
---|
AbsoluteDateArrayHandling(AbsoluteDate[] dates)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
double[] |
durationFrom(AbsoluteDate[] datesForDuration)
Get array with durations between instances dates and corresponding given dates
If instance dates = [date1, date2, ..., daten] and argument
datesForDuration = [d1, d2, ..., dn] then this function will return
[date1 durationFrom d1, date2 durationFrom d2, ..., daten durationFrom dn].
|
AbsoluteDate[] |
getDates()
Get instance dates array.
|
double[][] |
multipleDurationFrom(AbsoluteDate[] datesForDuration)
Get array with durations between instances dates and given dates
If instance dates = [date1, date2, ..., daten] and argument
datesForDuration = [d1, d2, ..., dn] then this function will return a matrix
[[date1 durationFrom d1, date1 durationFrom d2, ..., date1 durationFrom dn],
[date2 durationFrom d1, date2 durationFrom d2, ..., date2 durationFrom dn],
[...]
[daten durationFrom d1, daten durationFrom d2, ..., date1 durationFrom dn]].
|
AbsoluteDate[][] |
multipleShiftedBy(double[] dts)
Get time-shifted dates for several dates or several time shifts.
|
AbsoluteDate[] |
shiftedBy(double[] dts)
Get time-shifted dates for several dates and corresponding time shifts.
|
public AbsoluteDateArrayHandling(AbsoluteDate[] dates)
dates
- is an array of absolute dates on which we want to apply time shift or
compute durationpublic AbsoluteDate[] getDates()
public AbsoluteDate[][] multipleShiftedBy(double[] dts)
shiftedBy(double[])
.dts
- time shifts array in seconds we want to apply to datespublic AbsoluteDate[] shiftedBy(double[] dts)
multipleShiftedBy(double[])
.dts
- time shifts array in seconds we want to apply to corresponding dates.
Warning, must be same length as dates.public double[][] multipleDurationFrom(AbsoluteDate[] datesForDuration)
durationFrom(AbsoluteDate[])
.datesForDuration
- dates for which we want to compute the duration form instances datespublic double[] durationFrom(AbsoluteDate[] datesForDuration)
multipleDurationFrom(AbsoluteDate[])
.datesForDuration
- dates for which we want to compute the duration form instances dates.
Warning must have same length as instance dates.Copyright © 2014-2023 CS GROUP. All rights reserved.