?? xprobks.cpp
字號:
#include <string>
#include <iostream>
#include <iomanip>
#include "nr.h"
using namespace std;
// Driver for routine probks
int main(void)
{
const int NPTS=20,ISCAL=40;
const DP EPS=0.1;
int i,j,jmax;
DP alam,aval;
string txt;
cout << "probability function for kolmogorov-smirnov statistic";
cout << endl << endl;
cout << setw(7) << "lambda" << setw(11) << "value:";
cout << setw(14) << "graph:" << endl;
cout << fixed << setprecision(5);
for (i=0;i<NPTS;i++) {
txt=" ";
alam=(i+1)*EPS;
aval=NR::probks(alam);
for (j=0;j<ISCAL;j++) {
if (j < jmax) txt += '*';
else txt += ' ';
}
cout << setw(8) << alam << setw(11) << aval;
cout << txt << endl;
}
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -