SG++-Doxygen-Documentation
sgpp::base::sweep< FUNC > Class Template Reference

Standard sweep operation FUNC should be a class with overwritten operator(). More...

#include <sweep.hpp>

Public Member Functions

 sweep (GridStorage &storage)
 Create a new sweep object with a default constructed functor. More...
 
 sweep (FUNC &functor, GridStorage &storage)
 Create a new sweep object with a copied functor. More...
 
void sweep1D (DataVector &source, DataVector &result, size_t dim_sweep)
 Descends on all dimensions beside dim_sweep. More...
 
void sweep1D (DataMatrix &source, DataMatrix &result, size_t dim_sweep)
 Descends on all dimensions beside dim_sweep. More...
 
void sweep1D_Boundary (DataVector &source, DataVector &result, size_t dim_sweep)
 Descends on all dimensions beside dim_sweep. More...
 
void sweep1D_Boundary (DataMatrix &source, DataMatrix &result, size_t dim_sweep)
 Descends on all dimensions beside dim_sweep. More...
 
 ~sweep ()
 Destructor. More...
 

Protected Types

typedef GridStorage::grid_iterator grid_iterator
 

Protected Member Functions

void sweep_Boundary_rec (DataVector &source, DataVector &result, grid_iterator &index, std::vector< size_t > &dim_list, size_t dim_rem, size_t dim_sweep)
 Descends on all dimensions beside dim_sweep. More...
 
void sweep_Boundary_rec (DataMatrix &source, DataMatrix &result, grid_iterator &index, std::vector< size_t > &dim_list, size_t dim_rem, size_t dim_sweep)
 Descends on all dimensions beside dim_sweep. More...
 
void sweep_rec (DataVector &source, DataVector &result, grid_iterator &index, std::vector< size_t > &dim_list, size_t dim_rem, size_t dim_sweep)
 Descends on all dimensions beside dim_sweep. More...
 
void sweep_rec (DataMatrix &source, DataMatrix &result, grid_iterator &index, std::vector< size_t > &dim_list, size_t dim_rem, size_t dim_sweep)
 Descends on all dimensions beside dim_sweep. More...
 

Protected Attributes

const std::vector< size_t > algoDims
 algorithmic dimensions, operator is applied in this dimensions More...
 
FUNC functor
 Object of FUNC, this is executed by sweep. More...
 
const size_t numAlgoDims_
 number of algorithmic dimensions More...
 
GridStoragestorage
 Pointer to the grid's storage object. More...
 

Detailed Description

template<class FUNC>
class sgpp::base::sweep< FUNC >

Standard sweep operation FUNC should be a class with overwritten operator().

For an example see laplace_up_functor in laplace.hpp. It must be default constructable or copyable. STORAGE must provide a grid_iterator supporting left_child, step_right, up, hint and seq.

Member Typedef Documentation

◆ grid_iterator

template<class FUNC>
typedef GridStorage::grid_iterator sgpp::base::sweep< FUNC >::grid_iterator
protected

Constructor & Destructor Documentation

◆ sweep() [1/2]

template<class FUNC>
sgpp::base::sweep< FUNC >::sweep ( GridStorage storage)
inlineexplicit

Create a new sweep object with a default constructed functor.

Parameters
storagethe storage that contains the grid points

◆ sweep() [2/2]

template<class FUNC>
sgpp::base::sweep< FUNC >::sweep ( FUNC functor,
GridStorage storage 
)
inline

Create a new sweep object with a copied functor.

Parameters
functorthe functor that is executed on the grid
storagethe storage that contains the grid points

◆ ~sweep()

template<class FUNC>
sgpp::base::sweep< FUNC >::~sweep ( )
inline

Destructor.

Member Function Documentation

◆ sweep1D() [1/2]

template<class FUNC>
void sgpp::base::sweep< FUNC >::sweep1D ( DataVector source,
DataVector result,
size_t  dim_sweep 
)
inline

Descends on all dimensions beside dim_sweep.

Class functor for dim_sweep Boundaries are not regarded

Parameters
sourcea DataVector containing the source coefficients of the grid points
resulta DataVector containing the result coefficients of the grid points
dim_sweepthe dimension in which the functor is executed

References sgpp::base::HashGridStorage::getDimension(), python.statsfileInfo::i, and sgpp::base::sweep< FUNC >::sweep_rec().

