![]()  | 
  
    SG++-Doxygen-Documentation
    
   | 
 
Abstract refinement class for sparse grids. More...
#include <AbstractRefinement.hpp>
  
 Public Types | |
| typedef std::vector< refinement_pair_type > | refinement_container_type | 
| Container for the collection of the refinement atoms and the corresponding value.  More... | |
| typedef AbstractRefinement_refinement_key | refinement_key_type | 
| Type of the identifier of the refinement atom (e.g.  More... | |
| typedef std::forward_list< AbstractRefinement::refinement_pair_type > | refinement_list_type | 
| typedef std::pair< std::shared_ptr< refinement_key_type >, refinement_value_type > | refinement_pair_type | 
| Pair for the refinement key and value.  More... | |
| typedef double | refinement_value_type | 
| Type of functor value assigned to each refinement atom.  More... | |
Public Member Functions | |
| virtual void | free_refine (GridStorage &storage, RefinementFunctor &functor, std::vector< size_t > *addedPoints=0)=0 | 
| Refines a grid according to a RefinementFunctor provided.  More... | |
| virtual size_t | getIndexOfMin (RefinementFunctor::value_type *array, size_t length) | 
| Returns the index of the first occurrence of minimal element in array.  More... | |
| virtual size_t | getNumberOfRefinablePoints (GridStorage &storage)=0 | 
| Computes and returns the number of grid points, which can be refined.  More... | |
| bool | isRefinable (GridStorage &storage, GridPoint &point) | 
| Check if the grid point is refinable.  More... | |
| virtual void | refineGridpoint1D (GridStorage &storage, GridPoint &point, size_t d)=0 | 
| Refine one grid point along a single direction.  More... | |
| virtual void | refineGridpoint1D (GridStorage &storage, size_t seq, size_t d) | 
| Refine one grid point along a single direction.  More... | |
| virtual | ~AbstractRefinement () | 
| Destructor.  More... | |
Static Public Member Functions | |
| static bool | compare_pairs (const refinement_pair_type &lhs, const refinement_pair_type &rhs) | 
| Comparison of the refinement_pair_type.  More... | |
Protected Member Functions | |
| virtual void | collectRefinablePoints (GridStorage &storage, RefinementFunctor &functor, refinement_container_type &collection)=0 | 
| Identifies the sparse grid refinement atoms (points or subspaces) with the largest indicator values.  More... | |
| virtual void | createGridpoint (GridStorage &storage, GridPoint &point)=0 | 
| This method creates a new point on the grid.  More... | |
| virtual void | createGridpoint1D (GridPoint &point, size_t d, GridStorage &storage, index_t &source_index, level_t &source_level) | 
| Creates children grid points along single direction.  More... | |
| virtual void | createGridpointSubroutine (GridStorage &storage, GridPoint &point) | 
| Subroutine for grid point creation.  More... | |
| virtual refinement_list_type | getIndicator (GridStorage &storage, const GridStorage::grid_map_iterator &iter, const RefinementFunctor &functor) const =0 | 
| virtual void | refineGridpoint (GridStorage &storage, size_t refine_index)=0 | 
| This method refines a grid point by generating the children in every dimension of the grid and all their missing ancestors by calling create_gridpoint().  More... | |
| virtual void | refineGridpointsCollection (GridStorage &storage, RefinementFunctor &functor, refinement_container_type &collection)=0 | 
| Refines the collection of points.  More... | |
Friends | |
| class | RefinementDecorator | 
Abstract refinement class for sparse grids.
| typedef std::vector<refinement_pair_type> sgpp::base::AbstractRefinement::refinement_container_type | 
Container for the collection of the refinement atoms and the corresponding value.
Type of the identifier of the refinement atom (e.g.
a grid point or a subspace)
| typedef std::forward_list<AbstractRefinement::refinement_pair_type> sgpp::base::AbstractRefinement::refinement_list_type | 
| typedef std::pair<std::shared_ptr<refinement_key_type>, refinement_value_type> sgpp::base::AbstractRefinement::refinement_pair_type | 
Pair for the refinement key and value.
| typedef double sgpp::base::AbstractRefinement::refinement_value_type | 
Type of functor value assigned to each refinement atom.
      
  | 
  inlinevirtual | 
Destructor.
      
  | 
  protectedpure virtual | 
Identifies the sparse grid refinement atoms (points or subspaces) with the largest indicator values.
| storage | hashmap that stores the grid points | 
| functor | a RefinementFunctor specifying the refinement criteria | 
| collection | container with grid element identifiers (e.g. sequence number, grid point) and corresponding refinement values (usually empty) | 
Implemented in sgpp::optimization::HashRefinementMultiple, sgpp::base::RefinementDecorator, sgpp::base::PredictiveRefinement, sgpp::base::HashRefinementBoundaries, sgpp::base::HashRefinement, sgpp::base::ForwardSelectorRefinement, sgpp::base::ImpurityRefinement, sgpp::base::SubspaceRefinement, sgpp::base::MultipleClassRefinement, and sgpp::base::HashRefinementInteraction.
Referenced by sgpp::base::RefinementDecorator::collectRefinablePoints().
      
  | 
  inlinestatic | 
Comparison of the refinement_pair_type.
This way the priority queue has the elements with the smallest refinement_value_type on top
Referenced by sgpp::base::HashRefinement::addElementToCollection(), sgpp::base::ImpurityRefinement::addElementToCollection(), sgpp::base::ForwardSelectorRefinement::addElementToCollection(), sgpp::base::HashRefinementBoundaries::addElementToCollection(), sgpp::base::PredictiveRefinement::addElementToCollection(), and sgpp::base::SubspaceRefinement::collectRefinablePoints().
      
  | 
  protectedpure virtual | 
This method creates a new point on the grid.
It checks if some parents or children are needed in other dimensions.
| storage | hashmap that stores the gridpoints | 
| point | The point that should be inserted | 
Implemented in sgpp::base::RefinementDecorator, sgpp::base::HashRefinement, sgpp::base::HashRefinementBoundaries, sgpp::base::HashRefinementInconsistent, and sgpp::base::HashRefinementInteraction.
Referenced by sgpp::base::RefinementDecorator::createGridpoint().
      
  | 
  protectedvirtual | 
Creates children grid points along single direction.
| point | The point that should be refined | 
| d | direction | 
| storage | hashmap that stores the gridpoints | 
| source_index | index value in the dimension d | 
| source_level | level value in the dimension d | 
Reimplemented in sgpp::base::HashRefinementBoundaries.
References createGridpointSubroutine(), sgpp::base::HashGridPoint::get(), and sgpp::base::HashGridPoint::set().
Referenced by sgpp::base::HashRefinementInteraction::createGridpoint(), sgpp::base::HashRefinement::createGridpoint(), and sgpp::base::HashRefinementBoundaries::createGridpoint1D().
      
  | 
  inlineprotectedvirtual | 
Subroutine for grid point creation.
| storage | hashmap that stores the gridpoints | 
| point | The point that should be inserted | 
References sgpp::base::HashGridStorage::find(), sgpp::base::HashGridStorage::getPoint(), sgpp::base::HashGridStorage::isContaining(), sgpp::base::HashGridPoint::isLeaf(), and sgpp::base::HashGridPoint::setLeaf().
Referenced by sgpp::base::HashRefinementBoundaries::createGridpoint1D(), and createGridpoint1D().
      
  | 
  pure virtual | 
Refines a grid according to a RefinementFunctor provided.
Refines up to RefinementFunctor::getRefinementsNum() grid points if possible, and if their refinement value is larger than RefinementFunctor::start() and their absolute value is larger or equal than RefinementFunctor::getRefinementThreshold() If addedPoints is supplied and not a zero pointer, then newly created grid points are appended to this vector.
| storage | hashmap that stores the grid points | 
| functor | a RefinementFunctor specifying the refinement criteria | 
| addedPoints | pointer to vector to append newly created grid points to | 
Implemented in sgpp::base::RefinementDecorator, sgpp::base::SubspaceRefinement, sgpp::base::HashRefinement, and sgpp::base::HashRefinementBoundaries.
Referenced by sgpp::base::RefinementDecorator::free_refine().
      
  | 
  virtual | 
Returns the index of the first occurrence of minimal element in array.
Used to find which entry is to be replaced next searching the maximum ones.
| array | array with values | 
| length | length of array | 
References python.statsfileInfo::i.
Referenced by sgpp::base::HashRefinementBoundariesMaxLevel::refineToMaxLevel().
      
  | 
  protectedpure virtual | 
      
  | 
  pure virtual | 
Computes and returns the number of grid points, which can be refined.
This is the number of grid points that have at least one child missing.
| storage | hashmap that stores the grid points | 
Implemented in sgpp::base::RefinementDecorator, sgpp::optimization::HashRefinementMultiple, sgpp::base::HashRefinement, and sgpp::base::HashRefinementBoundaries.
Referenced by sgpp::base::RefinementDecorator::getNumberOfRefinablePoints().
| bool sgpp::base::AbstractRefinement::isRefinable | ( | GridStorage & | storage, | 
| GridPoint & | point | ||
| ) | 
Check if the grid point is refinable.
| storage | hashmap that stores the grid points | 
| point | grid point | 
References sgpp::base::HashGridStorage::end(), sgpp::base::HashGridStorage::find(), sgpp::base::HashGridPoint::get(), sgpp::base::HashGridStorage::getDimension(), sgpp::base::HashGridPoint::isLeaf(), and sgpp::base::HashGridPoint::set().
      
  | 
  protectedpure virtual | 
This method refines a grid point by generating the children in every dimension of the grid and all their missing ancestors by calling create_gridpoint().
| storage | hashmap that stores the gridpoints | 
| refine_index | The index in the hashmap of the point that should be refined | 
Implemented in sgpp::base::RefinementDecorator, sgpp::base::HashRefinement, sgpp::base::HashRefinementBoundaries, sgpp::base::MultipleClassRefinement, and sgpp::base::ANOVAHashRefinement.
Referenced by sgpp::base::RefinementDecorator::refineGridpoint().
      
  | 
  pure virtual | 
Refine one grid point along a single direction.
| storage | hashmap that stores the grid points | 
| point | point to refine | 
| d | direction | 
Implemented in sgpp::base::RefinementDecorator, sgpp::optimization::HashRefinementMultiple, sgpp::base::HashRefinement, and sgpp::base::HashRefinementBoundaries.
Referenced by sgpp::base::RefinementDecorator::refineGridpoint1D(), and refineGridpoint1D().
      
  | 
  virtual | 
Refine one grid point along a single direction.
| storage | hashmap that stores the grid points | 
| seq | sequential number of the grid point | 
| d | direction | 
Reimplemented in sgpp::base::HashRefinement.
References sgpp::base::HashGridStorage::getPoint(), and refineGridpoint1D().
      
  | 
  protectedpure virtual | 
Refines the collection of points.
| storage | hashmap that stores the grid points | 
| functor | a RefinementFunctor specifying the refinement criteria | 
| collection | container with grid element identifiers (e.g. sequence number, grid point) and corresponding refinement values | 
Implemented in sgpp::base::RefinementDecorator, sgpp::base::PredictiveRefinement, sgpp::base::HashRefinementBoundaries, sgpp::base::HashRefinement, sgpp::base::ForwardSelectorRefinement, sgpp::base::ImpurityRefinement, and sgpp::base::SubspaceRefinement.
Referenced by sgpp::base::RefinementDecorator::refineGridpointsCollection().
      
  | 
  friend |