示例#1
0
        public virtual bool compileMethod(BehavioralObject methodClass, ESSymbol protocol, out ESMethod compiledMethod)
        {
            ESMethod method = null;

            if (compileMethod(
                    methodClass,
                    (MethodDeclarationNode methodDeclarationNode, Delegate function) => {
                if (function == null)
                {
                    return(false);
                }
                method = objectSpace.newMethod(methodClass, methodClass, methodDeclarationNode, protocol);
                return(true);
            }))
            {
                compiledMethod = method;
                return(true);
            }
            else
            {
                compiledMethod = null;
                return(false);
            }
        }
示例#2
0
        public override int Run(string[] args)
        {
            Console.WriteLine("Start");
            fill_params(args);
            Console.WriteLine("Params get \nfile in {0} ", file_in);
            Approx_learn_set = BaseUFSLoader.LoadLearnFromUFS(file_in);
            Console.WriteLine("Tra load");
            Approx_test_set = BaseUFSLoader.LoadTestFromUFS(file_in);
            Console.WriteLine("Tst load");
            conf = new ESConfig();
            conf.Init(Approx_learn_set.CountVars);

            fill_conf();
            Console.WriteLine("Conf Filed");
            Approx_Singletone = new SAFuzzySystem(Approx_learn_set, Approx_test_set);
            Approx_Singletone = SAFSUFSLoader.loadUFS(Approx_Singletone, file_in);
            Console.WriteLine("Classifier created");
            optimaze          = new ESMethod();
            Approx_Singletone = optimaze.TuneUpFuzzySystem(Approx_Singletone, conf);
            Console.WriteLine("Optimization complite");
            SAFSUFSWriter.saveToUFS(Approx_Singletone, file_out);
            Console.WriteLine("Saved");
            return(1);
        }
示例#3
0
 public override T applyToCompiledMethod(ESMethod operand)
 {
     return(operation.applyToCompiledMethod(operand));
 }
示例#4
0
 public virtual T applyToCompiledMethod(ESMethod operand)
 {
     return(applyToESObject(operand));
 }