Referenced by sgpp::base::OperationConvertPrewavelet::doConvertFromLinear(), sgpp::base::OperationConvertPrewavelet::doConvertToLinear(), sgpp::base::OperationHierarchisationLinear::doDehierarchisation(), sgpp::base::OperationHierarchisationLinearStretched::doDehierarchisation(), sgpp::base::OperationHierarchisationLinearBoundary::doDehierarchisation(), sgpp::base::OperationHierarchisationModLinear::doDehierarchisation(), sgpp::base::OperationHierarchisationLinearStretchedBoundary::doDehierarchisation(), sgpp::base::OperationStencilHierarchisationLinear::doDehierarchisation(), sgpp::base::OperationStencilHierarchisationModLinear::doDehierarchisation(), sgpp::base::OperationHierarchisationLinearClenshawCurtis::doDehierarchisation(), sgpp::base::OperationHierarchisationModLinearClenshawCurtis::doDehierarchisation(), sgpp::base::OperationHierarchisationModPolyClenshawCurtis::doDehierarchisation(), sgpp::base::OperationHierarchisationPoly::doDehierarchisation(), sgpp::base::OperationHierarchisationPolyClenshawCurtis::doDehierarchisation(), sgpp::base::OperationHierarchisationPrewavelet::doDehierarchisation(), sgpp::base::OperationHierarchisationModPoly::doDehierarchisation(), sgpp::base::OperationHierarchisationLinear::doHierarchisation(), sgpp::base::OperationHierarchisationLinearStretched::doHierarchisation(), sgpp::base::OperationHierarchisationLinearBoundary::doHierarchisation(), sgpp::base::OperationHierarchisationModLinear::doHierarchisation(), sgpp::base::OperationHierarchisationLinearStretchedBoundary::doHierarchisation(), sgpp::base::OperationStencilHierarchisationLinear::doHierarchisation(), sgpp::base::OperationHierarchisationLinearClenshawCurtis::doHierarchisation(), sgpp::base::OperationStencilHierarchisationModLinear::doHierarchisation(), sgpp::base::OperationHierarchisationModLinearClenshawCurtis::doHierarchisation(), sgpp::base::OperationHierarchisationModPolyClenshawCurtis::doHierarchisation(), sgpp::base::OperationHierarchisationPoly::doHierarchisation(), sgpp::base::OperationHierarchisationPolyClenshawCurtis::doHierarchisation(), sgpp::base::OperationHierarchisationModPoly::doHierarchisation(), sgpp::base::OperationHierarchisationPrewavelet::doHierarchisation(), sgpp::pde::OperationLaplaceModLinear::down(), sgpp::pde::OperationLaplaceLinearStretched::down(), sgpp::pde::OperationLaplaceLinear::down(), sgpp::pde::OperationLTwoDotProductLinearStretched::down(), sgpp::pde::OperationLTwoDotProductLinear::down(), sgpp::pde::OperationLaplaceExplicitLinear::down(), sgpp::pde::OperationLaplaceEnhancedLinear::down(), sgpp::pde::OperationLaplaceModLinear::downOpDim(), sgpp::pde::OperationLaplacePrewavelet::downOpDim(), sgpp::pde::OperationLaplaceModLinear::up(), sgpp::pde::OperationLaplaceLinearStretched::up(), sgpp::pde::OperationLTwoDotProductLinearStretched::up(), sgpp::pde::OperationLTwoDotProductLinear::up(), sgpp::pde::OperationLaplaceLinear::up(), sgpp::pde::OperationLaplacePrewavelet::up(), sgpp::pde::OperationLaplaceEnhancedLinear::up(), sgpp::pde::OperationLaplaceExplicitLinear::up(), sgpp::pde::OperationLaplaceModLinear::upOpDim(), and sgpp::pde::OperationLaplacePrewavelet::upOpDim().

◆ sweep1D() [2/2]

template<class FUNC>
void sgpp::base::sweep< FUNC >::sweep1D ( DataMatrix source,
DataMatrix result,
size_t  dim_sweep 
)
inline

Descends on all dimensions beside dim_sweep.

Class functor for dim_sweep Boundaries are not regarded

Parameters
sourcea DataMatrix containing the source coefficients of the grid points
resulta DataMatrix containing the result coefficients of the grid points
dim_sweepthe dimension in which the functor is executed

References python.statsfileInfo::i, sgpp::base::sweep< FUNC >::numAlgoDims_, and sgpp::base::sweep< FUNC >::sweep_rec().

◆ sweep1D_Boundary() [1/2]

template<class FUNC>
void sgpp::base::sweep< FUNC >::sweep1D_Boundary ( DataVector source,
DataVector result,
size_t  dim_sweep 
)
inline

