public static Delegate FuncObj(LuaFunction func) { FuncObj d = (param0) => { int top = func.BeginPCall(); IntPtr L = func.GetLuaState(); LuaScriptMgr.PushVarObject(L, param0); func.PCall(top, 1); func.EndPCall(top); }; return(d); }
public List<Tuple<double, double>> FindTimeInterval(double lowerbound, double upperbound) { int b = 1000; Func<double, double> nij = (double t) => 1 - Math.Log(1 + this.Alpha * Fullness(t) * Reliability(t) * Timeliness(t), 2); FuncObj Br_method = new FuncObj(nij, 0, b, lowerbound, upperbound); Br_method.FindPoints(); Br_method.FindRoot(); return Br_method.root; }