Changeset 3405
- Timestamp:
- Mar 10, 2005, 12:33:57 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 3 edited
-
dataManip/psFunctions.c (modified) (3 diffs)
-
math/psPolynomial.c (modified) (3 diffs)
-
math/psSpline.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psFunctions.c
r3397 r3405 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.9 3$ $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 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1746 1746 1747 1747 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 1756 1751 if (y->n < vecLen) { 1757 1752 vecLen = y->n; … … 1764 1759 } 1765 1760 1761 // Allocate output vector 1766 1762 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++) { 1768 1766 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 1788 1774 return(tmp); 1789 1775 } -
trunk/psLib/src/math/psPolynomial.c
r3397 r3405 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.9 3$ $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 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1746 1746 1747 1747 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 1756 1751 if (y->n < vecLen) { 1757 1752 vecLen = y->n; … … 1764 1759 } 1765 1760 1761 // Allocate output vector 1766 1762 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++) { 1768 1766 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 1788 1774 return(tmp); 1789 1775 } -
trunk/psLib/src/math/psSpline.c
r3397 r3405 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.9 3$ $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 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1746 1746 1747 1747 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 1756 1751 if (y->n < vecLen) { 1757 1752 vecLen = y->n; … … 1764 1759 } 1765 1760 1761 // Allocate output vector 1766 1762 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++) { 1768 1766 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 1788 1774 return(tmp); 1789 1775 }
Note:
See TracChangeset
for help on using the changeset viewer.
