資源簡介
double gauss_ch2(double(*f)(double), int n);Gauss-Chebyeshev II 積分
double comp_gauss_leg(double (*f)(double), double a, double b)逐次減半Gauss-legender兩點求積
double comp_trep(double (*f)(double), double a, double b)
double romberg(double (*f)(double), double a, double b)

代碼片段和文件信息
#include?“NumInt.h“
int?main(int?argc?char?*argv[])
{
????LARGE_INTEGER?BegainTime;?????
????LARGE_INTEGER?EndTime;?????
????LARGE_INTEGER?Frequency;?????
????QueryPerformanceFrequency(&Frequency);?????????
????int?flag[4];
????int?n?=?5?;//gass分段數?
????double?resultreal;
?????
?
????//Gauss-ChebyeshevII公式積分??
????QueryPerformanceCounter(&BegainTime);?
????result?=?gauss_ch2(*f3?n);
????QueryPerformanceCounter(&EndTime);??
????cout<<“gauss_ch2積分結果:?“;??
printf(“%.8f\n“result);
????printf(?“運行時間(單位:s):%.8f\n\n“?(double)(EndTime.QuadPart?-?BegainTime.QuadPart)/Frequency.QuadPart);?
???
????//逐次減半法復化梯形公式積分?
????QueryPerformanceCounter(&BegainTime);?
????result?=?comp_trep(*f4?-1?1);
????QueryPerformanceCounter(&EndTime);
????cout<<“comp_trep積分結果:?“;??
printf(“%.8f\n“result);
????printf(?“運行時間(單位:s):%.8f\n\n“?(double)(EndTime.QuadPart?-?BegainTime.QuadPart)/Frequency.QuadPart);
????//逐次減半復化Gauss-Legender兩點積分
????QueryPerformanceCounter(&BegainTime);?
????result?=?comp_gauss_leg(*f4?-1?1);
????QueryPerformanceCounter(&EndTime);
????cout<<“comp_gauss_leg積分結果:?“;??
printf(“%.8f\n“result);??
????printf(?“運行時間(單位:s):%.8f\n\n“?(double)(EndTime.QuadPart?-?BegainTime.QuadPart)/Frequency.QuadPart);??
????//Rombert法積分?
????QueryPerformanceCounter(&BegainTime);?
????result?=?romberg(*f4?-1?1);
????QueryPerformanceCounter(&EndTime);
????cout<<“romberg積分結果:?“;??
printf(“%.8f\n“result);?
????printf(?“運行時間(單位:s):%.8f\n\n“?(double)(EndTime.QuadPart?-?BegainTime.QuadPart)/Frequency.QuadPart);?
????
????system(“PAUSE“);?
????return?EXIT_SUCCESS;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????167439??2011-05-27?11:32??數值積分\NumInt\Debug\main.obj
?????文件??????????0??2011-05-27?11:32??數值積分\NumInt\Debug\main.sbr
?????文件????2122752??2011-05-27?11:32??數值積分\NumInt\Debug\NumInt.bsc
?????文件?????577630??2011-05-27?11:32??數值積分\NumInt\Debug\NumInt.exe
?????文件?????815320??2011-05-27?11:32??數值積分\NumInt\Debug\NumInt.ilk
?????文件?????163319??2011-05-26?23:09??數值積分\NumInt\Debug\NumInt.obj
?????文件????6416612??2011-05-27?09:22??數值積分\NumInt\Debug\NumInt.pch
?????文件????1131520??2011-05-27?11:32??數值積分\NumInt\Debug\NumInt.pdb
?????文件?????189440??2011-05-27?11:49??數值積分\NumInt\Debug\vc60.idb
?????文件?????135168??2011-05-27?11:32??數值積分\NumInt\Debug\vc60.pdb
?????文件???????1702??2011-05-27?11:32??數值積分\NumInt\main.cpp
?????文件?????????24??2011-05-26?23:09??數值積分\NumInt\NumInt.cpp
?????文件???????4341??2011-05-27?01:21??數值積分\NumInt\NumInt.dsp
?????文件????????520??2011-05-26?21:48??數值積分\NumInt\NumInt.dsw
?????文件???????5770??2011-05-27?09:22??數值積分\NumInt\NumInt.h
?????文件??????50176??2011-06-08?14:06??數值積分\NumInt\NumInt.ncb
?????文件??????48640??2011-06-08?14:06??數值積分\NumInt\NumInt.opt
?????文件???????1718??2011-05-27?11:32??數值積分\NumInt\NumInt.plg
?????文件????????289??2011-06-08?14:06??數值積分\NumInt\NumInt.positions
?????文件?????145547??2010-04-03?17:00??數值積分\數值積分.pdf
?????目錄??????????0??2011-07-24?11:33??數值積分\NumInt\Debug
?????目錄??????????0??2011-07-24?11:33??數值積分\NumInt
?????目錄??????????0??2011-07-24?11:33??數值積分
-----------?---------??----------?-----??----
?????????????11977927????????????????????23
- 上一篇:MSP430用戶手冊英文版.pdf
- 下一篇:小型辦公局域網設計.
評論
共有 條評論