Descends on all dimensions beside dim_sweep.

Class functor for dim_sweep Boundaries are regarded

Parameters
sourcea DataVector containing the source coefficients of the grid points
resulta DataVector containing the result coefficients of the grid points
dim_sweepthe dimension in which the functor is executed

References sgpp::base::HashGridStorage::getDimension(), python.statsfileInfo::i, sgpp::base::HashGridIterator::resetToLevelZero(), and sgpp::base::sweep< FUNC >::sweep_Boundary_rec().

Referenced by sgpp::base::OperationHierarchisationLinearBoundary::doDehierarchisation(), sgpp::base::OperationHierarchisationLinearStretchedBoundary::doDehierarchisation(), sgpp::base::OperationHierarchisationLinearClenshawCurtisBoundary::doDehierarchisation(), sgpp::base::OperationHierarchisationPolyClenshawCurtisBoundary::doDehierarchisation(), sgpp::base::OperationHierarchisationPolyBoundary::doDehierarchisation(), sgpp::base::OperationHierarchisationLinearBoundary::doHierarchisation(), sgpp::base::OperationHierarchisationLinearStretchedBoundary::doHierarchisation(), sgpp::base::OperationHierarchisationLinearClenshawCurtisBoundary::doHierarchisation(), sgpp::base::OperationHierarchisationPolyClenshawCurtisBoundary::doHierarchisation(), sgpp::base::OperationHierarchisationPolyBoundary::doHierarchisation(), sgpp::pde::OperationLaplaceLinearStretchedBoundary::down(), sgpp::pde::OperationLaplaceLinearBoundary::down(), sgpp::pde::OperationLTwoDotProductLinearBoundary::down(), sgpp::pde::OperationLTwoDotProductLinearStretchedBoundary::down(), sgpp::pde::OperationLaplaceEnhancedLinearBoundary::down(), sgpp::pde::OperationLaplaceLinearStretchedBoundary::up(), sgpp::pde::OperationLTwoDotProductLinearStretchedBoundary::up(), sgpp::pde::OperationLTwoDotProductLinearBoundary::up(), sgpp::pde::OperationLaplaceLinearBoundary::up(), and sgpp::pde::OperationLaplaceEnhancedLinearBoundary::up().

◆ sweep1D_Boundary() [2/2]

template<class FUNC>
void sgpp::base::sweep< FUNC >::sweep1D_Boundary ( DataMatrix source,
DataMatrix result,
size_t  dim_sweep 
)
inline

Descends on all dimensions beside dim_sweep.

Class functor for dim_sweep Boundaries are regarded

Parameters
sourcea DataMatrix containing the source coefficients of the grid points
resulta DataMatrix containing the result coefficients of the grid points
dim_sweepthe dimension in which the functor is executed

References sgpp::base::HashGridStorage::getDimension(), python.statsfileInfo::i, sgpp::base::HashGridIterator::resetToLevelZero(), and sgpp::base::sweep< FUNC >::sweep_Boundary_rec().

◆ sweep_Boundary_rec() [1/2]

template<class FUNC>
void sgpp::base::sweep< FUNC >::sweep_Boundary_rec ( DataVector source,
DataVector result,
grid_iterator index,
std::vector< size_t > &  dim_list,
size_t  dim_rem,
size_t  dim_sweep 
)
inlineprotected

Descends on all dimensions beside dim_sweep.

Class functor for dim_sweep. Boundaries are regarded

Parameters
sourcecoefficients of the sparse grid
resultcoefficients of the function computed by sweep
indexcurrent grid position
dim_listlist of dimensions, that should be handled
dim_remnumber of remaining dims
dim_sweepstatic dimension, in this dimension the functor is executed

References sgpp::base::sweep< FUNC >::functor, sgpp::base::HashGridIterator::get(), sgpp::base::HashGridIterator::hint(), sgpp::base::HashGridStorage::isInvalidSequenceNumber(), sgpp::base::HashGridIterator::leftChild(), sgpp::base::HashGridIterator::resetToLeftLevelZero(), sgpp::base::HashGridIterator::resetToLevelOne(), sgpp::base::HashGridIterator::resetToRightLevelZero(), sgpp::base::HashGridIterator::seq(), sgpp::base::HashGridIterator::stepRight(), and sgpp::base::HashGridIterator::up().

Referenced by sgpp::base::sweep< FUNC >::sweep1D_Boundary(), and sgpp::base::sweep< FUNC >::sweep_Boundary_rec().

◆ sweep_Boundary_rec() [2/2]

