Esempio n. 1
0
        private static double[] CalculateLambdasForLog10(HankelCoefficients hankel, double[] rho)
        {
            var rhoLength = rho.Length;

            var k = new double[hankel.GetLengthOfLambdaWithRespectTo(rhoLength)];

            var rhoMin  = rho[0];
            var rhoStep = hankel.GetLog10RhoStep();

            int n1 = hankel.GetN1WithRespectTo(rhoLength);
            int n2 = hankel.GetN2WithRespectTo(rhoLength);

            k[-n1] = 1 / rhoMin;

            for (int i = -n1 + 1; i <= n2 - n1; i++)
            {
                k[i] = k[i - 1] / rhoStep;
            }

            for (int i = -n1 - 1; i >= 0; i--)
            {
                k[i] = k[i + 1] * rhoStep;
            }

            return(k);
        }
Esempio n. 2
0
        private ScalarPlan CreateFor(double rhoMin, double rhoMax, bool addZeroRho)
        {
            if (rhoMin <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(rhoMin));
            }

            float rhoStep = _hankel.GetLog10RhoStep();
            var   result  = new ScalarPlan(addZeroRho);

            AddLog10Plans(result, _hankel, rhoMin, rhoMax, rhoStep, _numberOfHankels);

            return(result);
        }