QMCPACK
FakeEstimator Class Reference
+ Inheritance diagram for FakeEstimator:
+ Collaboration diagram for FakeEstimator:

Public Member Functions

std::string getName () const override
 
void accumulate (const MCWalkerConfiguration &W, WalkerIterator first, WalkerIterator last, RealType wgt) override
 a virtual function to accumulate observables or collectables More...
 
void accumulate (const RefVector< MCPWalker > &walkers) override
 a virtual function to accumulate observables or collectables More...
 
void add2Record (RecordNamedProperty< RealType > &record) override
 add the content of the scalar estimator to the record More...
 
void registerObservables (std::vector< ObservableHelper > &h5dec, hdf_archive &file) override
 add descriptors of observables to utilize hdf5 More...
 
FakeEstimatorclone () override
 clone the object More...
 
const std::string & getSubTypeStr () const override
 String representation of the derived type of the ScalarEstimator. More...
 
- Public Member Functions inherited from ScalarEstimatorBase
 ScalarEstimatorBase ()
 
virtual ~ScalarEstimatorBase ()
 
virtual bool isMainEstimator () const
 Is this estimator a main estimator i.e. the estimator required for a particular driver. More...
 
RealType average (int i=0) const
 return average of the More...
 
RealType variance (int i=0) const
 return a variance More...
 
std::pair< RealType, RealTypeoperator[] (int i) const
 retrun mean and variance More...
 
virtual int size () const
 return the size of scalars it manages More...
 
void clear ()
 clear the scalars to collect More...
 
template<typename IT >
void takeBlockAverage (IT first)
 take block average and write to a common container More...
 
template<typename IT >
void takeBlockAverage (IT first, IT first_sq)
 take block average and write to common containers for values and squared values More...
 
template<typename IT >
void addAccumulated (IT first)
 add the block accumulated scalars More...
 

Public Attributes

std::string type_ {"fake"}
 
- Public Attributes inherited from ScalarEstimatorBase
int FirstIndex
 first index within an record of the first element handled by an object More...
 
int LastIndex
 last index within an record of the first element handled by an object More...
 
std::vector< accumulator_typescalars
 scalars to be measured More...
 
std::vector< accumulator_typescalars_saved
 scalars saved More...
 

Additional Inherited Members

- Public Types inherited from ScalarEstimatorBase
using RealType = QMCTraits::FullPrecRealType
 
using accumulator_type = accumulator_set< RealType >
 
using Walker_t = MCWalkerConfiguration::Walker_t
 
using MCPWalker = Walker< QMCTraits, PtclOnLatticeTraits >
 
using WalkerIterator = MCWalkerConfiguration::const_iterator
 
using RecordListType = RecordNamedProperty< RealType >
 

Detailed Description

Definition at line 19 of file FakeEstimator.h.

Member Function Documentation

◆ accumulate() [1/2]

void accumulate ( const MCWalkerConfiguration W,
WalkerIterator  first,
WalkerIterator  last,
RealType  wgt 
)
inlineoverridevirtual

a virtual function to accumulate observables or collectables

Parameters
Wconst MCWalkerConfiguration
firstconst_iterator for the first walker
lastconst_iterator for the last walker
wgtweight

Pass W along with the iterators so that the properties of W can be utilized.

Implements ScalarEstimatorBase.

Definition at line 24 of file FakeEstimator.h.

24 {}

◆ accumulate() [2/2]

void accumulate ( const RefVector< MCPWalker > &  )
inlineoverridevirtual

a virtual function to accumulate observables or collectables

Parameters
global_walkers_walkers per ranks or walkers total?
RefVectorof MCPWalkers
wgtweight or maybe norm

Implements ScalarEstimatorBase.

Definition at line 26 of file FakeEstimator.h.

26 {}

◆ add2Record()

void add2Record ( RecordNamedProperty< RealType > &  record)
inlineoverridevirtual

add the content of the scalar estimator to the record

Parameters
recordscalar data list

Each ScalarEstimatorBase object adds 1 to many accumulator_type

Implements ScalarEstimatorBase.

Definition at line 28 of file FakeEstimator.h.

28 {}

◆ clone()

FakeEstimator* clone ( )
inlineoverridevirtual

clone the object

Implements ScalarEstimatorBase.

Definition at line 32 of file FakeEstimator.h.

32 { return new FakeEstimator; }

◆ getName()

std::string getName ( ) const
inlineoverridevirtual

Implements ScalarEstimatorBase.

Definition at line 22 of file FakeEstimator.h.

22 { return "FakeEstimator"; }

◆ getSubTypeStr()

const std::string& getSubTypeStr ( ) const
inlineoverridevirtual

String representation of the derived type of the ScalarEstimator.

Implements ScalarEstimatorBase.

Definition at line 35 of file FakeEstimator.h.

References FakeEstimator::type_.

35 { return type_; }

◆ registerObservables()

void registerObservables ( std::vector< ObservableHelper > &  h5dec,
hdf_archive file 
)
inlineoverridevirtual

add descriptors of observables to utilize hdf5

Parameters
h5descdescriptor of a data stored in a h5 group
filefile to which each statistical data will be stored

Implements ScalarEstimatorBase.

Definition at line 30 of file FakeEstimator.h.

30 {}

Member Data Documentation

◆ type_

std::string type_ {"fake"}

Definition at line 34 of file FakeEstimator.h.

Referenced by FakeEstimator::getSubTypeStr().


The documentation for this class was generated from the following file: