コード例 #1
0
 public TaskWorker(TaskParameters p, Type t, string mf, string sf, object target)
 {
     TaskParams         = p;
     MainFunctionName   = mf;
     SecondFunctionName = sf;
     classType          = t;
     this.target        = target;
 }
コード例 #2
0
        public double FunctionSet(double t, Vector y, int index, TaskParameters tp)
        {
            object res = classType.InvokeMember(SecondFunctionName, BindingFlags.Public
                                                | BindingFlags.InvokeMethod
                                                | BindingFlags.Instance | BindingFlags.Static, null,
                                                target,
                                                new object[] { t, y, tp[index] });

            return((double)res);
        }
コード例 #3
0
        public Vector AbstractFunction(double t, Vector y, TaskParameters tps)
        {
            object res = classType.InvokeMember(MainFunctionName, BindingFlags.Public
                                                | BindingFlags.InvokeMethod
                                                | BindingFlags.Instance | BindingFlags.Static, null,
                                                target,
                                                new object[] { t, y, tps });

            return(res as Vector);
        }