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);
}
}
}