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

GROUP00


Files

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

Data Structures

struct  psSpline1D
 One-Dimensional Spline. More...

Defines

#define PS_ASSERT_SPLINE(NAME, RVAL)
#define PS_ASSERT_SPLINE_NON_NULL(NAME, RVAL)

Functions

psS32 p_psVectorBinDisect (const psVector *bins, const psScalar *x)
 Performs a binary disection on a monotonically non-decreasing vector.
psScalar * p_psVectorInterpolate (psScalar *out, const psVector *domain, const psVector *range, psS32 order, const psScalar *x)
 Interpolates a series of data points for evaluation at a specific coordinate.
bool p_psNormalizeVectorRange (psVector *myData, psF64 outLow, psF64 outHigh)
psSpline1D * psSpline1DAlloc ()
 Allocates a psSpline1D structure.
float psSpline1DEval (const psSpline1D *spline, float x)
 Evaluates 1-D spline polynomials at a specific coordinate.
psVector * psSpline1DEvalVector (const psSpline1D *spline, const psVector *x)
 Evaluates 1-D spline polynomials at a set of specific coordinates.
psSpline1D * psVectorFitSpline1D (const psVector *x, const psVector *y)
 Derive a one-dimensional spline fit.
bool psMemCheckSpline1D (psPtr ptr)
 Checks the type of a particular pointer.


Define Documentation

#define PS_ASSERT_SPLINE (  NAME,
RVAL   ) 
 

Value:

if (false == psMemCheckSpline1D(NAME)) { \
    psError(PS_ERR_BAD_PARAMETER_NULL, true, \
            "Unallowable operation: argument %s is not a psSpline1D struct.\n",\
            #NAME); \
    return(RVAL); \
} \

Definition at line 100 of file psSpline.h.

#define PS_ASSERT_SPLINE_NON_NULL (  NAME,
RVAL   ) 
 

Value:

if ((NAME) == NULL) { \
    psError(PS_ERR_BAD_PARAMETER_NULL, true, \
            "Unallowable operation: psSpline1D %s is NULL.", \
            #NAME); \
    return(RVAL); \
} \

Definition at line 108 of file psSpline.h.


Function Documentation

bool p_psNormalizeVectorRange (  psVector *  myData,
psF64  outLow,
psF64  outHigh
) 
 

psS32 p_psVectorBinDisect (  const psVector *  bins,
const psScalar *  x
) 
 

Performs a binary disection on a monotonically non-decreasing 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 (  psScalar *  out,
const psVector *  domain,
const psVector *  range,
psS32  order,
const 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:
out  Output scalar, or NULL
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 (   ) 
 

Allocates a psSpline1D structure.

Allocator for psSpline1D.

Returns:
psSpline1D* new 1-D spline struct

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 (  const psVector *  x,
const psVector *  y
) 
 

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:
x  Ordinates (or NULL to just use the indices)
y  Coordinates


Generated on Mon Jul 3 14:15:13 2006 for Pan-STARRS Foundation Library by  doxygen 1.4.4