proj home

Files   Classes   Functions   Hierarchy  

particlesampler Class Reference

#include <particlesampler.h>

Collaboration diagram for particlesampler:

List of all members.

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.


Detailed Description

Definition at line 32 of file particlesampler.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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]

Definition at line 67 of file particlesampler.h.

Referenced by integration< D, F >::reset().

00068     { hist=hist_; }


Member Data Documentation

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().


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:50:08 2011 for Chelton Evans Source by  doxygen 1.5.8