IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3405


Ignore:
Timestamp:
Mar 10, 2005, 12:33:57 PM (21 years ago)
Author:
evanalst
Message:

Update psPolynomail4DEvalVector.

Location:
trunk/psLib/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataManip/psFunctions.c

    r3397 r3405  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.93 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-03-10 01:11:12 $
     9 *  @version $Revision: 1.94 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-03-10 22:33:57 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    17461746
    17471747    psVector *tmp;
    1748     psVector *myW;
    1749     psVector *myX;
    1750     psVector *myY;
    1751     psVector *myZ;
    1752     psS32 i;
    1753     psS32 vecLen=x->n;
    1754 
    1755     vecLen=w->n;
     1748    psS32 vecLen=w->n;
     1749
     1750    // Determine the output vector size from min of input vectors
    17561751    if (y->n < vecLen) {
    17571752        vecLen = y->n;
     
    17641759    }
    17651760
     1761    // Allocate output vector
    17661762    tmp = psVectorAlloc(vecLen, PS_TYPE_F64);
    1767     for (i=0;i<vecLen;i++) {
     1763
     1764    // Evaluate the polynomial
     1765    for (psS32 i = 0; i < vecLen; i++) {
    17681766        tmp->data.F64[i] = psDPolynomial4DEval(myPoly,
    1769                                                myW->data.F64[i],
    1770                                                myX->data.F64[i],
    1771                                                myY->data.F64[i],
    1772                                                myZ->data.F64[i]);
    1773 
    1774     }
    1775 
    1776     if (w->type.type != PS_TYPE_F64) {
    1777         psFree(myW);
    1778     }
    1779     if (x->type.type != PS_TYPE_F64) {
    1780         psFree(myX);
    1781     }
    1782     if (y->type.type != PS_TYPE_F64) {
    1783         psFree(myY);
    1784     }
    1785     if (z->type.type != PS_TYPE_F64) {
    1786         psFree(myZ);
    1787     }
     1767                                               w->data.F64[i],
     1768                                               x->data.F64[i],
     1769                                               y->data.F64[i],
     1770                                               z->data.F64[i]);
     1771    }
     1772
     1773    // Return output vector
    17881774    return(tmp);
    17891775}
  • trunk/psLib/src/math/psPolynomial.c

    r3397 r3405  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.93 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-03-10 01:11:12 $
     9 *  @version $Revision: 1.94 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-03-10 22:33:57 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    17461746
    17471747    psVector *tmp;
    1748     psVector *myW;
    1749     psVector *myX;
    1750     psVector *myY;
    1751     psVector *myZ;
    1752     psS32 i;
    1753     psS32 vecLen=x->n;
    1754 
    1755     vecLen=w->n;
     1748    psS32 vecLen=w->n;
     1749
     1750    // Determine the output vector size from min of input vectors
    17561751    if (y->n < vecLen) {
    17571752        vecLen = y->n;
     
    17641759    }
    17651760
     1761    // Allocate output vector
    17661762    tmp = psVectorAlloc(vecLen, PS_TYPE_F64);
    1767     for (i=0;i<vecLen;i++) {
     1763
     1764    // Evaluate the polynomial
     1765    for (psS32 i = 0; i < vecLen; i++) {
    17681766        tmp->data.F64[i] = psDPolynomial4DEval(myPoly,
    1769                                                myW->data.F64[i],
    1770                                                myX->data.F64[i],
    1771                                                myY->data.F64[i],
    1772                                                myZ->data.F64[i]);
    1773 
    1774     }
    1775 
    1776     if (w->type.type != PS_TYPE_F64) {
    1777         psFree(myW);
    1778     }
    1779     if (x->type.type != PS_TYPE_F64) {
    1780         psFree(myX);
    1781     }
    1782     if (y->type.type != PS_TYPE_F64) {
    1783         psFree(myY);
    1784     }
    1785     if (z->type.type != PS_TYPE_F64) {
    1786         psFree(myZ);
    1787     }
     1767                                               w->data.F64[i],
     1768                                               x->data.F64[i],
     1769                                               y->data.F64[i],
     1770                                               z->data.F64[i]);
     1771    }
     1772
     1773    // Return output vector
    17881774    return(tmp);
    17891775}
  • trunk/psLib/src/math/psSpline.c

    r3397 r3405  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.93 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-03-10 01:11:12 $
     9 *  @version $Revision: 1.94 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-03-10 22:33:57 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    17461746
    17471747    psVector *tmp;
    1748     psVector *myW;
    1749     psVector *myX;
    1750     psVector *myY;
    1751     psVector *myZ;
    1752     psS32 i;
    1753     psS32 vecLen=x->n;
    1754 
    1755     vecLen=w->n;
     1748    psS32 vecLen=w->n;
     1749
     1750    // Determine the output vector size from min of input vectors
    17561751    if (y->n < vecLen) {
    17571752        vecLen = y->n;
     
    17641759    }
    17651760
     1761    // Allocate output vector
    17661762    tmp = psVectorAlloc(vecLen, PS_TYPE_F64);
    1767     for (i=0;i<vecLen;i++) {
     1763
     1764    // Evaluate the polynomial
     1765    for (psS32 i = 0; i < vecLen; i++) {
    17681766        tmp->data.F64[i] = psDPolynomial4DEval(myPoly,
    1769                                                myW->data.F64[i],
    1770                                                myX->data.F64[i],
    1771                                                myY->data.F64[i],
    1772                                                myZ->data.F64[i]);
    1773 
    1774     }
    1775 
    1776     if (w->type.type != PS_TYPE_F64) {
    1777         psFree(myW);
    1778     }
    1779     if (x->type.type != PS_TYPE_F64) {
    1780         psFree(myX);
    1781     }
    1782     if (y->type.type != PS_TYPE_F64) {
    1783         psFree(myY);
    1784     }
    1785     if (z->type.type != PS_TYPE_F64) {
    1786         psFree(myZ);
    1787     }
     1767                                               w->data.F64[i],
     1768                                               x->data.F64[i],
     1769                                               y->data.F64[i],
     1770                                               z->data.F64[i]);
     1771    }
     1772
     1773    // Return output vector
    17881774    return(tmp);
    17891775}
Note: See TracChangeset for help on using the changeset viewer.