#include <Calculators.h>
Public Member Functions | |
OutType | compute (const InType &, bool) |
Evaluate the calculator on the full vector of data. More... | |
void | initializeCalculator () |
Public function that must be called before updateCalculator and finalizeCalculator. More... | |
void | updateCalculator (const typename InType::value_type &) |
Public function to update calculator with a piece of data. More... | |
void | finalizeCalculator (bool) |
Public function to finalize the resulting calculator value. More... | |
OutType | getValue () const |
Public function to return the calculated value _state must be FINALIZED. More... | |
const std::string & | name () const |
const Parallel::Communicator & | comm () const |
processor_id_type | n_processors () const |
processor_id_type | processor_id () const |
Protected Member Functions | |
virtual OutType | get () const override |
Returns the resulting calculator value. More... | |
virtual void | initialize () override |
This function is used to reset the calculator to its initial state and prepare it for another evaluation. More... | |
virtual void | update (const typename InType::value_type &val) override |
Updating the calculator with a piece of data. More... | |
virtual void | finalize (bool is_distributed) override |
This is used to compute the resulting calculator value by performing necessary arithmetic and parallel communication. More... | |
Protected Attributes | |
OutType | _min |
OutType | _max |
const Parallel::Communicator & | _communicator |
Definition at line 179 of file Calculators.h.
|
inherited |
Evaluate the calculator on the full vector of data.
This is basically a convenient wrapper around initializeCalculator, updateCalculator, finalizeCalculator, and getvalue.
Definition at line 288 of file Calculators.h.
|
overrideprotectedvirtualinherited |
This is used to compute the resulting calculator value by performing necessary arithmetic and parallel communication.
This only called once after all the input data is entered through update.
Implements StochasticTools::Calculator< InType, OutType >.
Definition at line 135 of file Calculators.C.
|
inherited |
Public function to finalize the resulting calculator value.
_state must be INITLIALIZED Sets _state to FINALIZED
Definition at line 315 of file Calculators.h.
|
inlineoverrideprotectedvirtual |
Returns the resulting calculator value.
It is important to not modify member data here so the calculator can retain its state.
Reimplemented from StochasticTools::Ratio< InType, OutType >.
Definition at line 185 of file Calculators.h.
|
inherited |
Public function to return the calculated value _state must be FINALIZED.
Definition at line 325 of file Calculators.h.
|
overrideprotectedvirtualinherited |
This function is used to reset the calculator to its initial state and prepare it for another evaluation.
This usually involves clearing class members.
Implements StochasticTools::Calculator< InType, OutType >.
Definition at line 117 of file Calculators.C.
|
inherited |
Public function that must be called before updateCalculator and finalizeCalculator.
Sets _state to INITIALIZED
Definition at line 299 of file Calculators.h.
Referenced by StochasticTools::SobolCalculator< std::vector< InType >, std::vector< OutType > >::finalize(), and StochasticTools::SobolCalculator< std::vector< InType >, std::vector< OutType > >::update().
|
inlineinherited |
Definition at line 99 of file Calculators.h.
|
overrideprotectedvirtualinherited |
Updating the calculator with a piece of data.
Sometimes some clever arithmetic is required to avoid storing data.
Implements StochasticTools::Calculator< InType, OutType >.
Definition at line 125 of file Calculators.C.
|
inherited |
Public function to update calculator with a piece of data.
_state mush be INITIALIZED
Definition at line 307 of file Calculators.h.
|
protectedinherited |
Definition at line 175 of file Calculators.h.
Referenced by StochasticTools::Ratio< InType, OutType >::get(), and StochasticTools::Max< InType, OutType >::get().
|
protectedinherited |
Definition at line 174 of file Calculators.h.
Referenced by StochasticTools::Ratio< InType, OutType >::get(), and StochasticTools::Min< InType, OutType >::get().