Content-type: text/html Manpage of nfolib

nfolib

Section: C Library Functions (3)
Updated: 7 October 1999
Index Return to Main Contents
 

NAME

least_squares, spline, lsq_fgen, lint, splint, trapspl, Simpson_spl, Milne_diff, Brent, golden  

SYNOPSIS

void least_squares
(
       int fit,

       int n_pts,

       double x_arr[],

       double y_arr[],

       double *r1,

       double *r2,

       double lsq_coeff[]

);

void spline
(
       double x[],

       double y[],

       int n,

       double yp1,

       double ypn,

       double y2[]

);

double lsq_fgen
(
       double tr,

       int fit,

       double lsq_coeff[]

);

double lint
(
       double xa[],

       double ya[],

       int n,

       double x

);

double splint
(
       double xa[],

       double ya[],

       double y2a[],

       int n,

       double x

);

double trapspl
(
       double t_1,

       double t_2,

       double h,

       double y[],

       double y2[],

       double x[],

       int n_pts

);

double Simpson_spl
(
       double from,

       double to,

       double step,

       double y_table[],

       double yd_table[],

       double x_table[],

       int n_pts

);

double Milne_diff
(
       int el,

       double h,

       double y_arr[]

);

double Brent
(
       double ax,

       double bx,

       double cx,

       double (*f)(void),

       double tol,

       double *xmin

);

double golden
(
       double ax,

       double bx,

       double cx,

       double (*f)(void),

       double tol,

       double *xmin

);
 

PARAMETERS

int fit
Type of fit required.
int n_pts    (least_squares)
Number of data points.
double x_arr[]
Array of X data.
double y_arr[]
Array of Y data.
double *r1
Goodness of fit.
double *r2
Coeff of determination.
double lsq_coeff[]
Least squares coeffs.
double x[]   (spline)
Array of X values.
double y[]
Array of Y values.
int n
Number of points.
double yp1
Boundary condition 1.
double ypn
Boundary condition 2.
double y2[]  (spline)
Array of Y derivatives dy/dx.
double tr
Not Documented.
double xa[]
Array of X values.
double ya[]
Array of Y values.
double x
Point to interpolate.
double y2a[]
Array of derivatives dy/dx.
double t_1
Integral lower limit.
double t_2
Integral upper limit.
double h
Trapezium size h.
double y2[]  (trapspl)
Array of derivatives dy/dx.
double x[]   (trapspl)
Array of Y values.
int n_pts    (trapspl)
Number of pts in num function.
double from
Integral lower limit.
double to
Integral upper limit.
double step
Simpson step length.
double y_table[]
Array of Y values.
double yd_table[]
Array of derivatives.
double x_table[]
Array of X values.
int n_pts    (Simpson_spl)
Number of pts in function.
int el
Not Documented.
double ax    (Brent)
Bracket 1.
double bx    (Brent)
Bracket 2.
double cx    (Brent)
Bracket 3.
double (*f)(void)    (Brent)
Function to be minimised.
double tol   (Brent)
Relaxation tolerance.
double *xmin (Brent)
X co-ordinate of minimum.
double ax    (golden)
Guess [bracket 1 co-ordinate].
double bx    (golden)
Guess [bracket 2 co-ordinate].
double cx    (golden)
Guess [bracket 3 co-ordinate].
double (*f)(void)    (golden)
Function to be bracketed.
double tol   (golden)
Bracket tolerance.
double *xmin (golden)
Co-ordinate of minimum.
 

DESCRIPTION

 

least_squares

Least squares regression package.

Linear, Inverse, Log, Power and Exponential least squares fits. See Micro User, Educational suppliment for further details.  

spline

Routine to generate a cubic interpolation table ...  

lsq_fgen

Routine to generate fitted function from least squares parameters ...  

lint

Linear interpolation routine ...  

splint

Cubic spline interpolation. For further details see "Numerical Recipes in C" pp96-97 ...  

trapspl

Routine to integrate a numerical function using the Trapezium rule ...  

Simpson_spl

Integration routine using Simpsons rule ...  

Milne_diff

Routine to differentiate using Milnes' method ...  

Brent

Routine to minimise a linear function using Brent's method ...  

golden

Find the minimum of a function of one dimension using the Golden section search ...


 

Index

NAME
SYNOPSIS
PARAMETERS
DESCRIPTION
least_squares
spline
lsq_fgen
lint
splint
trapspl
Simpson_spl
Milne_diff
Brent
golden

This document was created by man2html, using the manual pages.
Time: 16:36:10 GMT, January 10, 2008