ALPS Project: alea library

Header file alea/simpleobservable.h

This header contains the classes for standard Monte Carlo measurements.

Synopsis

namespace alps {

template <class T=double, class SIGN=double>
class RecordableObservable
{
public:
typedef T value_type;
typedef SIGN sign_type;

RecordableObservable();

virtual void operator<<(const value_type& x) =0;
virtual void add(const value_type& x);
virtual void add(const value_type& x, sign_type s);

virtual bool is_thermalized() const =0;
};
}
}

The RecordableObservable interface class

is an abstract base class for observables classes used to record new measurements. Such observables are usually multiply inhertited from Observable and RecordableObservable.
typedef T value_type;
is the data type of the observable.
typedef SIGN sign_type;
is the data type used to store signs in case of a simulation with a sign problem. It defaults to double.
RecordableObservable();
The default constructor.
virtual void operator<<(const value_type& x) =0;
is a function that must be implemented by the derived class. It records a measurement/
virtual void add(const value_type& x);
defaults to operator<<, recording a measurement.
virtual void add(const value_type& x, sign_type s);
reords a measurement for a simulation with a sign problem. This needs to be overridden by an observable class supporting the sign problem. The default implementation calls add(x) if the sign s is one, and throws a std::logic_error otherwise.
virtual bool is_thermalized() const =0;
returns true if the observable has recorded measurements after the thermalization (equilibration) steps.

copyright (c) 1994-2010 by Matthias Troyer

Distributed under the Boost Software License, Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt)