Changeset 11759 for trunk/psLib/src/math/psHistogram.c
- Timestamp:
- Feb 12, 2007, 5:01:24 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psHistogram.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psHistogram.c
r11674 r11759 5 5 * @author GLG (MHPCC), EAM (IfA) 6 6 * 7 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2007-02- 07 01:15:49$7 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2007-02-13 03:01:24 $ 9 9 * 10 10 * Copyright 2006 IfA, University of Hawaii … … 46 46 with the specifed upper and lower limits, and the specifed number of bins. 47 47 This routine will also set the bounds for each of the bins. 48 48 49 49 Input: 50 50 lower … … 92 92 psHistogramAllocGeneric(bounds): allocate a non-uniform histogram structure 93 93 with the specifed bounds. 94 94 95 95 Input: 96 96 bounds … … 144 144 histogram bin which contains the point. The width of that boxcar is defined 145 145 as 2.35 * error. 146 146 147 147 XXX: Must test this. 148 148 *****************************************************************************/ … … 218 218 in that histogram structure in accordance with the input data "in" and the, 219 219 possibly NULL, mask vector. 220 220 221 221 Inputs: 222 222 out … … 227 227 The histogram structure "out". 228 228 *****************************************************************************/ 229 psHistogram*psVectorHistogram(psHistogram* out,229 bool psVectorHistogram(psHistogram* out, 230 230 const psVector* values, 231 231 const psVector* errors, … … 234 234 { 235 235 psTrace("psLib.math", 3, "---- %s() begin ----\n", __func__); 236 PS_ASSERT_PTR_NON_NULL(out, NULL);237 PS_ASSERT_VECTOR_NON_NULL(out->bounds, NULL);238 PS_ASSERT_VECTOR_TYPE(out->bounds, PS_TYPE_F32, NULL);239 PS_ASSERT_INT_NONNEGATIVE(out->bounds->n, NULL);240 PS_ASSERT_VECTOR_NON_NULL(out->nums, NULL);241 PS_ASSERT_VECTOR_TYPE(out->nums, PS_TYPE_F32, NULL);242 PS_ASSERT_INT_NONNEGATIVE(out->nums->n, NULL);236 PS_ASSERT_PTR_NON_NULL(out, false); 237 PS_ASSERT_VECTOR_NON_NULL(out->bounds, false); 238 PS_ASSERT_VECTOR_TYPE(out->bounds, PS_TYPE_F32, false); 239 PS_ASSERT_INT_NONNEGATIVE(out->bounds->n, false); 240 PS_ASSERT_VECTOR_NON_NULL(out->nums, false); 241 PS_ASSERT_VECTOR_TYPE(out->nums, PS_TYPE_F32, false); 242 PS_ASSERT_INT_NONNEGATIVE(out->nums->n, false); 243 243 PS_ASSERT_VECTOR_NON_NULL(values, out); 244 244 if (mask) { 245 PS_ASSERT_VECTORS_SIZE_EQUAL(values, mask, NULL);246 PS_ASSERT_VECTOR_TYPE(mask, PS_TYPE_U8, NULL);245 PS_ASSERT_VECTORS_SIZE_EQUAL(values, mask, false); 246 PS_ASSERT_VECTOR_TYPE(mask, PS_TYPE_U8, false); 247 247 } 248 248 if (errors) { 249 PS_ASSERT_VECTORS_SIZE_EQUAL(values, errors, NULL);250 PS_ASSERT_VECTOR_TYPE(errors, values->type.type, NULL);249 PS_ASSERT_VECTORS_SIZE_EQUAL(values, errors, false); 250 PS_ASSERT_VECTOR_TYPE(errors, values->type.type, false); 251 251 } 252 252 … … 329 329 330 330 psTrace("psLib.math", 3, "---- %s() end ----\n", __func__); 331 return (out);332 } 333 331 return true; 332 } 333
Note:
See TracChangeset
for help on using the changeset viewer.
