C#,数值计算——NRf3的计算方法与源程序

1 文本格式

using System;

namespace Legalsoft.Truffer
{
    public class NRf3 : UniVarRealValueFun
    {
        public double xsav, ysav;
        public RealValueFun func3d;

        public NRf3()
        {
        }

        public double funk(double z)
        {
            return func3d.funk(new double[] { xsav, ysav, z });
        }

        public static double quad3d(RealValueFun func, double x1, double x2, RealValueFun y1, RealValueFun y2, RealValueFun z1, RealValueFun z2)
        {
            NRf1 f1 = new NRf1(y1, y2, z1, z2);
            f1.f2.f3.func3d = func;
            return GaussianWeights.qgaus(f1, x1, x2);
        }
    }
}
 

2 代码格式

using System;

namespace Legalsoft.Truffer
{
    public class NRf3 : UniVarRealValueFun
    {
        public double xsav, ysav;
        public RealValueFun func3d;

        public NRf3()
        {
        }

        public double funk(double z)
        {
            return func3d.funk(new double[] { xsav, ysav, z });
        }

        public static double quad3d(RealValueFun func, double x1, double x2, RealValueFun y1, RealValueFun y2, RealValueFun z1, RealValueFun z2)
        {
            NRf1 f1 = new NRf1(y1, y2, z1, z2);
            f1.f2.f3.func3d = func;
            return GaussianWeights.qgaus(f1, x1, x2);
        }
    }
}

你可能感兴趣的:(C#数值计算,Numerical,Recipes,c#,开发语言,数值计算,算法)