示例#1
0
 // single argument list
 private List <double> singleArg(double x, string method)
 {
     // do not check for null - in this case we throw anyways
     for (int i = 0; i < dimension_; i++)
     {
         MethodInfo methodInfo = Utils.GetMethodInfo(stats_[i], method);
         results_[i] = (double)methodInfo.Invoke(stats_[i], new object[] { x });
     }
     return(results_);
 }
示例#2
0
            // visitor classes should implement the generic visit method in the following form
            public void visit(object o)
            {
                Type[]     types      = new Type[] { o.GetType() };
                MethodInfo methodInfo = Utils.GetMethodInfo(this, "visit", types);

                if (methodInfo != null)
                {
                    methodInfo.Invoke(this, new object[] { o });
                }
            }