1 文本格式
using System;
namespace Legalsoft.Truffer
{
public class NRf1 : UniVarRealValueFun
{
public RealValueFun y1;
public RealValueFun y2;
public NRf2 f2;
public NRf1(RealValueFun y1, RealValueFun y2, RealValueFun z1, RealValueFun z2)
{
this.y1 = y1;
this.y2 = y2;
this.f2 = new NRf2(z1, z2);
}
public double funk(double x)
{
f2.f3.xsav = x;
return GaussianWeights.qgaus(f2, y1.funk(new double[] { x }), y2.funk(new double[] { x }));
}
}
}
2 代码格式
using System;
namespace Legalsoft.Truffer
{
public class NRf1 : UniVarRealValueFun
{
public RealValueFun y1;
public RealValueFun y2;
public NRf2 f2;
public NRf1(RealValueFun y1, RealValueFun y2, RealValueFun z1, RealValueFun z2)
{
this.y1 = y1;
this.y2 = y2;
this.f2 = new NRf2(z1, z2);
}
public double funk(double x)
{
f2.f3.xsav = x;
return GaussianWeights.qgaus(f2, y1.funk(new double[] { x }), y2.funk(new double[] { x }));
}
}
}