![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
Derivatives of integrals of functions stored in vectors with implicit fixed-size grid. More...
#include <o2scl/ovector_tlate.h>
#include <o2scl/interp.h>
Go to the source code of this file.
Integrate a function over a fixed-size grid specified in a vector. The integrals are always specified without the factor defining the grid size (i.e. ), so the user must always multiply the result by the grid size afterwards to get the true integral.
These integration rules often expect a minimum number of points, so for smaller vectors they fall back onto rules which use fewer points. For empty vectors they return zero, for vectors of length 1, they always return the sole element of the vector, and for vectors of length 2, they always return the average of the two elements.
More points does not always mean higher accuracy.
Definition in file vector_derint.h.
Functions | |
template<class vec_t , class vec2_t > | |
void | vector_deriv_threept (size_t n, vec_t &v, vec2_t &v2) |
Derivative of a vector with a three-point formula. | |
template<class vec_t , class vec2_t > | |
void | vector_deriv_threept_tap (size_t n, vec_t &v, vec2_t &v2) |
Derivative of a vector with a three-point formula using two-point at the edges. | |
template<class vec_t , class vec2_t > | |
void | vector_deriv_fivept (size_t n, vec_t &v, vec2_t &v2) |
Derivative of a vector with a five-point formula. | |
template<class vec_t , class vec2_t > | |
void | vector_deriv_fivept_tap (size_t n, vec_t &v, vec2_t &v2) |
Derivative of a vector with a five-point formula with four- and three-point formulas used at the edges. | |
template<class ovec_t > | |
void | vector_deriv_interp (size_t n, ovec_t &v, ovec_t &v2, o2scl::base_interp_mgr< ovec_t > &bim) |
Derivative from interpolation object. | |
template<class vec_t > | |
double | vector_integ_trap (size_t n, vec_t &v) |
Integrate with an extended trapezoidal rule. | |
template<class vec_t > | |
double | vector_integ_threept (size_t n, vec_t &v) |
Integrate with an extended 3-point rule (extended Simpson's rule) | |
template<class vec_t > | |
double | vector_integ_extended4 (size_t n, vec_t &v) |
Integrate with an extended rule for 4 or more points. | |
template<class vec_t > | |
double | vector_integ_durand (size_t n, vec_t &v) |
Integrate with Durand's rule for 4 or more points. | |
template<class vec_t > | |
double | vector_integ_extended8 (size_t n, vec_t &v) |
Integrate with an extended rule for 8 or more points. | |
template<class ovec_t > | |
double | vector_integ_interp (size_t n, ovec_t &v, base_interp_mgr< ovec_t > &bim) |
Integral from interpolation object. |
double vector_integ_threept | ( | size_t | n, |
vec_t & | v | ||
) |
Definition at line 181 of file vector_derint.h.
double vector_integ_extended4 | ( | size_t | n, |
vec_t & | v | ||
) |
This function falls back to the equivalent of vector_integ_threept() for 3 points.
Definition at line 213 of file vector_derint.h.
double vector_integ_durand | ( | size_t | n, |
vec_t & | v | ||
) |
This function falls back to the equivalent of vector_integ_threept() for 3 points.
Definition at line 236 of file vector_derint.h.
double vector_integ_extended8 | ( | size_t | n, |
vec_t & | v | ||
) |
This function falls back to vector_integ_extended4() for less than 8 points.
Definition at line 259 of file vector_derint.h.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).