![]() |
Home | Libraries | License | Support | People | ALPS Web Site |
alps::Observable — the base class for all observables
// 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(); };
Observable
public
construct/copy/destructObservable(const std::string & n);
standard constructors: just assign the name
Observable(const Observable & o);
~Observable();
dtor
Observable
public member functionsObservable * clone() const;
clones the observable
const std::string & name() const;
returns the name
void rename(const std::string &);rename the observable
ALPS_DUMMY_VOID reset(bool equilibrated = false);
reset the observable
ALPS_DUMMY_VOID output(std::ostream &) const;
output the result
void write_xml(oxstream & oxs, const boost::filesystem::path & fn_hdf5 = boost::filesystem::path()) const;
output the result
uint32_t version_id() const;return a version ID uniquely identifying the class
void save(ODump & dump) const;
void load(IDump & dump);
bool is_signed() const;is the observable signed?
void set_sign_name(const std::string & signname);set the name of the observable containing the sign for this observable
void set_sign(const Observable & sign);set the observable containing the sign
void clear_sign();clear any previosuly set sign observable
const Observable & sign() const;get a reference to the sign observable
const Observable & signed_observable() const;
const std::string sign_name() const;get the name of the observable containing the sign
uint32_t number_of_runs() const;get the number of runs which performed measurements for this observable
Observable * get_run(uint32_t) const;extract an observable from a specific run only
void merge(const Observable &);
bool can_merge() const;can this observable be merged with one of the same type
bool can_merge(const Observable &) const;can this observable be merged with one of the given type
Observable * convert_mergeable() const;create a copy of the observable that can be merged
template<typename T> void operator<<(const T & x);merge this observable with another or add measurement
template<typename T> void add(const T & x);
template<typename T, typename S> void add(const T & x, S s);
Copyright © 1994, 2002-2005 Matthias Troyer, Synge Todo |