ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
deriv.hpp
Go to the documentation of this file.
1/*
2 * $Id: deriv.hpp 236 2012-08-08 19:47:53Z jdl3 $
3 * Copyright (C) 2012 John D Lamb
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20#ifndef CCGSL_DERIV_HPP
21#define CCGSL_DERIV_HPP
22
23#include<gsl/gsl_deriv.h>
25
26namespace gsl {
32 namespace deriv {
43 inline int central( function_scl const& f, double x, double h, double& result,
44 double& abserr ){
45 return gsl_deriv_central( &f, x, h, &result, &abserr ); }
46
47#ifndef DOXYGEN_SKIP
58 inline int central( gsl_function const* f, double x, double h, double* result,
59 double* abserr ){
60 return gsl_deriv_central( f, x, h, result, abserr ); }
61#endif /* DOXYGEN_SKIP */
62
73 inline int backward( function_scl const& f, double x, double h, double& result,
74 double& abserr ){
75 return gsl_deriv_backward( &f, x, h, &result, &abserr ); }
76
77#ifndef DOXYGEN_SKIP
88 inline int backward( gsl_function const* f, double x, double h, double* result,
89 double* abserr ){
90 return gsl_deriv_backward( f, x, h, result, abserr ); }
91#endif /* DOXYGEN_SKIP */
92
103 inline int forward( function_scl const& f, double x, double h, double& result,
104 double& abserr ){
105 return gsl_deriv_forward( &f, x, h, &result, &abserr ); }
106
107#ifndef DOXYGEN_SKIP
118 inline int forward( gsl_function const* f, double x, double h, double* result,
119 double* abserr ){
120 return gsl_deriv_forward( f, x, h, result, abserr ); }
121#endif /* DOXYGEN_SKIP */
122 }
123}
124#endif
Class that extends gsl_function so that it can be constructed from arbitrary function objects.
int backward(function_scl const &f, double x, double h, double &result, double &abserr)
C++ version of gsl_deriv_backward().
Definition: deriv.hpp:73
int central(function_scl const &f, double x, double h, double &result, double &abserr)
C++ version of gsl_deriv_central().
Definition: deriv.hpp:43
int forward(function_scl const &f, double x, double h, double &result, double &abserr)
C++ version of gsl_deriv_forward().
Definition: deriv.hpp:103
double deriv(int const m, int const n, double const x)
C++ version of gsl_sf_hermite_deriv().
Definition: sf_hermite.hpp:126
gsl_sf_result result
Typedef for gsl_sf_result.
Definition: sf_result.hpp:30
The gsl package creates an interface to the GNU Scientific Library for C++.
Definition: blas.hpp:34