1 文本格式
using System;
namespace Legalsoft.Truffer
{
public interface RBF_fn
{
double rbf(double r);
}
}
----------------------------------------------
using System;
namespace Legalsoft.Truffer
{
public class RBF_gauss : RBF_fn
{
private double r0 { get; set; }
public RBF_gauss(double scale = 1.0)
{
this.r0 = scale;
}
public double rbf(double r)
{
return Math.Exp(-0.5 * Globals.SQR(r / r0));
}
}
}
2 代码格式
using System;
namespace Legalsoft.Truffer
{
public interface RBF_fn
{
double rbf(double r);
}
}
using System;
namespace Legalsoft.Truffer
{
public class RBF_gauss : RBF_fn
{
private double r0 { get; set; }
public RBF_gauss(double scale = 1.0)
{
this.r0 = scale;
}
public double rbf(double r)
{
return Math.Exp(-0.5 * Globals.SQR(r / r0));
}
}
}