ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Class template HistogramObservable

alps::HistogramObservable

Synopsis

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

template<typename T> 
class HistogramObservable :
  public alps::Observable, public alps::RecordableObservable< T >
{
public:
  // types
  typedef integer_type                                        value_type;            
  typedef T                                                   range_type;            
  typedef uint64_t                                            count_type;            
  typedef std::vector< integer_type >::const_iterator         const_iterator;        
  typedef std::vector< integer_type >::const_reverse_iterator const_reverse_iterator;
  typedef std::vector< integer_type >::size_type              size_type;             

  // construct/copy/destruct
  HistogramObservable(const std::string & = "");
  HistogramObservable(const std::string &, T, T, T = 1);

  // public member functions
   BOOST_STATIC_CONSTANT(uint32_t, 
                         version = alps::type_tag< T >::type::value+(alps::type_tag< integer_type >::value<< 8)+(2<< 16));
  void set_range(T, T, T = 1);
  Observable * clone() const;
  ALPS_DUMMY_VOID reset(bool = false);
  ALPS_DUMMY_VOID output(std::ostream &) const;
  uint32_t version_id() const;
  void save(ODump &) const;
  void load(IDump &);
  void add(const T &);
  void operator<<(const T &);
  const_iterator begin() const;
  const_iterator rbegin() const;
  const_iterator end() const;
  const_iterator rend() const;
  size_type size() const;
  value_type operator[](size_type) const;
  value_type at(size_type) const;
  bool can_merge() const;
  bool can_merge(const alps::Observable &) const;
  value_type & operator[](size_type);
  void write_xml(oxstream &, 
                 const boost::filesystem::path & = boost::filesystem::path()) const;
  count_type count() const;
  range_type stepsize() const;
  range_type max BOOST_PREVENT_MACRO_SUBSTITUTION() const;
  range_type min BOOST_PREVENT_MACRO_SUBSTITUTION() const;
  operator HistogramObservableEvaluator< T >() const;
  void save(hdf5::archive &) const;
  void load(hdf5::archive &);

  // private member functions
  Observable * convert_mergeable() const;
  HistogramObservableEvaluator< T > make_evaluator() const;
};

Description

HistogramObservable public construct/copy/destruct

  1. HistogramObservable(const std::string & n = "");
  2. HistogramObservable(const std::string & n, T min, T max, T stepsize = 1);

HistogramObservable public member functions

  1.  BOOST_STATIC_CONSTANT(uint32_t, 
                           version = alps::type_tag< T >::type::value+(alps::type_tag< integer_type >::value<< 8)+(2<< 16));
  2. void set_range(T min, T max, T stepsize = 1);
  3. Observable * clone() const;

    clones the observable

  4. ALPS_DUMMY_VOID reset(bool equilibrated = false);

    reset the observable

  5. ALPS_DUMMY_VOID output(std::ostream &) const;

    output the result

  6. uint32_t version_id() const;
    return a version ID uniquely identifying the class
  7. void save(ODump & dump) const;
  8. void load(IDump & dump);
  9. void add(const T & x);

    add a simple T-value to the Observable

  10. void operator<<(const T & x);

    add a simple T-value to the Observable

  11. const_iterator begin() const;
  12. const_iterator rbegin() const;
  13. const_iterator end() const;
  14. const_iterator rend() const;
  15. size_type size() const;
  16. value_type operator[](size_type i) const;
  17. value_type at(size_type i) const;
  18. bool can_merge() const;
    can this observable be merged with one of the same type
  19. bool can_merge(const alps::Observable &) const;
    can this observable be merged with one of the given type
  20. value_type & operator[](size_type i);
  21. void write_xml(oxstream & oxs, 
                   const boost::filesystem::path & fn_hdf5 = boost::filesystem::path()) const;

    output the result

  22. count_type count() const;
  23. range_type stepsize() const;
  24. range_type max BOOST_PREVENT_MACRO_SUBSTITUTION() const;
  25. range_type min BOOST_PREVENT_MACRO_SUBSTITUTION() const;
  26. operator HistogramObservableEvaluator< T >() const;
  27. void save(hdf5::archive &) const;
  28. void load(hdf5::archive &);

HistogramObservable private member functions

  1. Observable * convert_mergeable() const;
    create a copy of the observable that can be merged
  2. HistogramObservableEvaluator< T > make_evaluator() const;
Copyright © 1994, 2002-2004, 2012 Matthias Troyer, Synge Todo, Maximilian Poprawe

PrevUpHomeNext