* This routine computes a trapezoidal approximation to the * integral of a function over a small delta in x. * @param f1 value of function at x1 * @param f2 value of function at x2 * @param Dx x2 - x1 (should always be positive) * @return Approximation of the integral of the function from x1 to x2. * @note Exceptions: None * @note History: 6/5/89, DSJ, Created. */
| 1962 | * @note History: 6/5/89, DSJ, Created. |
| 1963 | */ |
| 1964 | FLOAT64 Integral(FLOAT64 f1, FLOAT64 f2, FLOAT64 Dx) { |
| 1965 | return (f1 + f2) * Dx / 2.0; |
| 1966 | } // Integral |
| 1967 | |
| 1968 | /** |
| 1969 | * This routine counts the number of cluster samples which |