report.c
来自「傅立叶变换和小波变换是图像压缩的重要工具。该代大戏是利用小波变换进行图像压缩。」· C语言 代码 · 共 30 行
C
30 行
#ifndef DO_REPORT
#define DO_REPORT
#endif
#include <stdio.h>
#include <math.h> // for sqrt
#include "report.h"
#ifndef _LOG
#define _LOG
#endif
#include "log.h"
FILE * reportFP = stdout;
void Report_DoReport(const char * str,int count,double tot,double totsqr)
{
double avg,avgsqr;
avg = tot/count;
avgsqr = totsqr/count;
Log_TeeFile(reportFP);
Log_Printf("%-20s : avg = %2.1f (sdev = %2.1f), tot = %d\n",
str , avg, sqrt(avgsqr - avg*avg), (int)tot );
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?