![]() |
QMCPACK
|
generic accumulator of a scalar type More...
Public Types | |
enum | { VALUE = 0, VALUESQ = 1, WEIGHT = 2, CAPACITY = 4 } |
using | value_type = T |
using | return_type = T |
Public Member Functions | |
accumulator_set () | |
void | operator() (value_type x) |
add a sample More... | |
void | operator() (value_type x, value_type w) |
add a sample and More... | |
void | reset (value_type v, value_type vv, value_type w) |
reset properties More... | |
void | reset (value_type v, value_type w) |
reset properties More... | |
void | add (value_type x) |
add a value but set the weight 1 More... | |
bool | good () const |
return true if Weight!= 0 More... | |
bool | bad () const |
return true if Weight== 0 More... | |
return_type | result () const |
return the sum More... | |
return_type | result2 () const |
return the sum of value squared More... | |
return_type | count () const |
return the count More... | |
std::pair< return_type, return_type > | mean_and_variance () const |
return_type | mean () const |
return the mean More... | |
return_type | mean2 () const |
return the mean of squared values More... | |
return_type | variance () const |
void | clear () |
Public Attributes | |
T | properties [CAPACITY] |
generic accumulator of a scalar type
To simplify i/o, the values are storged in contents
Definition at line 32 of file accumulators.h.
using return_type = T |
Definition at line 35 of file accumulators.h.
using value_type = T |
Definition at line 34 of file accumulators.h.
anonymous enum |
Enumerator | |
---|---|
VALUE | |
VALUESQ | |
WEIGHT | |
CAPACITY |
Definition at line 37 of file accumulators.h.
|
inline |
Definition at line 46 of file accumulators.h.
|
inline |
add a value but set the weight 1
Definition at line 95 of file accumulators.h.
|
inline |
return true if Weight== 0
Definition at line 105 of file accumulators.h.
Referenced by qmcplusplus::test_real_accumulator_basic().
|
inline |
Definition at line 139 of file accumulators.h.
Referenced by SimpleFixedNodeBranch::branch(), SimpleFixedNodeBranch::checkParameters(), SimpleFixedNodeBranch::collect(), SimpleFixedNodeBranch::resetRun(), EstimatorManagerBase::start(), and EstimatorManagerNew::startDriverRun().
|
inline |
return the count
Will return the sum of weights of each sample
Definition at line 116 of file accumulators.h.
Referenced by DMCRefEnergy::count(), EstimatorManagerNew::getApproximateEnergyVariance(), EstimatorManagerBase::getApproximateEnergyVariance(), SimpleFixedNodeBranch::read(), qmcplusplus::test_real_accumulator(), qmcplusplus::test_real_accumulator_basic(), qmcplusplus::test_real_accumulator_weights(), and SimpleFixedNodeBranch::write().
|
inline |
return true if Weight!= 0
Definition at line 103 of file accumulators.h.
Referenced by accumulator_set< FullPrecReal >::mean(), accumulator_set< FullPrecReal >::mean2(), SimpleFixedNodeBranch::read(), and qmcplusplus::test_real_accumulator_basic().
|
inline |
return the mean
Definition at line 126 of file accumulators.h.
Referenced by SimpleFixedNodeBranch::branch(), SimpleFixedNodeBranch::collect(), EstimatorManagerBase::getApproximateEnergyVariance(), DMCRefEnergy::getEnergyVariance(), SimpleFixedNodeBranch::read(), qmcplusplus::test_real_accumulator(), qmcplusplus::test_real_accumulator_basic(), and qmcplusplus::test_real_accumulator_weights().
|
inline |
return the mean of squared values
Definition at line 129 of file accumulators.h.
Referenced by qmcplusplus::test_real_accumulator(), qmcplusplus::test_real_accumulator_basic(), and qmcplusplus::test_real_accumulator_weights().
|
inline |
Definition at line 118 of file accumulators.h.
Referenced by qmcplusplus::test_real_accumulator(), and qmcplusplus::test_real_accumulator_weights().
|
inline |
add a sample
Definition at line 53 of file accumulators.h.
|
inline |
add a sample and
Definition at line 61 of file accumulators.h.
|
inline |
reset properties
v | cummulative value |
vv | cummulative valuesq |
w | cummulative weight |
Definition at line 73 of file accumulators.h.
|
inline |
reset properties
v | cummulative value |
w | cummulative weight |
Definition at line 84 of file accumulators.h.
|
inline |
return the sum
Definition at line 108 of file accumulators.h.
Referenced by SimpleFixedNodeBranch::branch(), SimpleFixedNodeBranch::collect(), EstimatorManagerNew::getApproximateEnergyVariance(), EstimatorManagerBase::getApproximateEnergyVariance(), SFNBranch::initParam(), SimpleFixedNodeBranch::initReptile(), SimpleFixedNodeBranch::initWalkerController(), SimpleFixedNodeBranch::read(), qmcplusplus::test_real_accumulator(), qmcplusplus::test_real_accumulator_weights(), SFNBranch::updateParamAfterPopControl(), and SimpleFixedNodeBranch::write().
|
inline |
return the sum of value squared
Definition at line 111 of file accumulators.h.
Referenced by qmcplusplus::test_real_accumulator(), and qmcplusplus::test_real_accumulator_weights().
|
inline |
Definition at line 131 of file accumulators.h.
Referenced by qmcplusplus::test_real_accumulator(), qmcplusplus::test_real_accumulator_basic(), and qmcplusplus::test_real_accumulator_weights().
T properties[CAPACITY] |
Definition at line 44 of file accumulators.h.
Referenced by accumulator_set< FullPrecReal >::accumulator_set(), accumulator_set< FullPrecReal >::add(), accumulator_set< FullPrecReal >::bad(), accumulator_set< FullPrecReal >::clear(), accumulator_set< FullPrecReal >::count(), accumulator_set< FullPrecReal >::good(), accumulator_set< FullPrecReal >::mean(), accumulator_set< FullPrecReal >::mean2(), accumulator_set< FullPrecReal >::mean_and_variance(), accumulator_set< FullPrecReal >::operator()(), h5data_proxy< accumulator_set< T > >::read(), accumulator_set< FullPrecReal >::reset(), accumulator_set< FullPrecReal >::result(), accumulator_set< FullPrecReal >::result2(), accumulator_set< FullPrecReal >::variance(), and h5data_proxy< accumulator_set< T > >::write().