template<class FUNC>
void sgpp::base::sweep< FUNC >::sweep_Boundary_rec ( DataMatrix source,
DataMatrix result,
grid_iterator index,
std::vector< size_t > &  dim_list,
size_t  dim_rem,
size_t  dim_sweep 
)
inlineprotected

Descends on all dimensions beside dim_sweep.

Class functor for dim_sweep. Boundaries are regarded

Parameters
sourcecoefficients of the sparse grid
resultcoefficients of the function computed by sweep
indexcurrent grid position
dim_listlist of dimensions, that should be handled
dim_remnumber of remaining dims
dim_sweepstatic dimension, in this dimension the functor is executed

References sgpp::base::sweep< FUNC >::functor, sgpp::base::HashGridIterator::get(), sgpp::base::HashGridIterator::hint(), sgpp::base::HashGridStorage::isInvalidSequenceNumber(), sgpp::base::HashGridIterator::leftChild(), sgpp::base::HashGridIterator::resetToLeftLevelZero(), sgpp::base::HashGridIterator::resetToLevelOne(), sgpp::base::HashGridIterator::resetToRightLevelZero(), sgpp::base::HashGridIterator::seq(), sgpp::base::HashGridIterator::stepRight(), sgpp::base::sweep< FUNC >::sweep_Boundary_rec(), and sgpp::base::HashGridIterator::up().

◆ sweep_rec() [1/2]

template<class FUNC>
void sgpp::base::sweep< FUNC >::sweep_rec ( DataVector source,
DataVector result,
grid_iterator index,
std::vector< size_t > &  dim_list,
size_t  dim_rem,
size_t  dim_sweep 
)
inlineprotected

Descends on all dimensions beside dim_sweep.

Class functor for dim_sweep. Boundaries are not regarded

Parameters
sourcecoefficients of the sparse grid
resultcoefficients of the function computed by sweep
indexcurrent grid position
dim_listlist of dimensions, that should be handled
dim_remnumber of remaining dims
dim_sweepstatic dimension, in this dimension the functor is executed

References sgpp::base::sweep< FUNC >::functor, sgpp::base::HashGridIterator::hint(), sgpp::base::HashGridStorage::isInvalidSequenceNumber(), sgpp::base::HashGridIterator::leftChild(), sgpp::base::HashGridIterator::seq(), sgpp::base::HashGridIterator::stepRight(), and sgpp::base::HashGridIterator::up().

Referenced by sgpp::base::sweep< FUNC >::sweep1D(), and sgpp::base::sweep< FUNC >::sweep_rec().

◆ sweep_rec() [2/2]

template<class FUNC>
void sgpp::base::sweep< FUNC >::sweep_rec ( DataMatrix source,
DataMatrix result,
grid_iterator index,
std::vector< size_t > &  dim_list,
size_t  dim_rem,
size_t  dim_sweep 
)
inlineprotected

Descends on all dimensions beside dim_sweep.

Class functor for dim_sweep. Boundaries are not regarded

Parameters
sourcecoefficients of the sparse grid
resultcoefficients of the function computed by sweep
indexcurrent grid position
dim_listlist of dimensions, that should be handled
dim_remnumber of remaining dims
dim_sweepstatic dimension, in this dimension the functor is executed

References sgpp::base::sweep< FUNC >::functor, sgpp::base::HashGridIterator::hint(), sgpp::base::HashGridStorage::isInvalidSequenceNumber(), sgpp::base::HashGridIterator::leftChild(), sgpp::base::HashGridIterator::seq(), sgpp::base::HashGridIterator::stepRight(), sgpp::base::sweep< FUNC >::sweep_rec(), and sgpp::base::HashGridIterator::up().

Member Data Documentation

◆ algoDims

template<class FUNC>
const std::vector<size_t> sgpp::base::sweep< FUNC >::algoDims
protected

algorithmic dimensions, operator is applied in this dimensions

◆ functor

template<class FUNC>
FUNC sgpp::base::sweep< FUNC >::functor
protected

Object of FUNC, this is executed by sweep.

Referenced by sgpp::base::sweep< FUNC >::sweep_Boundary_rec(), and sgpp::base::sweep< FUNC >::sweep_rec().

◆ numAlgoDims_

template<class FUNC>
const size_t sgpp::base::sweep< FUNC >::numAlgoDims_
protected

number of algorithmic dimensions

Referenced by sgpp::base::sweep< FUNC >::sweep1D().

◆ storage

template<class FUNC>
GridStorage& sgpp::base::sweep< FUNC >::storage
protected

Pointer to the grid's storage object.


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