mcpele
1.0.0
The Monte Carlo Python Energy Landscape Explorer
|
00001 #ifndef _MCPELE__RECORD_ENERGY_HISTOGRAM_H__ 00002 #define _MCPELE__RECORD_ENERGY_HISTOGRAM_H__ 00003 00004 #include "mc.h" 00005 #include "histogram.h" 00006 00007 namespace mcpele { 00008 00009 /* 00010 * Record energy histogram 00011 */ 00012 00013 class RecordEnergyHistogram : public Action { 00014 protected: 00015 mcpele::Histogram m_hist; 00016 private: 00017 const size_t m_eqsteps; 00018 size_t m_count; 00019 public: 00020 RecordEnergyHistogram(const double min, const double max, const double bin, const size_t eqsteps); 00021 virtual ~RecordEnergyHistogram() {} ; 00022 virtual void action(pele::Array<double> &coords, double energy, bool accepted, MC* mc); 00023 pele::Array<double> get_histogram() const; 00024 void print_terminal() const { m_hist.print_terminal(); } 00025 double get_max() const { return m_hist.max(); } 00026 double get_min() const { return m_hist.min(); } 00027 size_t get_eqsteps() const { return m_eqsteps; } 00028 double get_mean() const { return m_hist.get_mean(); } 00029 double get_variance() const { return m_hist.get_variance(); } 00030 int get_entries() const { return m_hist.entries(); } 00031 }; 00032 00033 } // namespace mcpele 00034 00035 #endif // #ifndef _MCPELE__RECORD_ENERGY_HISTOGRAM_H__