public static double CommonDerivate(double x, double gain, double center)
        {
            double y;

            if (gain == 1)
            {
                double fx = SigmoidFunction.CommonActivation(x, gain, center);
                y = fx * (1 - fx);
            }
            else
            {
                double xc    = x - center;
                double exp   = Math.Exp(-gain * xc);
                double expP1 = 1 + exp;
                y = gain * exp / (expP1 * expP1);
            }
            return(y);
        }
 public double Derivative(double x, double gain, double center)
 {
     return(SigmoidFunction.CommonDerivate(x, gain, center));
 }
 public double Activation(double x, double gain, double center)
 {
     return(SigmoidFunction.CommonActivation(x, gain, center));
 }