Changeset 5155 for trunk/psLib/src/math/psSpline.h
- Timestamp:
- Sep 27, 2005, 1:19:47 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psSpline.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psSpline.h
r5066 r5155 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.5 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-09- 19 19:53:13$12 * @version $Revision: 1.57 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-09-27 23:16:59 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 39 39 psVector *knots; ///< The boundaries between each spline piece. Size is n+1. 40 40 psF32 *p_psDeriv2; ///< For cubic splines, the second derivative at each domain point. Size is n+1. 41 psF32 *p_psDomains; ///< The boundaries between each spline piece. Size is n+1.42 41 } 43 42 psSpline1D; … … 45 44 /** Allocates a psSpline1D structure 46 45 * 47 * Allocator for psSpline1D where the bounds are implicitly specified through specifying 48 * min and max values along with the number of splines. 46 * Allocator for psSpline1D. 49 47 * 50 48 * @return psSpline1D* new 1-D spline struct 51 49 */ 52 psSpline1D *psSpline1DAlloc( 53 unsigned int n, ///< Number of spline polynomials 54 unsigned int order, ///< Order of spline polynomials 55 float min, ///< Lower boundary value of spline polynomials 56 float max ///< Upper boundary value of spline polynomials 57 ); 58 59 /** Allocates a psSpline1D structure 60 * 61 * Allocator for psSpline1D where the bounds are explicitly specified. 62 * 63 * @return psSpline1D* new 1-D spline struct 64 */ 65 psSpline1D *psSpline1DAllocGeneric( 66 const psVector *bounds, ///< Bounds for spline polynomials 67 unsigned int order ///< Order of spline polynomials 68 ); 50 psSpline1D *psSpline1DAlloc(); 69 51 70 52 /** Evaluates 1-D spline polynomials at a specific coordinate. … … 86 68 ); 87 69 70 /** Derive a one-dimensional spline fit. 71 * 72 * Given a psSpline1D data structure and a set of x,y vectors, this routine 73 * generates the linear splines which satisfy those data points. 74 * 75 * @return psSpline1D*: the calculated one-dimensional splines 76 */ 77 psSpline1D *psVectorFitSpline1D( 78 const psVector* x, ///< Ordinates (or NULL to just use the indices) 79 const psVector* y ///< Coordinates 80 ); 81 82 /** Checks the type of a particular pointer. 83 * 84 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 85 * 86 * @return bool: True if the pointer matches a psSpline1D structure, false otherwise. 87 */ 88 bool psMemCheckSpline1D( 89 psPtr ptr ///< the pointer whose type to check 90 ); 91 88 92 /** Performs a binary disection on a given vector. 89 93 * Searches through an array of data for a specified value. … … 91 95 * @return psS32 corresponding index number of specified value 92 96 */ 93 unsigned intp_psVectorBinDisect(97 psS32 p_psVectorBinDisect( 94 98 psVector *bins, ///< Array of non-decreasing values 95 99 psScalar *x ///< Target value to find … … 104 108 psVector *domain, ///< Domain (x coords) for interpolation 105 109 psVector *range, ///< Range (y coords) for interpolation 106 unsigned int order,///< Order of interpolation function110 psS32 order, ///< Order of interpolation function 107 111 psScalar *x ///< Location at which to evaluate 108 );109 110 /** Checks the type of a particular pointer.111 *112 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.113 *114 * @return bool: True if the pointer matches a psSpline1D structure, false otherwise.115 */116 bool psMemCheckSpline1D(117 psPtr ptr ///< the pointer whose type to check118 );119 120 /** Derive a one-dimensional spline fit.121 *122 * Given a psSpline1D data structure and a set of x,y vectors, this routine123 * generates the linear splines which satisfy those data points.124 *125 * @return psSpline1D*: the calculated one-dimensional splines126 */127 psSpline1D *psVectorFitSpline1D(128 psSpline1D *spline, ///< The spline which will be generated.129 const psVector* x, ///< Ordinates (or NULL to just use the indices)130 const psVector* y, ///< Coordinates131 const psVector* yErr ///< Errors in coordinates, or NULL132 );133 134 psSpline1D *psVectorFitSpline1DNEW(135 const psVector* x, ///< Ordinates (or NULL to just use the indices)136 const psVector* y, ///< Coordinates137 unsigned int nKnots ///< Number of Knots138 112 ); 139 113
Note:
See TracChangeset
for help on using the changeset viewer.
