Accord.Math.Optimization.BoundedBroydenFletcherGoldfarbShanno.errclb C# (CSharp) Method

errclb() private static method

private static errclb ( int n, int m, double factr, double l, int _l_offset, double u, int _u_offset, int nbd, int _nbd_offset, string &task, int &info, int &k ) : void
n int
m int
factr double
l double
_l_offset int
u double
_u_offset int
nbd int
_nbd_offset int
task string
info int
k int
return void
        private static void errclb(int n, int m, double factr,
            double[] l, int _l_offset, double[] u, int _u_offset,
            int[] nbd, int _nbd_offset, ref string task, ref int info, ref int k)
        {

            int i = 0;
            if ((n <= 0))
            {
                task = "ERROR: N .LE. 0";
            }
            if ((m <= 0))
            {
                task = "ERROR: M .LE. 0";
            }
            if ((factr < 0.0))
            {
                task = "ERROR: FACTR .LT. 0";
            }

            // 
            // c     Check the validity of the arrays nbd(i), u(i), and l(i).
            // 
            {
                for (i = 1; i <= n; i++)
                {
                    if (((nbd[(i - (1)) + _nbd_offset] < 0) || (nbd[(i - (1)) + _nbd_offset] > 3)))
                    {
                        // c                                                   return
                        task = "ERROR: INVALID NBD";
                        info = -6;
                        k = i;
                    }
                    if ((nbd[(i - (1)) + _nbd_offset] == 2))
                    {
                        if ((l[(i - (1)) + _l_offset] > u[(i - (1)) + _u_offset]))
                        {
                            // c                                    return
                            task = "ERROR: NO FEASIBLE SOLUTION";
                            info = -7;
                            k = i;
                        }
                    }
                }
            }

        }