SG++-Doxygen-Documentation
sgpp::combigrid::FullGridCallbackEvaluator< V > Class Template Reference

Implementation of the AbstractFullGridLinearEvaluator class using a callback function that takes a single point and returns a function value at that point. More...

#include <FullGridCallbackEvaluator.hpp>

Inheritance diagram for sgpp::combigrid::FullGridCallbackEvaluator< V >:
sgpp::combigrid::AbstractFullGridEvaluationStrategy< V > sgpp::combigrid::AbstractFullGridEvaluator< V >

Public Member Functions

eval (MultiIndex const &level) override
 Evaluates the function given through the storage for a certain level-multi-index (see class description). More...
 
 FullGridCallbackEvaluator (std::shared_ptr< AbstractCombigridStorage > storage, std::vector< std::shared_ptr< AbstractLinearEvaluator< V >>> evaluatorPrototypes, std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies, FullGridSummationStrategyType summationStrategyType=FullGridSummationStrategyType::LINEAR)
 Constructor. More...
 
std::vector< ThreadPool::TaskgetLevelTasks (MultiIndex const &level, ThreadPool::Task callback)
 
virtual ~FullGridCallbackEvaluator ()
 
- Public Member Functions inherited from sgpp::combigrid::AbstractFullGridEvaluationStrategy< V >
 AbstractFullGridEvaluationStrategy (std::shared_ptr< AbstractCombigridStorage > storage, std::vector< std::shared_ptr< AbstractLinearEvaluator< V >>> evaluatorPrototypes, std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies, FullGridSummationStrategyType summationStrategyType)
 
std::vector< std::shared_ptr< AbstractLinearEvaluator< V > > > getEvaluatorPrototypes ()
 
FullGridSummationStrategyType getSummationStrategyType ()
 
void setParameters (std::vector< V > const &params)
 Sets the parameters for the evaluators. More...
 
virtual ~AbstractFullGridEvaluationStrategy ()
 
- Public Member Functions inherited from sgpp::combigrid::AbstractFullGridEvaluator< V >
 AbstractFullGridEvaluator (std::shared_ptr< AbstractCombigridStorage > storage, std::vector< std::shared_ptr< AbstractPointHierarchy >> pointHierarchies)
 Constructor. More...
 
virtual std::vector< base::DataVectorgetGridPoints (MultiIndex const &level)
 
std::shared_ptr< AbstractCombigridStoragegetStorage ()
 
virtual std::shared_ptr< TensorGridgetTensorGrid (MultiIndex const &level, std::vector< bool > orderingConfiguration)
 
virtual size_t maxNewPoints (MultiIndex const &level)
 
virtual size_t numPoints (MultiIndex const &level)
 
virtual void setMutex (std::shared_ptr< std::recursive_mutex > mutexPtr)
 Updates the current mutex. More...
 
virtual ~AbstractFullGridEvaluator ()
 

Additional Inherited Members

- Protected Attributes inherited from sgpp::combigrid::AbstractFullGridEvaluationStrategy< V >
std::vector< std::shared_ptr< AbstractLinearEvaluator< V > > > evaluatorPrototypes
 
std::shared_ptr< AbstractFullGridSummationStrategy< V > > summationStrategy
 
FullGridSummationStrategyType summationStrategyType
 
- Protected Attributes inherited from sgpp::combigrid::AbstractFullGridEvaluator< V >
std::shared_ptr< std::recursive_mutex > mutexPtr
 Pointer to a mutex that is locked when doing critical operations on data. More...
 
std::vector< std::shared_ptr< AbstractPointHierarchy > > pointHierarchies
 
std::shared_ptr< AbstractCombigridStoragestorage
 Provides access to the function values (stored or computed on demand) More...
 

Detailed Description

template<typename V>
class sgpp::combigrid::FullGridCallbackEvaluator< V >

Implementation of the AbstractFullGridLinearEvaluator class using a callback function that takes a single point and returns a function value at that point.

Constructor & Destructor Documentation

◆ FullGridCallbackEvaluator()

template<typename V >
sgpp::combigrid::FullGridCallbackEvaluator< V >::FullGridCallbackEvaluator ( std::shared_ptr< AbstractCombigridStorage storage,
std::vector< std::shared_ptr< AbstractLinearEvaluator< V >>>  evaluatorPrototypes,
std::vector< std::shared_ptr< AbstractPointHierarchy >>  pointHierarchies,
FullGridSummationStrategyType  summationStrategyType = FullGridSummationStrategyType::LINEAR 
)
inline

Constructor.

Parameters
storageStorage that stores and provides the function values for each grid point.
evaluatorPrototypesprototype objects for the evaluators that are cloned to get an evaluator for each dimension and each level.
pointHierarchiesPointHierarchy objects for each dimension providing the points for each level and information about their ordering.
summationStrategyTypestrategy to gather the results of the univariate evaluators on each anisotropic full grid

◆ ~FullGridCallbackEvaluator()

template<typename V >
virtual sgpp::combigrid::FullGridCallbackEvaluator< V >::~FullGridCallbackEvaluator ( )
inlinevirtual

Member Function Documentation

◆ eval()

template<typename V >
V sgpp::combigrid::FullGridCallbackEvaluator< V >::eval ( MultiIndex const &  level)
inlineoverridevirtual

Evaluates the function given through the storage for a certain level-multi-index (see class description).

Implements sgpp::combigrid::AbstractFullGridEvaluator< V >.

References sgpp::combigrid::AbstractFullGridEvaluationStrategy< V >::summationStrategy.

Referenced by python.uq.analysis.asgc.ASGCAnalysis.ASGCAnalysis::estimateDensity().

◆ getLevelTasks()

template<typename V >
std::vector<ThreadPool::Task> sgpp::combigrid::FullGridCallbackEvaluator< V >::getLevelTasks ( MultiIndex const &  level,
ThreadPool::Task  callback 
)
inlinevirtual
Returns
a vector of tasks which can be precomputed in parallel to make the (serialized) execution of eval() faster
Parameters
levelthe level which one wants to compute
callbackThis callback is called (with already locked mutex) from inside one of the returned tasks when all tasks for the given level are completed and the level can be added.

Implements sgpp::combigrid::AbstractFullGridEvaluator< V >.

References python.classifier::callback, CGLOG, CGLOG_SURROUND, analyse_erg::counter, python.statsfileInfo::i, sgpp::combigrid::AbstractFullGridEvaluator< V >::mutexPtr, sgpp::combigrid::AbstractFullGridEvaluator< V >::pointHierarchies, and sgpp::combigrid::AbstractFullGridEvaluator< V >::storage.


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