CreateLevel(CalendarLevel: DimCalendarLevel);
CreateLevel(
CalendarLevel: Prognoz.Platform.Interop.Dimensions.DimCalendarLevel;
Context: Prognoz.Platform.Interop.Fore.ForeRuntimeContext);
CalendarLevel. Series calendar frequency.
Context. Context. It is relevant only for Fore.NET.
The CreateLevel constructor creates a series with set calendar frequency.
Use the TimeSeries.Create default constructor to create a series without additional parameters.
A custom series calculation method is given in the example. To execute the example, add a link to the Dimensions system assembly.
Function TimeCalendLvl(Input: ITimeSeries): ITimeSeries;
Var
i: Integer;
pSeries: ITimeSeries;
Begin
pSeries := New TimeSeries.CreateLevel(DimCalendarLevel.Year);
If pSeries.CheckCompatible(Input, True) Then
For i := pSeries.StartIndex To pSeries.EndIndex Do
pSeries.Item(i) := 1 + Input.Item(i);
End For;
End If;
Return pSeries;
End Function TimeCalendLvl;
The method increases input series values if it is compatible with the user calculation method context.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Ms;
…
Public Function TimeCalendLvl(Input: TimeSeries): ITimeSeries;
Var
i: Integer;
pSeries: ITimeSeries;
Begin
pSeries := New TimeSeriesClass.Create();
pSeries.CreateLevel(DimCalendarLevel.dclYear, Null);
If pSeries.CheckCompatible(Input, True) Then
For i := pSeries.StartIndex To pSeries.EndIndex Do
pSeries.Item[i] := 1 + (Input.Item[i] As double);
End For;
End If;
Return pSeries;
End Function TimeCalendLvl;
See also: