Changeset 1327 for trunk/psLib/src/math/psStats.c
- Timestamp:
- Jul 28, 2004, 5:54:52 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psStats.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psStats.c
r1326 r1327 1600 1600 1601 1601 // Allocate the bins, and initialize them to zero. 1602 newHist->nums = psVectorAlloc(n, PS_TYPE_ S32);1602 newHist->nums = psVectorAlloc(n, PS_TYPE_U32); 1603 1603 newHist->nums->n = newHist->nums->nalloc; 1604 1604 for (i=0;i<newHist->nums->n;i++) { 1605 newHist->nums->data. S32[i] = 0;1605 newHist->nums->data.U32[i] = 0; 1606 1606 } 1607 1607 … … 1656 1656 // Allocate the bins, and initialize them to zero. If there are N bounds, 1657 1657 // then there are N-1 bins. 1658 newHist->nums = psVectorAlloc((bounds->n)-1, PS_TYPE_ S32);1658 newHist->nums = psVectorAlloc((bounds->n)-1, PS_TYPE_U32); 1659 1659 newHist->nums->n = newHist->nums->nalloc; 1660 1660 for (i=0;i<newHist->nums->n;i++) { 1661 newHist->nums->data. S32[i] = 0;1661 newHist->nums->data.U32[i] = 0; 1662 1662 } 1663 1663 … … 1705 1705 if (out == NULL) { 1706 1706 return(NULL); 1707 } 1708 1709 // Check the specified output histogram for type psF32 1710 if (out->bounds->type.type != PS_TYPE_F32) { 1711 psAbort(__func__, 1712 "Only data type PS_TYPE_F32 for the output.bounds member."); 1713 } 1714 1715 if (out->nums->type.type != PS_TYPE_U32) { 1716 psAbort(__func__, 1717 "Only data type PS_TYPE_U32 for output.nums member."); 1707 1718 } 1708 1719
Note:
See TracChangeset
for help on using the changeset viewer.
