Show contents 

Express > Express Assembly Interfaces > ILanerBox > ILanerBox.ApplyInversion

ILanerBox.ApplyInversion

Syntax

ApplyInversion(Inversion: Integer; InversionLag: Integer);

Parameters

Inversion. Series transformation method.

InversionLag. Lag for the series transformation.

Description

The ApplyInversion method applies a specified transformation to the selected calculated series.

Comments

A calculated series should be fixed to apply ApplyInversion.

The Inversion parameter is determined by the elements of the TsInversion enumeration.

Value of the InversionLag parameter cannot be negative..

The ILanerBox.CanApplyInversion method returns whether the specified transformation can be applied to the series.

The ILanerBox.IsInversionTurnedOn method returns whether the specified transformation has already been applied to the series.

Example

Executing the example requires a form with the Button1 button, the LanerBox component named LanerBox1 and the UiErAnalyzer component that is a data source for LanerBox. A workbook of the time series database should be loaded to UiErAnalyzer1.

This procedure should be assigned as a handler of the OnClick event for the button. The example is executed on clicking the button.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    CanInv: Boolean;
    IsOn: Boolean;
Begin
    CanInv := LanerBox1.CanApplyInversion(TsInversion.DLog, 1);
    IsOn := LanerBox1.IsInversionTurnedOn(TsInversion.DLog, 1);
    If CanInv And Not IsOn Then
        LanerBox1.ApplyInversion(TsInversion.DLog, 1);
    End If;
End Sub Button1OnClick;

After executing the example the following transformation is applied to the selected series if possible: logistic difference to the corresponding period of previous year.

See also:

ILanerBox

TsInversion