SG++-Doxygen-Documentation
|
Implementation of the AbstractCombigridStorage using TreeStorage<TreeStorage<float_t>>. More...
#include <CombigridTreeStorage.hpp>
Public Member Functions | |
CombigridTreeStorage (std::vector< std::shared_ptr< AbstractPointHierarchy >> const &p_pointHierarchies, MultiFunction p_func) | |
CombigridTreeStorage (std::vector< std::shared_ptr< AbstractPointHierarchy >> const &p_pointHierarchies, bool exploitNesting=true, MultiFunction p_func=MultiFunction(constantFunction< base::DataVector const &, double >())) | |
virtual void | deserialize (std::string const &str) |
Re-loads storage values from a string that has been generated by serialize(). More... | |
double | get (MultiIndex const &level, MultiIndex const &index) override |
virtual std::shared_ptr< AbstractMultiStorageIterator< double > > | getGuidedIterator (MultiIndex const &level, MultiIndexIterator &iterator, std::vector< bool > orderingConfiguration) |
virtual size_t | getNumEntries () |
Returns the number of entries (all level-index pairs) in the storage, which indicates the number of function evaluations that have been done. More... | |
std::shared_ptr< TreeStorage< double > > | getStorage (const MultiIndex &level) |
virtual std::string | serialize () |
virtual void | set (MultiIndex const &level, MultiIndex const &index, double value) |
Sets a value at the given level-index pair, creating a new entry if no value had been previously stored at this level-index pair. More... | |
virtual void | setMutex (std::shared_ptr< std::recursive_mutex > mutexPtr) |
Sets a mutex that is locked for critical operations. More... | |
virtual | ~CombigridTreeStorage () |
Public Member Functions inherited from sgpp::combigrid::AbstractCombigridStorage | |
virtual | ~AbstractCombigridStorage () |
Implementation of the AbstractCombigridStorage using TreeStorage<TreeStorage<float_t>>.
For further information, refer to AbstractCombigridStorage.
sgpp::combigrid::CombigridTreeStorage::CombigridTreeStorage | ( | std::vector< std::shared_ptr< AbstractPointHierarchy >> const & | p_pointHierarchies, |
MultiFunction | p_func | ||
) |
p_pointHierarchies | Point hierarchies generating the points at which the function should be evaluated. |
p_func | Function generating the values that are stored in the storage. |
sgpp::combigrid::CombigridTreeStorage::CombigridTreeStorage | ( | std::vector< std::shared_ptr< AbstractPointHierarchy >> const & | p_pointHierarchies, |
bool | exploitNesting = true , |
||
MultiFunction | p_func = MultiFunction(constantFunction<base::DataVector const &, double>()) |
||
) |
p_pointHierarchies | Point hierarchies generating the points at which the function should be evaluated. |
exploitNesting | If this is set to true, identical grid points on different levels can have different values. This is e.g. relevant for PDE solving. |
p_func | Function generating the values that are stored in the storage. |
References sgpp::combigrid::CombigridTreeStorageImpl::exploitNesting.
|
virtual |
|
virtual |
Re-loads storage values from a string that has been generated by serialize().
Implements sgpp::combigrid::AbstractCombigridStorage.
References sgpp::combigrid::TreeStorageSerializationStrategy< T >::deserialize().
Referenced by python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter::deserializeFromFile(), python.learner.formatter.GridFormatter.GridFormatter::deserializeFromFile(), python.utils.GzipSerializer.GzipSerializer::deserializeFromFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter::deserializeFromFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter::deserializeFromFile(), and python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter::deserializeFromFile().
|
overridevirtual |
Implements sgpp::combigrid::AbstractCombigridStorage.
References level.
|
virtual |
level | Level to traverse |
iterator | Iterator that defines which values should be iterated over |
orderingConfiguration | Defines for each dimension whether the grid points in that dimension should be traversed in sorted order. |
Implements sgpp::combigrid::AbstractCombigridStorage.
References level, and sgpp::combigrid::IterationPolicy::setIterator().
|
virtual |
Returns the number of entries (all level-index pairs) in the storage, which indicates the number of function evaluations that have been done.
Currently, this is an O(n) method.
Implements sgpp::combigrid::AbstractCombigridStorage.
std::shared_ptr< TreeStorage< double > > sgpp::combigrid::CombigridTreeStorage::getStorage | ( | const MultiIndex & | level | ) |
References level.
|
virtual |
Implements sgpp::combigrid::AbstractCombigridStorage.
References sgpp::combigrid::TreeStorageSerializationStrategy< T >::serialize().
Referenced by python.utils.GzipSerializer.GzipSerializer::serializeToFile(), python.learner.formatter.LearnerFormatter.LearnerFormatter::serializeToFile(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter::serializeToFile(), python.learner.formatter.GridFormatter.GridFormatter::serializeToFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter::serializeToFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter::serializeToFile(), and python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter::serializeToFile().
|
virtual |
Sets a value at the given level-index pair, creating a new entry if no value had been previously stored at this level-index pair.
Implements sgpp::combigrid::AbstractCombigridStorage.
References level.
|
virtual |
Sets a mutex that is locked for critical operations.
If the mutex is nullptr, nothing is locked.
Implements sgpp::combigrid::AbstractCombigridStorage.
References sgpp::combigrid::CombigridTreeStorageImpl::mutexPtr.