📄 rms_error.cc
字号:
//file: rms_error.cc This returns ||in - out||/||in|| in l^2-norm#include <math.h>#include "rms_error.h"real RMS_error(const Interval &input, const Interval &output ){ assert(input.beg==output.beg && input.end==output.end); real error = 0, temp = 0; real temp2; for(int i=input.beg; i<=input.end; i++) { temp2 = input[i]-output[i]; error += temp2*temp2; temp += input[i]*input[i]; } error /= temp; error = sqrt(error); return error;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -