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

1 文本格式

using System;

namespace Legalsoft.Truffer
{
    public class NRf2 : UniVarRealValueFun
    {
        public NRf3 f3 = new NRf3();
        public RealValueFun z1;
        public RealValueFun z2;

        public NRf2(RealValueFun zz1, RealValueFun zz2)
        {
            z1 = zz1;
            z2 = zz2;
        }

        public double funk(double y)
        {
            f3.ysav = y;
            return GaussianWeights.qgaus(f3, z1.funk(new double[] { f3.xsav, y }), z2.funk(new double[] { f3.xsav, y }));
        }
    }
}
 

2 代码格式

using System;

namespace Legalsoft.Truffer
{
    public class NRf2 : UniVarRealValueFun
    {
        public NRf3 f3 = new NRf3();
        public RealValueFun z1;
        public RealValueFun z2;

        public NRf2(RealValueFun zz1, RealValueFun zz2)
        {
            z1 = zz1;
            z2 = zz2;
        }

        public double funk(double y)
        {
            f3.ysav = y;
            return GaussianWeights.qgaus(f3, z1.funk(new double[] { f3.xsav, y }), z2.funk(new double[] { f3.xsav, y }));
        }
    }
}

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