|
minimc 0.5.1
|
Serves as base class for Estimator and Sensitivity. More...
#include <Scorable.hpp>

Public Member Functions | |
| Scorable (const std::string &name, const pugi::xml_node &bins_node) noexcept | |
Constructs a Scorable from a bins node of an XML document. More... | |
| Scorable (const Scorable &estimator, const Perturbation &perturbation) noexcept | |
| Constructs an Scorable from an existing estimator and perturbation. More... | |
| virtual | ~Scorable () noexcept |
| Virtual destructor (C++ Core Guidelines C.127) | |
| virtual Real | GetScore (const Particle &p) const noexcept=0 |
| Returns what a Particle would score. More... | |
| virtual std::string | to_string (const Real total_weight) const noexcept=0 |
| Returns a string suitable for printing. More... | |
| Real | GetScore (const size_t index, const Real total_weight) const noexcept |
| Returns all scores; primarily for unit testing. | |
| Scorable & | operator+= (const Scorable &other) noexcept |
| Add scores of other to this. | |
Public Attributes | |
| const std::string | name |
| Unique, user-defined identifier (C++ Core Guidelines C.131) | |
Protected Member Functions | |
| std::string | GetScoreAsString (const Real total_weight) const noexcept |
| Returns a string suitable for printing. More... | |
Protected Attributes | |
| const std::shared_ptr< const ParticleBins > | bins |
| Used to map a Particle to a unique index. | |
| std::vector< Real > | scores |
| Flattened array of scores. | |
| std::vector< Real > | square_scores |
| Flattened array of square of scores. | |
Serves as base class for Estimator and Sensitivity.
Accumulates scores then produces mean and standard deviation estimates using sample statistics
|
noexcept |
Constructs a Scorable from a bins node of an XML document.
All scores are initialized to zero
|
noexcept |
Constructs an Scorable from an existing estimator and perturbation.
All scores are initialized to zero
Returns what a Particle would score.
Implemented in CurrentEstimator, and CurrentTotalCrossSectionSensitivity.
|
protectednoexcept |
Returns a string suitable for printing.
Does not return bins since the derived class will decide if bins should be printed. For instance, an Estimator may print the bins while the bins are omitted for associated Sensitivity objects.
|
pure virtualnoexcept |
Returns a string suitable for printing.
Implemented in Sensitivity, and Estimator.