Encog.MathUtil.LIBSVM.Solver.reconstruct_gradient C# (CSharp) Method

reconstruct_gradient() private method

private reconstruct_gradient ( ) : void
return void
        internal virtual void reconstruct_gradient()
        {
            // reconstruct inactive elements of G from G_bar and free variables

            if (active_size == l)
                return;

            int i;
            for (i = active_size; i < l; i++)
                G[i] = G_bar[i] + b[i];

            for (i = 0; i < active_size; i++)
                if (is_free(i))
                {
                    float[] Q_i = Q.get_Q(i, l);
                    double alpha_i = alpha[i];
                    for (int j = active_size; j < l; j++)
                        G[j] += alpha_i*Q_i[j];
                }
        }