mcpele  1.0.0
The Monte Carlo Python Energy Landscape Explorer
 All Classes Namespaces Functions Variables Typedefs
Public Member Functions
mcpele::RecordScalarTimeseries Class Reference

#include <record_scalar_timeseries.h>

Inheritance diagram for mcpele::RecordScalarTimeseries:
mcpele::Action mcpele::RecordDisplacementPerParticleTimeseries mcpele::RecordEnergyTimeseries mcpele::RecordLowestEValueTimeseries

List of all members.

Public Member Functions

 RecordScalarTimeseries (const size_t, const size_t)
virtual ~RecordScalarTimeseries ()
virtual void action (pele::Array< double > &coords, double energy, bool accepted, MC *mc)
virtual double get_recorded_scalar (pele::Array< double > &coords, const double energy, const bool accepted, MC *mc)=0
bool moving_average_is_stable (const size_t nr_steps_to_check=1000, const double rel_std_threshold=0.1)
std::pair< double, double > get_moving_average_mean (const size_t nr_steps_to_check)
std::pair< double, double > get_moving_average_variance (const size_t nr_steps_to_check)
pele::Array< double > get_time_series ()
void clear ()

Detailed Description

Record scalar time series, every record_every-th step.

Definition at line 11 of file record_scalar_timeseries.h.


Constructor & Destructor Documentation

mcpele::RecordScalarTimeseries::RecordScalarTimeseries ( const size_t  niter,
const size_t  record_every 
)

Definition at line 8 of file record_scalar_timeseries.cpp.

Definition at line 21 of file record_scalar_timeseries.h.


Member Function Documentation

void mcpele::RecordScalarTimeseries::action ( pele::Array< double > &  coords,
double  energy,
bool  accepted,
MC mc 
) [virtual]

Implements mcpele::Action.

Definition at line 17 of file record_scalar_timeseries.cpp.

Definition at line 32 of file record_scalar_timeseries.h.

std::pair< double, double > mcpele::RecordScalarTimeseries::get_moving_average_mean ( const size_t  nr_steps_to_check)

Definition at line 55 of file record_scalar_timeseries.cpp.

std::pair< double, double > mcpele::RecordScalarTimeseries::get_moving_average_variance ( const size_t  nr_steps_to_check)

Definition at line 69 of file record_scalar_timeseries.cpp.

virtual double mcpele::RecordScalarTimeseries::get_recorded_scalar ( pele::Array< double > &  coords,
const double  energy,
const bool  accepted,
MC mc 
) [pure virtual]

Definition at line 27 of file record_scalar_timeseries.h.

bool mcpele::RecordScalarTimeseries::moving_average_is_stable ( const size_t  nr_steps_to_check = 1000,
const double  rel_std_threshold = 0.1 
)

Apply a basic check on the behaviour of the moving average of the recorded time series to decide if it is sufficiently stable. Parameters: nr_steps_to_check is the number of steps, from the present into the past, that are considered for the moving average check. rel_std_threshold is the relative size of the fluctuations in the moving average that is considered stable. Decreasing that number should make the test more sensitive. NOTE: we do not test the variance because the variance has some functional dependence on the mean var = f(mu). In order to remove this one would require a "variance stabilising transformation" which would require the implementation of a different moments class where f(x) si stored giving an approximately constant variance as a function of the mean. See Ascombe transform for instance.

Definition at line 40 of file record_scalar_timeseries.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs