vnl_simpson_integral.h
Go to the documentation of this file.
1 #ifndef VNL_SIMPSON_INTEGRAL_H_
2 #define VNL_SIMPSON_INTEGRAL_H_
3 //:
4 // \file
5 // \author Kongbin Kang at Brown
6 // \date Jan. 17th, 2005
7 //
9 #include <vnl/algo/vnl_algo_export.h>
10 
11 class VNL_ALGO_EXPORT vnl_simpson_integral : public vnl_definite_integral
12 {
13  private:
14  //: used to extract integrand functions of the vnl_integrant_fnct.
15  static double int_fnct_(double* x);
16 
17  public:
18 
19  vnl_simpson_integral() = default;
20 
21  //: a and b are integral limits respectively.
22  // n is the number of intervals used in integral.
23  // The actual subinterval used is 2* num_intervals_
24  double integral(vnl_integrant_fnct *f, double a, double b, long n);
25 };
26 
27 #endif
the abstract 1D integrand function used for definite integral