ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Class template AbstractSimpleObservable

alps::AbstractSimpleObservable

Synopsis

// In header: <alps/alea/abstractsimpleobservable.h>

template<typename T> 
class AbstractSimpleObservable : public alps::Observable {
public:
  // types
  typedef T                                                                   value_type;        // the data type of the observable 
  typedef average_type< T >::type                                             result_type;       // the data type of averages and errors 
  typedef alps::slice_index< result_type >::type                              slice_index;     
  typedef uint64_t                                                            count_type;        // the count data type: an integral type 
  typedef change_value_type< T, double >::type                                time_type;         // the data type for autocorrelation times 
  typedef change_value_type< T, int >::type                                   convergence_type;
  typedef change_value_type_replace_valarray< value_type, std::string >::type label_type;      

  // construct/copy/destruct
  AbstractSimpleObservable(const std::string & = "", 
                           const label_type & = label_type());
  ~AbstractSimpleObservable();

  // public member functions
  count_type count() const;
  result_type mean() const;
  result_type variance() const;
  result_type error() const;
  convergence_type converged_errors() const;
  bool has_minmax() const;
  value_type min BOOST_PREVENT_MACRO_SUBSTITUTION() const;
  value_type max BOOST_PREVENT_MACRO_SUBSTITUTION() const;
  bool has_tau() const;
  time_type tau() const;
  bool has_variance() const;
  count_type bin_number() const;
  count_type max_bin_number() const;
  count_type bin_size() const;
  const value_type & bin_value(count_type) const;
  count_type bin_number2() const;
  const value_type & bin_value2(count_type) const;
  template<typename S> 
    SimpleObservableEvaluator< typename element_type< T >::type > 
    slice(S, const std::string & = "") const;
  template<typename S> 
    SimpleObservableEvaluator< typename element_type< T >::type > 
    operator[](S) const;
  void extract_timeseries(ODump &) const;
  void write_xml(oxstream &, 
                 const boost::filesystem::path & = boost::filesystem::path()) const;
  void write_xml_scalar(oxstream &, const boost::filesystem::path &) const;
  void write_xml_vector(oxstream &, const boost::filesystem::path &) const;
  std::string evaluation_method(Target) const;
  operator SimpleObservableEvaluator< value_type >() const;
  void set_label(const label_type &);
  const label_type & label() const;
  void save(ODump &) const;
  void load(IDump &);
  void save(hdf5::archive &) const;
  void load(hdf5::archive &);

  // private member functions
  SimpleObservableEvaluator< value_type > make_evaluator() const;
  void write_more_xml(oxstream &, slice_index = slice_index()) const;
};

Description

AbstractSimpleObservable public construct/copy/destruct

  1. AbstractSimpleObservable(const std::string & name = "", 
                             const label_type & l = label_type());
  2. ~AbstractSimpleObservable();

AbstractSimpleObservable public member functions

  1. count_type count() const;
    the number of measurements
  2. result_type mean() const;
    the mean value
  3. result_type variance() const;
    the variance
  4. result_type error() const;
    the error
  5. convergence_type converged_errors() const;
  6. bool has_minmax() const;
    is information about the minimum and maximum value available?
  7. value_type min BOOST_PREVENT_MACRO_SUBSTITUTION() const;
    the minimum value
  8. value_type max BOOST_PREVENT_MACRO_SUBSTITUTION() const;
    the maximum value
  9. bool has_tau() const;
    is autocorrelation information available ?
  10. time_type tau() const;
    the autocorrelation time, throws an exception if not available
  11. bool has_variance() const;
    is variance available ?
  12. count_type bin_number() const;
    the number of bins
  13. count_type max_bin_number() const;
    the number of bins
  14. count_type bin_size() const;
    the number of measurements per bin
  15. const value_type & bin_value(count_type) const;
    the value of a bin
  16. count_type bin_number2() const;
    the number of bins with squared values
  17. const value_type & bin_value2(count_type) const;
    the squared value of a bin
  18. template<typename S> 
      SimpleObservableEvaluator< typename element_type< T >::type > 
      slice(S s, const std::string & newname = "") const;

    slice the data type using a single argument. This can easily be extended when needed to more data types.

    Parameters:

    newname

    optionally a new name for the slice. Default is the same name as the original observable

    s

    the slice

  19. template<typename S> 
      SimpleObservableEvaluator< typename element_type< T >::type > 
      operator[](S s) const;
  20. void extract_timeseries(ODump & dump) const;
  21. void write_xml(oxstream & oxs, 
                   const boost::filesystem::path & fn_hdf5 = boost::filesystem::path()) const;

    output the result

  22. void write_xml_scalar(oxstream &, const boost::filesystem::path &) const;
  23. void write_xml_vector(oxstream &, const boost::filesystem::path &) const;
  24. std::string evaluation_method(Target) const;
  25. operator SimpleObservableEvaluator< value_type >() const;
  26. void set_label(const label_type & l);
  27. const label_type & label() const;
  28. void save(ODump & dump) const;
  29. void load(IDump & dump);
  30. void save(hdf5::archive &) const;
  31. void load(hdf5::archive &);

AbstractSimpleObservable private member functions

  1. SimpleObservableEvaluator< value_type > make_evaluator() const;
  2. void write_more_xml(oxstream &, slice_index = slice_index()) const;
Copyright © 1994, 2002-2004, 2012 Matthias Troyer, Synge Todo, Maximilian Poprawe

PrevUpHomeNext