psMathUtils.h

Go to the documentation of this file.
00001 /* @file psMathUtils.h
00002  * @brief Standard Mathematical Functions.
00003  *
00004  * This file contains standard math rotines.
00005  *
00006  * @author GLG, MHPCC
00007  *
00008  * @version $Revision: 1.4 $ $Name:  $
00009  * @date $Date: 2007/01/23 22:47:23 $
00010  * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
00011  */
00012 
00013 #ifndef PS_MATHUTILS_H
00014 #define PS_MATHUTILS_H
00015 
00016 /// @addtogroup MathOps Mathematical Operations
00017 /// @{
00018 
00019 #include <stdio.h>
00020 #include <stdbool.h>
00021 #include <float.h>
00022 #include <math.h>
00023 #include "psVector.h"
00024 #include "psScalar.h"
00025 #include "psPolynomial.h"
00026 
00027 /** Performs a binary disection on a monotonically non-decreasing vector.
00028  *  Searches through an array of data for a specified value.
00029  *
00030  *  @return psS32    corresponding index number of specified value
00031  */
00032 psS32 p_psVectorBinDisect(
00033     const psVector *bins,               ///< Array of non-decreasing values
00034     const psScalar *x                   ///< Target value to find
00035 );
00036 
00037 /** Interpolates a series of data points for evaluation at a specific coordinate.  Uses a
00038  *  Lagrange interpolation method.
00039  *
00040  *  @return psScalar*    Lagrange interpolation value at given location
00041  */
00042 psScalar *p_psVectorInterpolate(
00043     psScalar *out,                      ///< Output scalar, or NULL
00044     const psVector *domain,             ///< Domain (x coords) for interpolation
00045     const psVector *range,              ///< Range (y coords) for interpolation
00046     psS32 order,                        ///< Order of interpolation function
00047     const psScalar *x                   ///< Location at which to evaluate
00048 );
00049 
00050 bool p_psNormalizeVectorRange(psVector* myData,
00051                               psF64 outLow,
00052                               psF64 outHigh);
00053 
00054 /// @}
00055 #endif // #ifndef PS_MATHUTILS_H

Generated on Fri Feb 2 22:24:35 2007 for pslib by  doxygen 1.5.1