ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Class template AbstractSignedObservable

alps::AbstractSignedObservable

Synopsis

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

template<typename OBS, typename SIGN = double> 
class AbstractSignedObservable :
  public alps::AbstractSimpleObservable< OBS::value_type >
{
public:
  // types
  typedef OBS                                           observable_type; 
  typedef SIGN                                          sign_type;       
  typedef observable_type::value_type                   value_type;      
  typedef average_type< value_type >::type              result_type;     
  typedef AbstractSimpleObservable< value_type >        base_type;       
  typedef alps::slice_index< result_type >::type        slice_index;     
  typedef uint64_t                                      count_type;      
  typedef change_value_type< value_type, double >::type time_type;       
  typedef change_value_type< value_type, int >::type    convergence_type;
  typedef super_type::label_type                        label_type;      

  // construct/copy/destruct
  AbstractSignedObservable(const OBS &, const std::string & = "Sign");
  AbstractSignedObservable(const std::string & = "", 
                           const std::string & = "Sign", 
                           const label_type & = label_type());
  AbstractSignedObservable(const std::string &, const char *, 
                           const label_type & = label_type());
  template<typename OBS2> 
    AbstractSignedObservable(const AbstractSignedObservable< OBS2, SIGN > &);
  template<typename ARG> 
    AbstractSignedObservable(const std::string &, const ARG &, 
                             const label_type & = label_type());
  template<typename ARG> 
    AbstractSignedObservable(const std::string &, std::string &, const ARG &, 
                             const label_type & = label_type());
  ~AbstractSignedObservable();

  // public member functions
   BOOST_STATIC_CONSTANT(int, version = observable_type::version+(1<< 24));
  virtual uint32_t version_id() const;
  virtual ALPS_DUMMY_VOID reset(bool);
  virtual ALPS_DUMMY_VOID output(std::ostream &) const;
  void output_scalar(std::ostream &) const;
  void output_vector(std::ostream &) const;
  virtual void write_xml(oxstream &, const boost::filesystem::path &) const;
  virtual count_type count() const;
  virtual result_type mean() const;
  virtual result_type error() const;
  virtual convergence_type converged_errors() const;
  virtual SimpleObservableEvaluator< value_type > make_evaluator() const;
  template<typename S> 
    AbstractSignedObservable< SimpleObservableEvaluator< typename element_type< value_type >::type >, SIGN > 
    slice(S, const std::string & = "") const;
  template<typename S> 
    AbstractSignedObservable< SimpleObservableEvaluator< typename element_type< value_type >::type >, SIGN > 
    operator[](S) const;
  virtual void save(ODump &) const;
  virtual void load(IDump &);
  virtual void save(hdf5::archive &) const;
  virtual void load(hdf5::archive &);
  virtual Observable * clone() const;
  virtual bool is_signed() const;
  virtual void set_sign_name(const std::string &);
  virtual void set_sign(const Observable &);
  virtual void clear_sign();
  virtual const Observable & sign() const;
  virtual const std::string sign_name() const;
  virtual const Observable & signed_observable() const;
  virtual uint32_t number_of_runs() const;
  virtual Observable * get_run(uint32_t) const;

  // protected member functions
  virtual Observable * convert_mergeable() const;
  virtual void write_more_xml(oxstream &, slice_index) const;
  virtual void merge(const Observable &);
  virtual bool can_merge() const;
  virtual bool can_merge(const Observable &) const;
};

Description

AbstractSignedObservable public construct/copy/destruct

  1. AbstractSignedObservable(const OBS & obs, const std::string & s = "Sign");
  2. AbstractSignedObservable(const std::string & name = "", 
                             const std::string & s = "Sign", 
                             const label_type & l = label_type());
  3. AbstractSignedObservable(const std::string & name, const char * s, 
                             const label_type & l = label_type());
  4. template<typename OBS2> 
      AbstractSignedObservable(const AbstractSignedObservable< OBS2, SIGN > & o);
  5. template<typename ARG> 
      AbstractSignedObservable(const std::string & name, const ARG & arg, 
                               const label_type & l = label_type());
  6. template<typename ARG> 
      AbstractSignedObservable(const std::string & name, std::string & s, 
                               const ARG & arg, 
                               const label_type & l = label_type());
  7. ~AbstractSignedObservable();

AbstractSignedObservable public member functions

  1.  BOOST_STATIC_CONSTANT(int, version = observable_type::version+(1<< 24));
  2. virtual uint32_t version_id() const;
    return a version ID uniquely identifying the class
  3. virtual ALPS_DUMMY_VOID reset(bool equilibrated);

    reset the observable

  4. virtual ALPS_DUMMY_VOID output(std::ostream &) const;

    output the result

  5. void output_scalar(std::ostream &) const;
  6. void output_vector(std::ostream &) const;
  7. virtual void 
    write_xml(oxstream & oxs, const boost::filesystem::path & fn_hdf5) const;

    output the result

  8. virtual count_type count() const;
    the number of measurements
  9. virtual result_type mean() const;
    the mean value
  10. virtual result_type error() const;
    the error
  11. virtual convergence_type converged_errors() const;
  12. virtual SimpleObservableEvaluator< value_type > make_evaluator() const;
  13. template<typename S> 
      AbstractSignedObservable< SimpleObservableEvaluator< typename element_type< value_type >::type >, SIGN > 
      slice(S s, const std::string & newname = "") const;
  14. template<typename S> 
      AbstractSignedObservable< SimpleObservableEvaluator< typename element_type< value_type >::type >, SIGN > 
      operator[](S s) const;
  15. virtual void save(ODump & dump) const;
  16. virtual void load(IDump & dump);
  17. virtual void save(hdf5::archive &) const;
  18. virtual void load(hdf5::archive &);
  19. virtual Observable * clone() const;

    clones the observable

  20. virtual bool is_signed() const;
    is the observable signed?
  21. virtual void set_sign_name(const std::string & signname);
    set the name of the observable containing the sign for this observable
  22. virtual void set_sign(const Observable & sign);
    set the observable containing the sign
  23. virtual void clear_sign();
    clear any previosuly set sign observable
  24. virtual const Observable & sign() const;
    get a reference to the sign observable
  25. virtual const std::string sign_name() const;
    get the name of the observable containing the sign
  26. virtual const Observable & signed_observable() const;
  27. virtual uint32_t number_of_runs() const;
    get the number of runs which performed measurements for this observable
  28. virtual Observable * get_run(uint32_t) const;
    extract an observable from a specific run only

AbstractSignedObservable protected member functions

  1. virtual Observable * convert_mergeable() const;
    create a copy of the observable that can be merged
  2. virtual void write_more_xml(oxstream & oxs, slice_index it) const;
  3. virtual void merge(const Observable & o);
  4. virtual bool can_merge() const;
    can this observable be merged with one of the same type
  5. virtual bool can_merge(const Observable &) const;
    can this observable be merged with one of the given type
Copyright © 1994, 2002-2004, 2012 Matthias Troyer, Synge Todo, Maximilian Poprawe

PrevUpHomeNext