stats.h
来自「MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程」· C头文件 代码 · 共 63 行
H
63 行
/* Simple stats stuff Ed Karrels Argonne National Laboratory*/#ifndef STATS_H_#define STATS_H_typedef struct { double sum; double sum_sq; double max, min; int n;} statData;#ifndef ANSI_ARGS#if defined(__STDC__) || defined(__cplusplus) || defined(HAVE_PROTOTYPES)#define ANSI_ARGS(a) a#else#define ANSI_ARGS(a) ()#endif#endif /* initialize stats structure */statData *Stats_Create ANSI_ARGS((void)); /* add a data point */int Stats_Add ANSI_ARGS(( statData *stats, double x )); /* add an array of data points */int Stats_AddArray ANSI_ARGS(( statData *stats, double *nums, int n )); /* get the # of data points */int Stats_N ANSI_ARGS(( statData *stats )); /* get the sum of the data points */double Stats_Sum ANSI_ARGS(( statData *stats )); /* get the sum of the data points */double Stats_Min ANSI_ARGS(( statData *stats )); /* get the sum of the data points */double Stats_Max ANSI_ARGS(( statData *stats )); /* get the average of the data */double Stats_Av ANSI_ARGS(( statData *stats )); /* get the standard deviation of the data */double Stats_StdDev ANSI_ARGS(( statData *stats )); /* clear the stats data */int Stats_Reset ANSI_ARGS(( statData *stats )); /* close the stats data */int Stats_Close ANSI_ARGS(( statData *stats ));#endif /* #ifndef STATS_H_ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?