ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Class template SimpleObservable

alps::SimpleObservable

Synopsis

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

template<typename T, typename BINNING> 
class SimpleObservable : public alps::AbstractSimpleObservable< T >,
                         public alps::RecordableObservable< T >
{
public:
  // types
  typedef AbstractSimpleObservable< T >::value_type  value_type;        // the data type of the observable 
  typedef AbstractSimpleObservable< T >::time_type   time_type;         // the data type for autocorrelation times 
  typedef AbstractSimpleObservable< T >::count_type  count_type;        // the count data type: an integral type 
  typedef AbstractSimpleObservable< T >::result_type result_type;       // the data type of averages and errors 
  typedef AbstractSimpleObservable< T >::slice_index slice_index;     
  typedef AbstractSimpleObservable< T >::label_type  label_type;      
  typedef change_value_type< T, int >::type          convergence_type;
  typedef BINNING                                    binning_type;    

  // construct/copy/destruct
  SimpleObservable(const std::string & = std::string(), 
                   const label_type & = label_type());
  SimpleObservable(const std::string &, const binning_type &, 
                   const label_type & = label_type());
  SimpleObservable(const std::string &, uint32_t, 
                   const label_type & = label_type());
  SimpleObservable(const std::string &, uint32_t, uint32_t, 
                   const label_type & = label_type());

  // public member functions
   BOOST_STATIC_CONSTANT(int, 
                         version = (type_tag< T >::value+(binning_type::magic_id<< 16)));
  uint32_t version_id() const;
  Observable * clone() const;
  void output(std::ostream &) const;
  ALPS_DUMMY_VOID reset(bool);
  result_type mean() const;
  bool has_variance() const;
  result_type variance() const;
  result_type error() const;
  result_type error(unsigned) const;
  convergence_type converged_errors() const;
  count_type count() const;
  bool has_tau() const;
  time_type tau() const;
  std::string representation() const;
  void operator<<(const T &);
  count_type bin_size() const;
  void set_bin_size(count_type);
  count_type bin_number() const;
  count_type bin_number2() const;
  count_type max_bin_number() const;
  void set_bin_number(count_type);
  const value_type & bin_value(count_type) const;
  const value_type & bin_value2(count_type) const;
  const std::vector< value_type > & bins() const;
  void save(ODump &) const;
  void load(IDump &);
  void extract_timeseries(ODump &) const;
  void save(hdf5::archive &) const;
  void load(hdf5::archive &);
  std::string evaluation_method(Target) const;

  // private member functions
  Observable * convert_mergeable() const;
  void write_more_xml(oxstream &, slice_index) const;
};

Description

SimpleObservable public construct/copy/destruct

  1. SimpleObservable(const std::string & name = std::string(), 
                     const label_type & l = label_type());
    the constructor needs a name and optionally specifications for the binning strategy
  2. SimpleObservable(const std::string & name, const binning_type & b, 
                     const label_type & l = label_type());
  3. SimpleObservable(const std::string & name, uint32_t s, 
                     const label_type & l = label_type());
  4. SimpleObservable(const std::string & name, uint32_t s, uint32_t a, 
                     const label_type & l = label_type());

SimpleObservable public member functions

  1.  BOOST_STATIC_CONSTANT(int, 
                           version = (type_tag< T >::value+(binning_type::magic_id<< 16)));
  2. uint32_t version_id() const;
    return a version ID uniquely identifying the class
  3. Observable * clone() const;

    clones the observable

  4. void output(std::ostream &) const;

    output the result

  5. ALPS_DUMMY_VOID reset(bool equilibrated);

    reset the observable

  6. result_type mean() const;
    the mean value
  7. bool has_variance() const;
    is variance available ?
  8. result_type variance() const;
    the variance
  9. result_type error() const;
    the error
  10. result_type error(unsigned bin_used) const;
  11. convergence_type converged_errors() const;
  12. count_type count() const;
    the number of measurements
  13. bool has_tau() const;
    is autocorrelation information available ?
  14. time_type tau() const;
    the autocorrelation time, throws an exception if not available
  15. std::string representation() const;
  16. void operator<<(const T & x);
    add another measurement to the observable
  17. count_type bin_size() const;
    the number of measurements per bin
  18. void set_bin_size(count_type s);
    resize bins to contain at least the given number of entries
  19. count_type bin_number() const;
    the number of bins
  20. count_type bin_number2() const;
    the number of bins with squared values
  21. count_type max_bin_number() const;
    get the maximum number of bins
  22. void set_bin_number(count_type n);

    set the maximum number of bins This will be the maximum number from now on if additional measurements are performed.

  23. const value_type & bin_value(count_type) const;
    the value of a bin
  24. const value_type & bin_value2(count_type) const;
    the squared value of a bin
  25. const std::vector< value_type > & bins() const;
  26. void save(ODump & dump) const;
  27. void load(IDump & dump);
  28. void extract_timeseries(ODump & dump) const;
  29. void save(hdf5::archive &) const;
  30. void load(hdf5::archive &);
  31. std::string evaluation_method(Target t) const;

SimpleObservable private member functions

  1. Observable * convert_mergeable() const;
    create a copy of the observable that can be merged
  2. void write_more_xml(oxstream & oxs, slice_index it) const;
Copyright © 1994, 2002-2004, 2012 Matthias Troyer, Synge Todo, Maximilian Poprawe

PrevUpHomeNext