Files Classes Functions Hierarchy
#include <particlesampler.h>
Public Member Functions | |
| particlesampler (uintc &state_, uintc samplecountermax_, uintc filecountermax_, histogram< double > const hist_, string const filename_, particle const *&pi_, uintc &numParticles_) | |
| void | set (histogram< double > const hist_) |
| void | reset () |
| void | operator++ () |
Public Attributes | |
| uint | samplecountermax |
| The number of times before a sample. | |
| uint | filecountermax |
| The number of times before writing a file. | |
Definition at line 32 of file particlesampler.h.
| particlesampler::particlesampler | ( | uintc & | state_, | |
| uintc | samplecountermax_, | |||
| uintc | filecountermax_, | |||
| histogram< double > const | hist_, | |||
| string const | filename_, | |||
| particle const *& | pi_, | |||
| uintc & | numParticles_ | |||
| ) |
Definition at line 5 of file particlesampler.cpp.
00013 : 00014 state(state_), 00015 samplecounter(0), 00016 filecounter(0), 00017 hist(hist_), 00018 filename(filename_), 00019 pi(pi_), 00020 numParticles(numParticles_), 00021 samplecountermax(samplecountermax_), 00022 filecountermax(filecountermax_) 00023 { 00024 assert(state<4); 00025 }
| void particlesampler::operator++ | ( | ) |
Definition at line 76 of file particlesampler.cpp.
References samplecountermax.
00077 { 00078 ++samplecounter; 00079 if ((samplecounter%samplecountermax)==0) 00080 sample(); 00081 }
| void particlesampler::reset | ( | ) |
Definition at line 67 of file particlesampler.cpp.
References samplecountermax.
00068 { 00069 assert(!filename.empty()); 00070 00071 samplecounter=0; 00072 00073 assert(samplecountermax!=0); 00074 }
| void particlesampler::set | ( | histogram< double > const | hist_ | ) | [inline] |
The number of times before writing a file.
ie samplecountermax*filecountermax because its in an inner loop.
Definition at line 54 of file particlesampler.h.
The number of times before a sample.
Definition at line 49 of file particlesampler.h.
Referenced by operator++(), and reset().
1.5.8