minimc 0.5.1
Loading...
Searching...
No Matches
Sensitivity Class Referenceabstract

Estimates the sensitivity of an Estimator with respect to a Perturbation. More...

#include <Sensitivity.hpp>

Inheritance diagram for Sensitivity:
Collaboration diagram for Sensitivity:

Public Member Functions

virtual ~Sensitivity () noexcept
 Virtual destructor (C++ Core Guidelines C.127)
 
virtual std::unique_ptr< SensitivityClone () const noexcept=0
 Virtual constructor, used for deep copying a Sensitivity. More...
 
std::string to_string (const Real total_weight) const noexcept
 Returns a string suitable for printing. Does not return bins since the parent Estimator will print it. More...
 
Sensitivityoperator+= (const Sensitivity &other) noexcept
 Add scores of other to this.
 
- Public Member Functions inherited from Scorable
 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.
 
Scorableoperator+= (const Scorable &other) noexcept
 Add scores of other to this.
 

Static Public Member Functions

static std::unique_ptr< SensitivityCreate (const pugi::xml_node &sensitivity_perturbation_node, const PerturbationSet &perturbations, const Estimator &estimator)
 Factory method to create a new Sensitivity from a perturbation child of a sensitivities node of an XML document. More...
 

Protected Member Functions

 Sensitivity (const Estimator &estimator, const Perturbation &perturbation) noexcept
 Constructs a Sensitivity with given parent Estimator and Perturbation.
 
- Protected Member Functions inherited from Scorable
std::string GetScoreAsString (const Real total_weight) const noexcept
 Returns a string suitable for printing. More...
 

Protected Attributes

const Estimatorestimator
 Estimator whose sensitivity to a Perturbation is being estimated.
 
const Perturbationperturbation
 Perturbation whose effect on an Estimator is being estimated.
 
- Protected Attributes inherited from Scorable
const std::shared_ptr< const ParticleBinsbins
 Used to map a Particle to a unique index.
 
std::vector< Realscores
 Flattened array of scores.
 
std::vector< Realsquare_scores
 Flattened array of square of scores.
 

Additional Inherited Members

- Public Attributes inherited from Scorable
const std::string name
 Unique, user-defined identifier (C++ Core Guidelines C.131)
 

Detailed Description

Estimates the sensitivity of an Estimator with respect to a Perturbation.

Member Function Documentation

◆ Clone()

virtual std::unique_ptr< Sensitivity > Sensitivity::Clone ( ) const
pure virtualnoexcept

Virtual constructor, used for deep copying a Sensitivity.

Implemented in CurrentTotalCrossSectionSensitivity.

◆ Create()

static std::unique_ptr< Sensitivity > Sensitivity::Create ( const pugi::xml_node &  sensitivity_perturbation_node,
const PerturbationSet perturbations,
const Estimator estimator 
)
static

Factory method to create a new Sensitivity from a perturbation child of a sensitivities node of an XML document.

Exceptions
Sensitivityfor Estimator with respect to Perturbation not supported

◆ to_string()

std::string Sensitivity::to_string ( const Real  total_weight) const
virtualnoexcept

Returns a string suitable for printing. Does not return bins since the parent Estimator will print it.

Implements Scorable.


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