private InnerResult CalculateForE(AuxContainerFast c, ICalculatorU u) { var e = new ResultE(); var zeta = _model.Section1D.GetAllSection1DZeta(); c.Eta = CalculateEta(_planItem.Lambdas); c.Exp = CalculateExp(c.Eta); c.P = CalculateP1(c.Eta, c.Exp); c.Q = CalculateQ1(c.Eta, c.Exp); c.A = CalculateA1(c); u.PreCalculate(); e.U1 = _planItem.CalculateI1 ? u.CalculateU1() : new Complex[0]; c.P = CalculatePSigma(zeta, c.Eta, c.Exp); c.Q = CalculateQSigma(c.Eta, c.Exp); c.A = CalculateASigma(c); e.U2 = _planItem.CalculateI2 ? u.CalculateU2() : new Complex[0]; e.U3 = _planItem.CalculateI3 ? u.CalculateU3() : new Complex[0]; e.U4 = _planItem.CalculateI4 ? u.CalculateU4() : new Complex[0]; e.U5 = _planItem.CalculateI5 ? u.CalculateU5(_planItem.Lambdas) : new Complex[0]; var result = ScalarMathUtils.NormalizeAndPerformHankelFast(e, _planItem, _model, c.CorrBackgroundRc); return(result); }
private InnerResult CalculateForE(AuxContainer c, ICalculatorU u) { var e = InitResultE(_planItem); var zeta = _model.Section1D.GetAllSection1DZeta(); var length = _planItem.Lambdas.Length; for (int i = 0; i < length; i++) { var lambda = _planItem.Lambdas[i]; c.Eta = CalculateEta(_model, lambda); c.Exp = CalculateExp(_model, c.Eta); if (_planItem.CalculateI1) { c.P = CalculateP1(_alphaBeta, c.Eta, c.Exp); c.Q = CalculateQ1(_alphaBeta, c.Eta, c.Exp); c.A = CalculateA1(_model, c); e.U1[i] = u.CalculateU1(); } c.P = CalculatePSigma(zeta, c.Eta, c.Exp); c.Q = CalculateQSigma(c.Eta, c.Exp); c.A = CalculateASigma(_model, c); if (_planItem.CalculateI2) { e.U2[i] = u.CalculateU2(); } if (_planItem.CalculateI3) { e.U3[i] = u.CalculateU3(); } if (_planItem.CalculateI4) { e.U4[i] = u.CalculateU4(); } if (_planItem.CalculateI5) { e.U5[i] = u.CalculateU5(lambda); } } var result = ScalarMathUtils.NormalizeAndPerformHankel(e, _planItem, _model, c.CorrBackgroundRc); return(result); }