stats.h 477 B

1234567891011121314151617181920212223242526
  1. #ifndef __sti__stats_h__
  2. #define __sti__stats_h__
  3. typedef struct sti_stats {
  4. double sum;
  5. double mean;
  6. double min;
  7. size_t min_index;
  8. double max;
  9. size_t max_index;
  10. double median;
  11. size_t median_index;
  12. double pop_var;
  13. double std_dev;
  14. } sti_stats;
  15. int calc_stats_f(void* data, size_t stride, ptrdiff_t val_offset, size_t len, sti_stats* st);
  16. int calc_stats_d(void* data, size_t stride, ptrdiff_t val_offset, size_t len, sti_stats* st);
  17. #endif //__sti__stats_h__