core
vnl
algo
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
//
8
#include <
vnl/vnl_definite_integral.h
>
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
vnl_integrant_fnct
Definition:
vnl_integrant_fnct.h:10
vnl_simpson_integral
Definition:
vnl_simpson_integral.h:11
vnl_definite_integral
Definition:
vnl_definite_integral.h:15
vnl_definite_integral.h
the abstract 1D integrand function used for definite integral
Generated by
1.8.15