#include <VectorCalculators.h>
Public Member Functions | |
std::vector< OutType > | compute (const std::vector< 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 std::vector< 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... | |
std::vector< 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 | 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 InType &data) override |
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 std::vector< OutType > | get () const override |
Returns the resulting calculator value. More... | |
virtual void | update (const typename std::vector< InType > ::value_type &)=0 |
Updating the calculator with a piece of data. More... | |
Protected Attributes | |
const Parallel::Communicator & | _communicator |
Private Attributes | |
std::vector< CalcType< InType, OutType > > | _calcs |
std::vector< OutType > | _values |
Definition at line 18 of file VectorCalculators.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.
Referenced by SobolStatistics::execute(), and TEST().
|
overrideprotectedvirtual |
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< std::vector< InType >, std::vector< OutType > >.
Definition at line 59 of file VectorCalculators.h.
|
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.
Implements StochasticTools::Calculator< std::vector< InType >, std::vector< OutType > >.
Definition at line 27 of file VectorCalculators.h.
|
inherited |
Public function to return the calculated value _state must be FINALIZED.
Definition at line 325 of file Calculators.h.
|
overrideprotectedvirtual |
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< std::vector< InType >, std::vector< OutType > >.
Definition at line 36 of file VectorCalculators.h.
|
inherited |
Public function that must be called before updateCalculator and finalizeCalculator.
Sets _state to INITIALIZED
Definition at line 299 of file Calculators.h.
|
inlineinherited |
Definition at line 99 of file Calculators.h.
|
overrideprotectedvirtual |
Definition at line 44 of file VectorCalculators.h.
|
protectedpure virtualinherited |
Updating the calculator with a piece of data.
Sometimes some clever arithmetic is required to avoid storing data.
|
inherited |
Public function to update calculator with a piece of data.
_state mush be INITIALIZED
Definition at line 307 of file Calculators.h.
|
private |
Definition at line 30 of file VectorCalculators.h.
|
private |
Definition at line 31 of file VectorCalculators.h.
Referenced by StochasticTools::VectorCalculator< InType, OutType, CalcType >::get().