SG++-Doxygen-Documentation
|
A refinement functor, refining according to the maximal absolute values in a DataVector provided, weighted with the corresponding basis function's surplus, i.e., with \(2^{-|\vec{l}|_1} = 2^{\sum_{k=1}^d l_d}\). More...
#include <SurplusVolumeRefinementFunctor.hpp>
Public Member Functions | |
size_t | getRefinementsNum () const override |
Returns the maximal number of points that should be refined. More... | |
double | getRefinementThreshold () const override |
Returns the threshold for refinement. More... | |
double | operator() (GridStorage &storage, size_t seq) const override |
This should be returning a refinement value for every grid point. More... | |
double | start () const override |
Returns the lower bound of refinement criterion (e.g., alpha or error) (lower bound). More... | |
SurplusVolumeRefinementFunctor (DataVector &alpha, size_t refinements_num=1, double threshold=0.0) | |
Constructor. More... | |
~SurplusVolumeRefinementFunctor () override | |
Destructor. More... | |
Public Member Functions inherited from sgpp::base::RefinementFunctor | |
virtual double | getTotalRefinementValue (GridStorage &storage) const |
Returns the total sum of local (error) indicators used for refinement. More... | |
RefinementFunctor () | |
Constructor. More... | |
virtual | ~RefinementFunctor () |
Destructor. More... | |
Protected Attributes | |
DataVector & | alpha |
pointer to the vector that stores the alpha values More... | |
size_t | refinements_num |
number of grid points to refine More... | |
double | threshold |
threshold, only the points with greater to equal absolute values of the refinement criterion (e.g. More... | |
Additional Inherited Members | |
Public Types inherited from sgpp::base::RefinementFunctor | |
typedef double | value_type |
A refinement functor, refining according to the maximal absolute values in a DataVector provided, weighted with the corresponding basis function's surplus, i.e., with \(2^{-|\vec{l}|_1} = 2^{\sum_{k=1}^d l_d}\).
sgpp::base::SurplusVolumeRefinementFunctor::SurplusVolumeRefinementFunctor | ( | DataVector & | alpha, |
size_t | refinements_num = 1 , |
||
double | threshold = 0.0 |
||
) |
Constructor.
alpha | DataVector that is basis for refinement decisions. The i-th entry corresponds to the i-th grid point. |
refinements_num | Number of grid points which should be refined (if possible - there could be less refinable grid points), default: 1 |
threshold | The absolute value of the entries have to be greater or equal than the threshold, default: 0.0 |
|
override |
Destructor.
|
overridevirtual |
Returns the maximal number of points that should be refined.
The maximal number of points to refine is set in the constructor of the implementing class.
Reimplemented from sgpp::base::RefinementFunctor.
References refinements_num.
|
overridevirtual |
Returns the threshold for refinement.
Only the grid points with absolute value of refinement criterion (e.g., alpha or error) greater or equal to this threshold will be refined.
Implements sgpp::base::RefinementFunctor.
References threshold.
|
overridevirtual |
This should be returning a refinement value for every grid point.
The point with the highest value will be refined first.
storage | reference to the grids storage object |
seq | sequence number in the coefficients array |
Implements sgpp::base::RefinementFunctor.
References alpha, sgpp::base::HashGridPoint::getLevelSum(), sgpp::base::HashGridStorage::getPoint(), and sgpp::combigrid::pow().
|
overridevirtual |
Returns the lower bound of refinement criterion (e.g., alpha or error) (lower bound).
The refinement value of grid points to be refined have to be larger than this value
Implements sgpp::base::RefinementFunctor.
|
protected |
pointer to the vector that stores the alpha values
Referenced by python.learner.Learner.Learner::doLearningIteration(), python.uq.learner.Regressor.Regressor::learnData(), python.learner.Learner.Learner::learnData(), python.uq.learner.Interpolant.Interpolant::learnDataWithTest(), python.learner.Learner.Learner::learnDataWithTest(), operator()(), python.uq.dists.SGDEdist.SGDEdist::pdf(), python.learner.Classifier.Classifier::refineGrid(), and python.uq.dists.SGDEdist.SGDEdist::toJson().
|
protected |
number of grid points to refine
Referenced by getRefinementsNum().
|
protected |
threshold, only the points with greater to equal absolute values of the refinement criterion (e.g.
alpha or error) will be refined
Referenced by getRefinementThreshold().