IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 26, 2023, 10:04:39 AM (3 years ago)
Author:
eugene
Message:

rework the splines to use (x,y,dy2) values instead of full polynomials

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/psLib.20230123/src/math/psSpline.h

    r42319 r42324  
    3535typedef struct
    3636{
    37     unsigned int n;                    ///< The number of spline pieces
    38     psF32 *xKnots; ///< x-coordinate of the knots (n+1)
    39     psF32 *yKnots; ///< y-coordinate of the knots (n+1)
    40     psF32 *d2yKnots; ///< 2nd derivative of y at the knots (n+1)
     37    unsigned int n;    ///< The number of knots
     38    psF32 *xKnots; ///< x-coordinate of the knots
     39    psF32 *yKnots; ///< y-coordinate of the knots
     40    psF32 *d2yKnots; ///< 2nd derivative of y at the knots
    4141    bool equalSpacing; // if knots are equally spaced, the seqment choice can be optimized
    4242    psF32 xMin; // for equally-spaced knots, the value at the lower bound (xKnots[0])
     
    5858float psSpline1DEval(
    5959    const psSpline1D *spline,          ///< spline pointer
     60    float x                            ///< location at which to evaluate
     61);
     62
     63/** Evaluates 1-D spline polynomials at a specific coordinate.
     64 *
     65 *  @return float    result of spline polynomials evaluated at given location
     66 */
     67float psSpline1DEval_Segment(
     68    const psSpline1D *spline,          ///< spline pointer
     69    int n,                             // choice of segment
    6070    float x                            ///< location at which to evaluate
    6171);
     
    8191psSpline1D *psSpline1DFitVector(
    8292    const psVector* x,                 ///< Ordinates (or NULL to just use the indices)
    83     const psVector* y                  ///< Coordinates
     93    const psVector* y,                  ///< Coordinates.
     94    psF32 dyLower,                      ///< 1st derivative at lower bound
     95    psF32 dyUpper                       ///< 1st derivative at upper bound
    8496);
    8597
     
    93105    psPtr ptr                          ///< the pointer whose type to check
    94106);
     107
     108// check for equal spacing and set internal boolean if true
     109bool psSpline1DisEqualSpacing (psSpline1D *spline);
     110
     111// convert the cubic spline elements to a simply ordinary polynomial for segment n
     112psPolynomial1D *psSpline1DToPoly (psSpline1D *spline, int n);
    95113
    96114/*****************************************************************************
Note: See TracChangeset for help on using the changeset viewer.