Beispiel #1
0
 /*
  * Purpose:     Compute condition number for a function, f
  * Parameters:  f - Specified function
  *              x - Specific point at which to evaluate f
  *              h - Small value to indicate change in x
  * Returns:     Value estimating how sensitive function f
  *              is to small changes in x
  */
 public double condition_number(Function func, double x, double h=0.000001)
 {
     try
     {
         return func.Df(x, h) * x / func.f(x);
     }
     catch
     {
         throw new InvalidOperationException("NotImplementedError");
     }
 }