#include <MonteSampler.hh>
An abstract base class for sampling and storing data observations.
Definition at line 26 of file MonteSampler.hh.
|
| MonteSampler (const std::string &print_name, double data_confidence, size_type data_initsize) |
| Construct sampler that does not need to converge. More...
|
|
| MonteSampler (const std::string &print_name, double data_prec, double data_confidence, size_type data_initsize) |
| Construct sampler that must converge. More...
|
|
virtual | ~MonteSampler () |
|
virtual void | sample (const MonteCarlo &mc, const MonteCounter &counter) |
|
void | clear () |
| Clear all data observations. More...
|
|
std::pair< bool, size_type > | is_equilibrated () const |
| Returns pair(true, equil_steps) if equilibration has occured to required precision. More...
|
|
bool | must_converge () const |
| Returns true if convergence criteria must be met for Monte Carlo calculation to be complete. More...
|
|
double | requested_precision () const |
| Returns requested precision on the mean. More...
|
|
bool | is_converged (size_type equil_samples) const |
| Returns true if convergence criteria have been met for data sampled in range [equil_samples, end) More...
|
|
double | mean (size_type equil_samples) const |
| Returns <X> for data sampled in range [equil_samples, end) More...
|
|
double | squared_norm (size_type equil_samples) const |
| Returns <X*X> for data sampled in range [equil_samples, end) More...
|
|
double | calculated_precision (size_type equil_samples) const |
| Returns calculated precision on the mean for data sampled in range [equil_samples, end) More...
|
|
const MCData & | data () const |
| const Access the raw data observation container More...
|
|
std::string | name () const |
| Property name for printing. More...
|
|
std::unique_ptr< MonteSampler > | clone () const |
| Clone this object. More...
|
|
◆ MonteSampler() [1/2]
CASM::Monte::MonteSampler::MonteSampler |
( |
const std::string & |
print_name, |
|
|
double |
data_confidence, |
|
|
size_type |
data_initsize |
|
) |
| |
Construct sampler that does not need to converge.
Definition at line 11 of file MonteSampler.cc.
◆ MonteSampler() [2/2]
CASM::Monte::MonteSampler::MonteSampler |
( |
const std::string & |
print_name, |
|
|
double |
data_prec, |
|
|
double |
data_confidence, |
|
|
size_type |
data_initsize |
|
) |
| |
◆ ~MonteSampler()
virtual CASM::Monte::MonteSampler::~MonteSampler |
( |
| ) |
|
|
inlinevirtual |
◆ _check_convergence()
void CASM::Monte::MonteSampler::_check_convergence |
( |
size_type |
equil_samples | ) |
const |
|
inlineprivate |
◆ _clone()
virtual MonteSampler* CASM::Monte::MonteSampler::_clone |
( |
| ) |
const |
|
inlineprivatevirtual |
◆ calculated_precision()
double CASM::Monte::MonteSampler::calculated_precision |
( |
size_type |
equil_samples | ) |
const |
|
inline |
Returns calculated precision on the mean for data sampled in range [equil_samples, end)
Definition at line 116 of file MonteSampler.hh.
◆ clear()
void CASM::Monte::MonteSampler::clear |
( |
| ) |
|
|
inline |
◆ clone()
std::unique_ptr<MonteSampler> CASM::Monte::MonteSampler::clone |
( |
| ) |
const |
|
inline |
◆ data() [1/2]
MCData& CASM::Monte::MonteSampler::data |
( |
| ) |
|
|
inlineprotected |
Access the raw data observation container.
Definition at line 140 of file MonteSampler.hh.
◆ data() [2/2]
const MCData& CASM::Monte::MonteSampler::data |
( |
| ) |
const |
|
inline |
const Access the raw data observation container
Definition at line 128 of file MonteSampler.hh.
◆ is_converged()
bool CASM::Monte::MonteSampler::is_converged |
( |
size_type |
equil_samples | ) |
const |
|
inline |
Returns true if convergence criteria have been met for data sampled in range [equil_samples, end)
Definition at line 75 of file MonteSampler.hh.
◆ is_equilibrated()
std::pair<bool, size_type> CASM::Monte::MonteSampler::is_equilibrated |
( |
| ) |
const |
|
inline |
Returns pair(true, equil_steps) if equilibration has occured to required precision.
Definition at line 50 of file MonteSampler.hh.
◆ mean()
double CASM::Monte::MonteSampler::mean |
( |
size_type |
equil_samples | ) |
const |
|
inline |
Returns <X> for data sampled in range [equil_samples, end)
Definition at line 91 of file MonteSampler.hh.
◆ must_converge()
bool CASM::Monte::MonteSampler::must_converge |
( |
| ) |
const |
|
inline |
Returns true if convergence criteria must be met for Monte Carlo calculation to be complete.
Definition at line 66 of file MonteSampler.hh.
◆ name()
std::string CASM::Monte::MonteSampler::name |
( |
| ) |
const |
|
inline |
◆ requested_precision()
double CASM::Monte::MonteSampler::requested_precision |
( |
| ) |
const |
|
inline |
Returns requested precision on the mean.
Definition at line 69 of file MonteSampler.hh.
◆ sample()
◆ squared_norm()
double CASM::Monte::MonteSampler::squared_norm |
( |
size_type |
equil_samples | ) |
const |
|
inline |
Returns <X*X> for data sampled in range [equil_samples, end)
Definition at line 103 of file MonteSampler.hh.
◆ m_conf
double CASM::Monte::MonteSampler::m_conf |
|
private |
◆ m_convergence
◆ m_convergence_start_sample
size_type CASM::Monte::MonteSampler::m_convergence_start_sample = 0 |
|
mutableprivate |
◆ m_convergence_uptodate
bool CASM::Monte::MonteSampler::m_convergence_uptodate = false |
|
mutableprivate |
◆ m_data
MCData CASM::Monte::MonteSampler::m_data |
|
private |
An array of observations, one for every so many steps or passes.
Definition at line 169 of file MonteSampler.hh.
◆ m_equilibration
◆ m_equilibration_uptodate
bool CASM::Monte::MonteSampler::m_equilibration_uptodate = false |
|
mutableprivate |
◆ m_must_converge
bool CASM::Monte::MonteSampler::m_must_converge |
|
private |
If false, data observations are recorded but shouldn't be used to determine if Monte Carlo run has converged.
Definition at line 160 of file MonteSampler.hh.
◆ m_name
std::string CASM::Monte::MonteSampler::m_name |
|
private |
◆ m_prec
double CASM::Monte::MonteSampler::m_prec |
|
private |
The documentation for this class was generated from the following files:
- /Users/bpuchala/Work/codes/CASMcode_v0.2.X_reference/include/casm/monte_carlo/MonteSampler.hh
- /Users/bpuchala/Work/codes/CASMcode_v0.2.X_reference/src/casm/monte_carlo/MonteSampler.cc