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