OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Algorithms
bet
math
interpol.h
Go to the documentation of this file.
1
/* interpol.h
2
interpolation function definition
3
4
Project: Beam Envelope Tracker (BET)
5
6
Revision history
7
Date Description Programmer
8
------------ -------------------------------------------- --------------
9
09-03-06 Created Rene Bakker
10
*/
11
12
13
#ifndef _INTERPOL_DEF
14
#define _INTERPOL_DEF
15
16
/* spline()
17
Given arrays x[0..n-1] and y[0..n-1] containing a tabulated function,
18
i.e., y[i] = f(x[i]), with x[1] < x[2] < .. . < x[N-1], this routine
19
returns an array y2[0..n-1] that contains the second derivatives of the
20
interpolating function at the tabulated points x[i].
21
Derrivate at bounderies set to zero !
22
*/
23
void
spline
24
(
25
double
x[],
26
double
y[],
27
int
n
,
28
double
y2[]);
29
30
/* splint()
31
Given the arrays xa[0..n-1] and ya[0..n-1], which tabulate a function
32
(with the xa[i] in order), and given the array y2a[0..n-1], which
33
is the output from spline above, and given a value of x, this routine
34
returns a cubic-spline interpolated value y.
35
*/
36
void
splint
37
(
38
double
xa[],
39
double
ya[],
40
double
y2a[],
41
int
n
,
42
double
x,
43
double
*y);
44
45
/* lsplint()
46
Given the arrays xa[0..n-1] and ya[0..n-1], which tabulate a function
47
(with the xa[i] in order), and given the array y2a[0..n-1], which
48
is the output from spline above, and given a value of x, this routine
49
returns a cubic-spline interpolated value y, which is limited between
50
the y-values of the adjacent points.
51
*/
52
void
lsplint
53
(
54
double
xa[],
55
double
ya[],
56
double
y2a[],
57
int
n
,
58
double
x,
59
double
*y);
60
61
#endif
splint
void splint(double xa[], double ya[], double y2a[], int n, double x, double *y)
Definition:
interpol.cpp:95
Hypervolume::n
int n
Definition:
hypervolume.cpp:56
spline
void spline(double x[], double y[], int n, double y2[])
Definition:
interpol.cpp:61
lsplint
void lsplint(double xa[], double ya[], double y2a[], int n, double x, double *y)
Definition:
interpol.cpp:137
Generated on Sat Jan 4 2020 14:47:43 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5