Example #1
0
 public minbleicreport(minbleic.minbleicreport obj)
 {
     _innerobj = obj;
 }
Example #2
0
 public minbleicstate(minbleic.minbleicstate obj)
 {
     _innerobj = obj;
 }
Example #3
0
        /*************************************************************************
        This is obsolete function which was used by previous version of the  BLEIC
        optimizer. It does nothing in the current version of BLEIC.

          -- ALGLIB --
             Copyright 28.11.2010 by Bochkanov Sergey
        *************************************************************************/
        public static void minbleicsetbarrierdecay(minbleic.minbleicstate state,
            double mudecay)
        {
        }
Example #4
0
        /*************************************************************************
        This is obsolete function which was used by previous version of the  BLEIC
        optimizer. It does nothing in the current version of BLEIC.

          -- ALGLIB --
             Copyright 28.11.2010 by Bochkanov Sergey
        *************************************************************************/
        public static void minbleicsetbarrierwidth(minbleic.minbleicstate state,
            double mu)
        {
        }
        /*************************************************************************
        This function sets random preconditioner:
        * unit one, for PrecKind=0
        * diagonal-based one, for PrecKind=1
        * scale-based one, for PrecKind=2
        *************************************************************************/
        private static void setrandompreconditioner(minbleic.minbleicstate state,
            int n,
            int preckind)
        {
            double[] p = new double[0];
            int i = 0;

            if( preckind==1 )
            {
                p = new double[n];
                for(i=0; i<=n-1; i++)
                {
                    p[i] = Math.Exp(10*math.randomreal()-5);
                }
                minbleic.minbleicsetprecdiag(state, p);
            }
            else
            {
                minbleic.minbleicsetprecdefault(state);
            }
        }
        /*************************************************************************
        Calculate test function IIP2

        f(x) = sum( ((i*i+1)^FK*x[i])^2, i=0..N-1)

        It has high condition number which makes fast convergence unlikely without
        good preconditioner.

        *************************************************************************/
        private static void calciip2(minbleic.minbleicstate state,
            int n,
            int fk)
        {
            int i = 0;

            if( state.needfg )
            {
                state.f = 0;
            }
            for(i=0; i<=n-1; i++)
            {
                if( state.needfg )
                {
                    state.f = state.f+Math.Pow(i*i+1, 2*fk)*math.sqr(state.x[i]);
                    state.g[i] = Math.Pow(i*i+1, 2*fk)*2*state.x[i];
                }
            }
        }