Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

GROUP00


Files

file  psSpline.h
 Standard Mathematical Functions.
file  psSpline.h
 Standard Mathematical Functions.

Data Structures

struct  psSpline1D
 One-Dimensional Spline. More...

Functions

psSpline1DpsSpline1DAlloc (int n, int order, float min, float max)
 Allocates a psSpline1D structure.
psSpline1DpsSpline1DAllocGeneric (const psVector *bounds, int order)
 Allocates a psSpline1D structure.
float psSpline1DEval (const psSpline1D *spline, float x)
 Evaluates 1-D spline polynomials at a specific coordinate.
psVectorpsSpline1DEvalVector (const psSpline1D *spline, const psVector *x)
 Evaluates 1-D spline polynomials at a set of specific coordinates.
psS32 p_psVectorBinDisect (psVector *bins, psScalar *x)
 Performs a binary disection on a given vector.
psScalarp_psVectorInterpolate (psVector *domain, psVector *range, int order, psScalar *x)
 Interpolates a series of data points for evaluation at a specific coordinate.
bool psMemCheckSpline1D (psPtr ptr)
 Checks the type of a particular pointer.
psSpline1DpsVectorFitSpline1D (psSpline1D *mySpline, const psVector *x, const psVector *y, const psVector *yErr)
 Derive a one-dimensional spline fit.
psSpline1DpsVectorFitSpline1DNEW (const psVector *x, const psVector *y, int nKnots)


Function Documentation

psS32 p_psVectorBinDisect psVector bins,
psScalar x
 

Performs a binary disection on a given vector.

Searches through an array of data for a specified value.

Returns:
psS32 corresponding index number of specified value
Parameters:
bins  Array of non-decreasing values
x  Target value to find

psScalar* p_psVectorInterpolate psVector domain,
psVector range,
int  order,
psScalar x
 

Interpolates a series of data points for evaluation at a specific coordinate.

Uses a Lagrange interpolation method.

Returns:
psScalar* Lagrange interpolation value at given location
Parameters:
domain  Domain (x coords) for interpolation
range  Range (y coords) for interpolation
order  Order of interpolation function
x  Location at which to evaluate

bool psMemCheckSpline1D psPtr  ptr  ) 
 

Checks the type of a particular pointer.

Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.

Returns:
bool: True if the pointer matches a psSpline1D structure, false otherwise.
Parameters:
ptr  the pointer whose type to check

psSpline1D* psSpline1DAlloc int  n,
int  order,
float  min,
float  max
 

Allocates a psSpline1D structure.

Allocator for psSpline1D where the bounds are implicitly specified through specifying min and max values along with the number of splines.

Returns:
psSpline1D* new 1-D spline struct
Parameters:
n  Number of spline polynomials
order  Order of spline polynomials
min  Lower boundary value of spline polynomials
max  Upper boundary value of spline polynomials

psSpline1D* psSpline1DAllocGeneric const psVector bounds,
int  order
 

Allocates a psSpline1D structure.

Allocator for psSpline1D where the bounds are explicitly specified.

Returns:
psSpline1D* new 1-D spline struct
Parameters:
bounds  Bounds for spline polynomials
order  Order of spline polynomials

float psSpline1DEval const psSpline1D spline,
float  x
 

Evaluates 1-D spline polynomials at a specific coordinate.

Returns:
float result of spline polynomials evaluated at given location
Parameters:
spline  Coefficients for spline polynomials
x  location at which to evaluate

psVector* psSpline1DEvalVector const psSpline1D spline,
const psVector x
 

Evaluates 1-D spline polynomials at a set of specific coordinates.

Returns:
psVector* results of spline polynomials evaluated at given locations
Parameters:
spline  Coefficients of spline polynomials
x  locations at which to evaluate

psSpline1D* psVectorFitSpline1D psSpline1D mySpline,
const psVector x,
const psVector y,
const psVector yErr
 

Derive a one-dimensional spline fit.

Given a psSpline1D data structure and a set of x,y vectors, this routine generates the linear splines which satisfy those data points.

Returns:
psSpline1D*: the calculated one-dimensional splines
Parameters:
mySpline  The spline which will be generated.
x  Ordinates (or NULL to just use the indices)
y  Coordinates
yErr  Errors in coordinates, or NULL

psSpline1D* psVectorFitSpline1DNEW const psVector x,
const psVector y,
int  nKnots
 

Parameters:
x  Ordinates (or NULL to just use the indices)
y  Coordinates


Generated on Wed Sep 14 10:43:47 2005 for Pan-STARRS Foundation Library by  doxygen 1.4.2