#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 void | update (const typename InType::value_type &val) override |
Updating the calculator with a piece of data. 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 | finalize (bool is_distributed) override |
This is used to compute the resulting calculator value by performing necessary arithmetic and parallel communication. More... | |
virtual OutType | get () const override |
Returns the resulting calculator value. More... | |
Protected Attributes | |
dof_id_type | _count |
OutType | _sum |
const Parallel::Communicator & | _communicator |
Definition at line 153 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 >.
Reimplemented in StochasticTools::Sum< InType, OutType >.
Definition at line 41 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.
|
inlineoverrideprotectedvirtualinherited |
Returns the resulting calculator value.
It is important to not modify member data here so the calculator can retain its state.
Implements StochasticTools::Calculator< InType, OutType >.
Definition at line 146 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 25 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.
|
overrideprotectedvirtual |
Updating the calculator with a piece of data.
Sometimes some clever arithmetic is required to avoid storing data.
Reimplemented from StochasticTools::Mean< InType, OutType >.
Definition at line 55 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 148 of file Calculators.h.
|
protectedinherited |
Definition at line 149 of file Calculators.h.
Referenced by StochasticTools::Mean< InType, OutType >::get().