ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Class Observable

alps::Observable — the base class for all observables

Synopsis

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


class Observable {
public:
  // types
  typedef uint32_t version_type;

  // construct/copy/destruct
  Observable(const std::string &);
  Observable(const Observable &);
  ~Observable();

  // public member functions
  Observable * clone() const;
  const std::string & name() const;
  void rename(const std::string &);
  ALPS_DUMMY_VOID reset(bool = false);
  ALPS_DUMMY_VOID output(std::ostream &) const;
  void write_xml(oxstream &, 
                 const boost::filesystem::path & = boost::filesystem::path()) const;
  uint32_t version_id() const;
  void save(ODump &) const;
  void load(IDump &);
  bool is_signed() const;
  void set_sign_name(const std::string &);
  void set_sign(const Observable &);
  void clear_sign();
  const Observable & sign() const;
  const Observable & signed_observable() const;
  const std::string sign_name() const;
  uint32_t number_of_runs() const;
  Observable * get_run(uint32_t) const;
  void merge(const Observable &);
  bool can_merge() const;
  bool can_merge(const Observable &) const;
  Observable * convert_mergeable() const;
  template<typename T> void operator<<(const T &);
  template<typename T> void add(const T &);
  template<typename T, typename S> void add(const T &, S);

  // private member functions
  void added_to_set();
};

Description

Observable public construct/copy/destruct

  1. Observable(const std::string & n);

    standard constructors: just assign the name

  2. Observable(const Observable & o);
  3. ~Observable();

    dtor

Observable public member functions

  1. Observable * clone() const;

    clones the observable

  2. const std::string & name() const;

    returns the name

  3. void rename(const std::string &);
    rename 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. void write_xml(oxstream & oxs, 
                   const boost::filesystem::path & fn_hdf5 = boost::filesystem::path()) const;

    output the result

  7. uint32_t version_id() const;
    return a version ID uniquely identifying the class
  8. void save(ODump & dump) const;
  9. void load(IDump & dump);
  10. bool is_signed() const;
    is the observable signed?
  11. void set_sign_name(const std::string & signname);
    set the name of the observable containing the sign for this observable
  12. void set_sign(const Observable & sign);
    set the observable containing the sign
  13. void clear_sign();
    clear any previosuly set sign observable
  14. const Observable & sign() const;
    get a reference to the sign observable
  15. const Observable & signed_observable() const;
  16. const std::string sign_name() const;
    get the name of the observable containing the sign
  17. uint32_t number_of_runs() const;
    get the number of runs which performed measurements for this observable
  18. Observable * get_run(uint32_t) const;
    extract an observable from a specific run only
  19. void merge(const Observable &);
  20. bool can_merge() const;
    can this observable be merged with one of the same type
  21. bool can_merge(const Observable &) const;
    can this observable be merged with one of the given type
  22. Observable * convert_mergeable() const;
    create a copy of the observable that can be merged
  23. template<typename T> void operator<<(const T & x);
    merge this observable with another or add measurement
  24. template<typename T> void add(const T & x);
  25. template<typename T, typename S> void add(const T & x, S s);

Observable private member functions

  1. void added_to_set();
Copyright © 1994, 2002-2005 Matthias Troyer, Synge Todo

PrevUpHomeNext