Pelsser.SquaredGaussianModel.A C# (CSharp) Method

A() public method

Calculates the function A(t, T) of the model, which is an integral.
public A ( int ti, int si, double delta, double btT ) : double
ti int The starting Index from where to calculate.
si int The ending Index of the integration.
delta double The delta of time where to execute the calculation.
btT double /// A populated array with the results of the function B(s, T) of the model. ///
return double
        public double A(int ti, int si, double delta, double[] btT)
        {
            // Initialization of the integral.
            int N = si - ti;

            Vector a = new Vector(N);
            for (int i = 0; i < N; i++)
                a[i] += 0.5 * this.sigma1SquaredTemp * Math.Pow(btT[i], 2) - this.sigma1SquaredTemp * this.cDeltaT[N - i] - Math.Pow(this.alphaT[ti + i], 2);

            return Fairmat.Math.Integrate.Trapezoid(a, delta);
        }