Exemplo n.º 1
0
        static public IEnumerable <string> LoadConfig(string[] args)
        {
            var parserThe    = (IParser)LoadConfigOpt;
            var parsedResult = parserThe.Parse(args);

            return(LoadConfigOpt.Func(true).Concat(parsedResult));
        }
Exemplo n.º 2
0
        public static double NewtonSolve(IFunc func, double from, double to, int eps)
        {
            double x, prev;

            prev = x = from;
            do
            {
                prev = x;
                x    = prev - func.Func(prev) / func.Deriv(prev);
            }while (Math.Round(x, eps) != Math.Round(prev, eps));
            return(x);
        }
Exemplo n.º 3
0
 static public InfoSum Invoke(this IEnumerable <InfoFile> seqThe,
                              IFunc <IEnumerable <InfoFile>, InfoSum> func)
 {
     return(func.Func(seqThe));
 }