Changeset 4581 for trunk/psLib/src/math/psFunctions.h
- Timestamp:
- Jul 19, 2005, 3:21:13 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psFunctions.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psFunctions.h
r4568 r4581 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-07- 16 00:06:32$14 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-07-20 01:21:13 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 74 74 { 75 75 psPolynomialType type; ///< Polynomial type 76 psElemType ctype; ///< Polynomial precision77 76 int n; ///< Number of terms 78 psF 32*coeff; ///< Coefficients79 psF 32*coeffErr; ///< Error in coefficients77 psF64 *coeff; ///< Coefficients 78 psF64 *coeffErr; ///< Error in coefficients 80 79 char *mask; ///< Coefficient mask 81 80 } … … 86 85 { 87 86 psPolynomialType type; ///< Polynomial type 88 psElemType ctype; ///< Polynomial precision89 87 int nX; ///< Number of terms in x 90 88 int nY; ///< Number of terms in y 91 psF 32**coeff; ///< Coefficients92 psF 32**coeffErr; ///< Error in coefficients89 psF64 **coeff; ///< Coefficients 90 psF64 **coeffErr; ///< Error in coefficients 93 91 char **mask; ///< Coefficients mask 94 92 } … … 99 97 { 100 98 psPolynomialType type; ///< Polynomial type 101 psElemType ctype; ///< Polynomial precision102 99 int nX; ///< Number of terms in x 103 100 int nY; ///< Number of terms in y 104 101 int nZ; ///< Number of terms in z 105 psF 32***coeff; ///< Coefficients106 psF 32***coeffErr; ///< Error in coefficients102 psF64 ***coeff; ///< Coefficients 103 psF64 ***coeffErr; ///< Error in coefficients 107 104 char ***mask; ///< Coefficients mask 108 105 } … … 113 110 { 114 111 psPolynomialType type; ///< Polynomial type 115 psElemType ctype; ///< Polynomial precision116 112 int nX; ///< Number of terms in x 117 113 int nY; ///< Number of terms in y 118 114 int nZ; ///< Number of terms in z 119 115 int nT; ///< Number of terms in t 120 psF 32****coeff; ///< Coefficients121 psF 32****coeffErr; ///< Error in coefficients116 psF64 ****coeff; ///< Coefficients 117 psF64 ****coeffErr; ///< Error in coefficients 122 118 char ****mask; ///< Coefficients mask 123 119 } … … 251 247 ); 252 248 253 /*****************************************************************************/254 255 /* Double-precision polynomials, mainly for use in astrometry */256 257 /** Double-precision one-dimensional polynomial */258 typedef struct259 {260 psPolynomialType type; ///< Polynomial type261 int n; ///< Number of terms262 psF64 *coeff; ///< Coefficients263 psF64 *coeffErr; ///< Error in coefficients264 char *mask; ///< Coefficient mask265 }266 psDPolynomial1D;267 268 /** Double-precision two-dimensional polynomial */269 typedef struct270 {271 psPolynomialType type; ///< Polynomial type272 int nX; ///< Number of terms in x273 int nY; ///< Number of terms in y274 psF64 **coeff; ///< Coefficients275 psF64 **coeffErr; ///< Error in coefficients276 char **mask; ///< Coefficients mask277 }278 psDPolynomial2D;279 280 /** Double-precision three-dimensional polynomial */281 typedef struct282 {283 psPolynomialType type; ///< Polynomial type284 int nX; ///< Number of terms in x285 int nY; ///< Number of terms in y286 int nZ; ///< Number of terms in z287 psF64 ***coeff; ///< Coefficients288 psF64 ***coeffErr; ///< Error in coefficients289 char ***mask; ///< Coefficient mask290 }291 psDPolynomial3D;292 293 /** Double-precision four-dimensional polynomial */294 typedef struct295 {296 psPolynomialType type; ///< Polynomial type297 int nX; ///< Number of terms in w298 int nY; ///< Number of terms in x299 int nZ; ///< Number of terms in y300 int nT; ///< Number of terms in z301 psF64 ****coeff; ///< Coefficients302 psF64 ****coeffErr; ///< Error in coefficients303 char ****mask; ///< Coefficients mask304 }305 psDPolynomial4D;306 307 /** Allocates a double-precision 1-D polynomial structure with n terms308 *309 * @return psPolynomial1D* new double-precision 1-D polynomial struct310 */311 psDPolynomial1D* psDPolynomial1DAlloc(312 int n, ///< Number of terms313 psPolynomialType type ///< Polynomial Type314 );315 316 /** Allocates a double-precision 2-D polynomial structure317 *318 * @return psPolynomial2D* new double-precision 2-D polynomial struct319 */320 psDPolynomial2D* psDPolynomial2DAlloc(321 int nX, ///< Number of terms in x322 int nY, ///< Number of terms in y323 psPolynomialType type ///< Polynomial Type324 );325 326 /** Allocates a double-precision 3-D polynomial structure327 *328 * @return psPolynomial3D* new double-precision 3-D polynomial struct329 */330 psDPolynomial3D* psDPolynomial3DAlloc(331 int nX, ///< Number of terms in x332 int nY, ///< Number of terms in y333 int nZ, ///< Number of terms in z334 psPolynomialType type ///< Polynomial Type335 );336 337 /** Allocates a double-precision 4-D polynomial structure338 *339 * @return psPolynomial4D* new double-precision 4-D polynomial struct340 */341 psDPolynomial4D* psDPolynomial4DAlloc(342 int nX, ///< Number of terms in w343 int nY, ///< Number of terms in x344 int nZ, ///< Number of terms in y345 int nT, ///< Number of terms in z346 psPolynomialType type ///< Polynomial Type347 );348 349 /** Evaluates a double-precision 1-D polynomial at specific coordinates.350 *351 * @return psF32 result of polynomial at given location352 */353 psF64 psDPolynomial1DEval(354 const psDPolynomial1D* poly, ///< Coefficients for the polynomial355 psF64 x ///< Value at which to evaluate356 );357 358 /** Evaluates a double-precision 2-D polynomial at specific coordinates.359 *360 * @return psF32 result of polynomial at given location361 */362 psF64 psDPolynomial2DEval(363 const psDPolynomial2D* poly, ///< Coefficients for the polynomial364 psF64 x, ///< Value x at which to evaluate365 psF64 y ///< Value y at which to evaluate366 );367 368 /** Evaluates a double-precision 3-D polynomial at specific coordinates.369 *370 * @return psF64 result of polynomial at given location371 */372 psF64 psDPolynomial3DEval(373 const psDPolynomial3D* poly, ///< Coefficients for the polynomial374 psF64 x, ///< Value x at which to evaluate375 psF64 y, ///< Value y at which to evaluate376 psF64 z ///< Value z at which to evaluate377 );378 379 /** Evaluates a double-precision 4-D polynomial at specific coordinates.380 *381 * @return psF64 result of polynomial at given location382 */383 psF64 psDPolynomial4DEval(384 const psDPolynomial4D* poly, ///< Coefficients for the polynomial385 psF64 x, ///< Value w at which to evaluate386 psF64 y, ///< Value x at which to evaluate387 psF64 z, ///< Value y at which to evaluate388 psF64 t ///< Value z at which to evaluate389 );390 391 /** Evaluates a double-precision 1-D polynomial at specific sets of coordinates.392 *393 * @return psVector* results of polynomial at given locations394 */395 psVector *psDPolynomial1DEvalVector(396 const psDPolynomial1D *poly, ///< Coefficients for the polynomial397 const psVector *x ///< x locations at which to evaluate398 );399 400 /** Evaluates a double-precision 2-D polynomial at specific sets of coordinates.401 *402 * @return psVector* results of polynomial at given locations403 */404 psVector *psDPolynomial2DEvalVector(405 const psDPolynomial2D *poly, ///< Coefficients for the polynomial406 const psVector *x, ///< x locations at which to evaluate407 const psVector *y ///< y locations at which to evaluate408 );409 410 /** Evaluates a double-precision 3-D polynomial at specific sets of coordinates.411 *412 * @return psVector* results of polynomial at given locations413 */414 psVector *psDPolynomial3DEvalVector(415 const psDPolynomial3D *poly, ///< Coefficients for the polynomial416 const psVector *x, ///< x locations at which to evaluate417 const psVector *y, ///< y locations at which to evaluate418 const psVector *z ///< z locations at which to evaluate419 );420 421 /** Evaluates a double-precision 4-D polynomial at specific sets of coordinates.422 *423 * @return psVector* results of polynomial at given locations424 */425 psVector *psDPolynomial4DEvalVector(426 const psDPolynomial4D *poly, ///< Coefficients for the polynomial427 const psVector *x, ///< w locations at which to evaluate428 const psVector *y, ///< x locations at which to evaluate429 const psVector *z, ///< y locations at which to evaluate430 const psVector *t ///< z locations at which to evaluate431 );432 249 433 250 /** One-Dimensional Spline */
Note:
See TracChangeset
for help on using the changeset viewer.
