| Diploma Thesis Percolation Simulation C++ Sourcecode Documentation |
Compounds | |
| class | manipdata |
| class | minmax |
| class | muvarskewkurt |
| class | statistical |
Functions | |
| template<class RES> ostream & | operator<< (ostream &os, muvarskewkurt< RES > A) |
| template<class RES, class ELEM> void | calculate_all_moments (ELEM(manipdata< ELEM >::*function)(ELEM, ELEM), ELEM fn_arg, std::list< ELEM > &elements, measure< RES > &average, measure< RES > &variance, measure< RES > &skewness, measure< RES > &kurtosis) |
| template<class RES, class ELEM> muvarskewkurt< RES > | calculate_moments (ELEM(manipdata< ELEM >::*function)(ELEM, ELEM), ELEM fn_arg, std::list< ELEM > &elements, RES dummy) |
| void | test_statistics () |
| template<class T> T | minof2 (T a, T b) |
| template<class T> T | maxof2 (T a, T b) |
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 222 of file statistics.h. References measure< T >::av(), statistics::statistical< RES, ELEM >::average(), statistics::statistical< RES, ELEM >::kurtosis(), statistics::statistical< RES, ELEM >::skewness(), sqrt(), and statistics::statistical< RES, ELEM >::variance().
00226 {
00227 statistical<RES, ELEM> *moments=NULL;
00228 average =moments->average (function, fn_arg, elements);
00229 variance=moments->variance(function, fn_arg, elements, average.av());
00230 skewness=moments->skewness(function, fn_arg, elements, average.av(), sqrt(variance));
00231 kurtosis=moments->kurtosis(function, fn_arg, elements, average.av(), sqrt(variance));
00232 }
|
|
||||||||||||||||||||||||
|
Definition at line 265 of file statistics.h. References measure< RES >::av(), statistics::statistical< RES, ELEM >::average(), statistics::statistical< RES, ELEM >::kurtosis(), statistics::muvarskewkurt< RES >::kurtosis, statistics::muvarskewkurt< RES >::mu, statistics::statistical< RES, ELEM >::skewness(), statistics::muvarskewkurt< RES >::skewness, sqrt(), statistics::statistical< RES, ELEM >::variance(), and statistics::muvarskewkurt< RES >::variance.
00269 {
00270 statistical<RES, ELEM> *moments=NULL;
00271 muvarskewkurt<RES> temp;
00272 temp.mu =moments->average (function, fn_arg, elements);
00273 temp.variance=moments->variance(function, fn_arg, elements, temp.mu.av());
00274 temp.skewness=moments->skewness(function, fn_arg, elements, temp.mu.av(), sqrt(temp.variance.av()));
00275 temp.kurtosis=moments->kurtosis(function, fn_arg, elements, temp.mu.av(), sqrt(temp.variance.av()));
00276 return temp;
00277 }
|
|
||||||||||||||||
|
Definition at line 323 of file statistics.h.
00323 { return (a<b)?b:a; }
|
|
||||||||||||||||
|
Definition at line 321 of file statistics.h.
00321 { return (a<b)?a:b; }
|
|
||||||||||||||||
|
Definition at line 251 of file statistics.h.
00251 {
00252 os <<"mu="<<A.mu<<" var="<<A.variance<<" skw="<<A.skewness<<" krt="<<A.kurtosis;
00253 return os;
00254 }
|
|
|
Definition at line 280 of file statistics.h.
00280 {
00281 cout <<"\nHi!\nTest statistics with a list of random numbers.";
00282 cout <<"\nHow many:"<<flush;
00283 int N=0;
00284 while (N<1) cin>>N;
00285 std::list<float> L;
00286 for (int i=0;i<N;i++) L.push_back(rand()/(float)RAND_MAX);
00287 muvarskewkurt<double> A;
00288 int dummy=42;
00289 double dummy2=1.0; // for calculate_moments result type
00290 A=calculate_moments<double,float>(&manipdata<float>::linear, dummy, L, dummy2);
00291 cout <<"The distribution has these statistical properties:\n";
00292 cout <<"(average mu, variance, skewness, kurtosis)\n" <<A<<endl;
00293 }
|
| Diploma Thesis Sourcecode
Documentation check out the text and the executable binaries |