IntegralOutput IServiceIntegral.IntegralSeqRectangleMedium(IntegralInput Input) { IntegralOutput result = new IntegralOutput(); SeqMeth integral = new SeqMeth(); result.result = integral.RectangleMedium(Input.A, Input.B, Input.N, OperationContext.Current.GetCallbackChannel <IServiceInteralCallBack>().Integrand); return(result); }
IntegralOutput IServiceIntegral.IntegralSeqSimpson(IntegralInput input) { IntegralOutput result = new IntegralOutput(); SeqMeth integral = new SeqMeth(); result.result = integral.Simpson(input.A, input.B, input.N, OperationContext.Current.GetCallbackChannel <IServiceInteralCallBack>().Integrand); return(result); }
public void TestSequentialRectangle() { SeqMeth sm = new SeqMeth(); double a = 1; double b = 10000; int N = 10000000; double ans = sm.RectangleMedium(a, b, N, (x) => x * x); double expected = 333333333333; Assert.AreEqual(expected, ans, 1); }
public void TestSequenticalSimpson() { SeqMeth sm = new SeqMeth(); double a = 1; double b = 10000; int N = 10000000; double ans = sm.Simpson(a, b, N, (x) => x * x); double expected = 333333333333; Assert.AreEqual(expected, ans, 1); }
public void TestSeqTrapeze() { SeqMeth sm = new SeqMeth(); double a = 1; double b = 10000; int N = 10000000; double ans = sm.Trapeze(a, b, N, (x) => x * x); double expected = 333333333333; Assert.AreEqual(expected, ans, 1); }