SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::combigrid::FullGrid Class Reference

Full grid essentially represented by its level and a HeterogeneousBasis. More...

#include <FullGrid.hpp>

Public Types

enum class  LevelOccupancy { TwoToThePowerOfL , Linear }
 LevelOccupancy : how many points are occupied per level in each dimension, "growth rate". More...
 

Public Member Functions

bool findGridPointInFullGrid (const base::GridPoint &gridPoint, IndexVector &index) const
 Helper function to find a grid point in the full grid.
 
 FullGrid ()
 Default constructor, corresponds to the zero-dimensional case.
 
 FullGrid (const LevelVector &level, const HeterogeneousBasis &basis, bool hasBoundary=true, FullGrid::LevelOccupancy levelOccupancy=FullGrid::LevelOccupancy::TwoToThePowerOfL)
 Constructor.
 
const HeterogeneousBasisgetBasis () const
 
size_t getDimension () const
 
LevelVectorgetLevel ()
 
const LevelVectorgetLevel () const
 
size_t getLevel (size_t d) const
 
const LevelOccupancygetLevelOccupancy () const
 
void getMaxIndex (IndexVector &index) const
 Maximum index of grid points.
 
index_t getMaxIndex (size_t d) const
 Maximum 1D index of grid points.
 
void getMinIndex (IndexVector &index) const
 Minimum index of grid points.
 
index_t getMinIndex (size_t d) const
 Minimum 1D index of grid points.
 
index_t getNumberOfIndexVectors () const
 Total number of index vectors (grid points).
 
void getNumberOfIndexVectors (IndexVector &number) const
 Number of index vectors (grid points) in 1D for all dimensions.
 
index_t getNumberOfIndexVectors (size_t d) const
 Number of index vectors (grid points) in 1D.
 
bool hasBoundary () const
 
bool operator!= (const FullGrid &other) const
 
bool operator== (const FullGrid &other) const
 
void setBasis (const HeterogeneousBasis &basis)
 
void setHasBoundary (bool hasBoundary)
 
void setLevel (const LevelVector &level)
 
void setLevel (size_t d, level_t level)
 

Static Public Member Functions

static index_t getNumberOfPointsFromLevel (const LevelVector &level, FullGrid::LevelOccupancy levelOccupancy=FullGrid::LevelOccupancy::TwoToThePowerOfL, bool hasBoundary=true)
 
static index_t getNumberOfPointsFromLevel (level_t level, FullGrid::LevelOccupancy levelOccupancy=FullGrid::LevelOccupancy::TwoToThePowerOfL, bool hasBoundary=true)
 

Protected Attributes

HeterogeneousBasis basis
 type of basis functions for evaluating on the full grid
 
bool hasBoundary_
 whether the full grid has points on the boundary
 
LevelVector level
 level of the full grid
 
LevelOccupancy levelOccupancy
 level occupancy in the full grid
 

Detailed Description

Full grid essentially represented by its level and a HeterogeneousBasis.

Member Enumeration Documentation

◆ LevelOccupancy

LevelOccupancy : how many points are occupied per level in each dimension, "growth rate".

Enumerator
TwoToThePowerOfL 

the default case: each level l adds 2^(l-1) points (except level 0, if present, which adds the two boundary points)

Linear 

each level adds one point (except level 0, if present, which adds the two boundary points)

Constructor & Destructor Documentation

◆ FullGrid() [1/2]

sgpp::combigrid::FullGrid::FullGrid ( )
inline

Default constructor, corresponds to the zero-dimensional case.

◆ FullGrid() [2/2]

sgpp::combigrid::FullGrid::FullGrid ( const LevelVector level,
const HeterogeneousBasis basis,
bool  hasBoundary = true,
FullGrid::LevelOccupancy  levelOccupancy = FullGrid::LevelOccupancy::TwoToThePowerOfL 
)
inline

Constructor.

Parameters
levellevel of the full grid
basistype of basis functions for evaluating on the full grid
hasBoundarywhether the full grid has points on the boundary
levelOccupancyhow many points are added to the grid per level

References levelOccupancy, and TwoToThePowerOfL.

Member Function Documentation

◆ findGridPointInFullGrid()

bool sgpp::combigrid::FullGrid::findGridPointInFullGrid ( const base::GridPoint gridPoint,
IndexVector index 
) const

Helper function to find a grid point in the full grid.

Parameters
[in]gridPointgrid point to find
[out]indexindex of the grid point after calling (if the grid point is contained in the full grid)
Returns
whether the grid point is in the full grid

References sgpp::base::HashGridPoint::getDimension(), sgpp::base::HashGridPoint::getIndex(), getLevel(), sgpp::base::HashGridPoint::getLevel(), and hasBoundary().

Referenced by sgpp::combigrid::CombinationGrid::distributeValuesToFullGrid().

◆ getBasis()

const HeterogeneousBasis & sgpp::combigrid::FullGrid::getBasis ( ) const
inline
Returns
type of basis functions for evaluating on the full grid

References basis.

Referenced by sgpp::combigrid::OperationUPFullGrid::apply(), sgpp::combigrid::OperationEvalFullGrid::eval(), and sgpp::combigrid::OperationEvalFullGrid::multiEval().

◆ getDimension()

size_t sgpp::combigrid::FullGrid::getDimension ( ) const
inline
Returns
dimensionality

References level.

Referenced by sgpp::combigrid::OperationUPFullGrid::apply().

◆ getLevel() [1/3]

LevelVector & sgpp::combigrid::FullGrid::getLevel ( )
inline
Returns
level of the full grid

References level.

◆ getLevel() [2/3]

const LevelVector & sgpp::combigrid::FullGrid::getLevel ( ) const
inline

◆ getLevel() [3/3]

size_t sgpp::combigrid::FullGrid::getLevel ( size_t  d) const
inline
Parameters
ddimension
Returns
level of the \(d\)-th dimension

References level.

◆ getLevelOccupancy()

const LevelOccupancy & sgpp::combigrid::FullGrid::getLevelOccupancy ( ) const
inline
Returns
level occupancy in the full grid

References levelOccupancy.

◆ getMaxIndex() [1/2]

void sgpp::combigrid::FullGrid::getMaxIndex ( IndexVector index) const
inline

Maximum index of grid points.

Parameters
[out]indexmaximum index as multi-index

References getMaxIndex(), and level.

◆ getMaxIndex() [2/2]

index_t sgpp::combigrid::FullGrid::getMaxIndex ( size_t  d) const
inline

Maximum 1D index of grid points.

Parameters
ddimension
Returns
maximum index in the \(d\)-th dimension

References getMinIndex(), and level.

Referenced by getMaxIndex(), and getNumberOfIndexVectors().

◆ getMinIndex() [1/2]

void sgpp::combigrid::FullGrid::getMinIndex ( IndexVector index) const
inline

Minimum index of grid points.

Parameters
[out]indexminimum index as multi-index

References getMinIndex(), and level.

◆ getMinIndex() [2/2]

index_t sgpp::combigrid::FullGrid::getMinIndex ( size_t  d) const
inline

Minimum 1D index of grid points.

Parameters
ddimension
Returns
minimum index in the \(d\)-th dimension

References hasBoundary_.

Referenced by sgpp::combigrid::OperationUPFullGrid::apply(), getMaxIndex(), getMinIndex(), and getNumberOfIndexVectors().

◆ getNumberOfIndexVectors() [1/3]

index_t sgpp::combigrid::FullGrid::getNumberOfIndexVectors ( ) const
inline

Total number of index vectors (grid points).

Returns
number of index vectors

References getNumberOfIndexVectors(), and level.

Referenced by getNumberOfIndexVectors(), and getNumberOfIndexVectors().

◆ getNumberOfIndexVectors() [2/3]

void sgpp::combigrid::FullGrid::getNumberOfIndexVectors ( IndexVector number) const
inline

Number of index vectors (grid points) in 1D for all dimensions.

Parameters
[out]numbervector, \(d\)-th entry is number of index vectors in the \(d\)-th dimension

References getNumberOfIndexVectors(), and level.

◆ getNumberOfIndexVectors() [3/3]

index_t sgpp::combigrid::FullGrid::getNumberOfIndexVectors ( size_t  d) const
inline

Number of index vectors (grid points) in 1D.

Parameters
ddimension
Returns
number of index vectors in the \(d\)-th dimension

References getMaxIndex(), and getMinIndex().

Referenced by sgpp::combigrid::OperationUPFullGrid::apply(), and sgpp::combigrid::CombinationGrid::distributeValuesToFullGrid().

◆ getNumberOfPointsFromLevel() [1/2]

index_t sgpp::combigrid::FullGrid::getNumberOfPointsFromLevel ( const LevelVector level,
FullGrid::LevelOccupancy  levelOccupancy = FullGrid::LevelOccupancy::TwoToThePowerOfL,
bool  hasBoundary = true 
)
static

References level, and levelOccupancy.

◆ getNumberOfPointsFromLevel() [2/2]

index_t sgpp::combigrid::FullGrid::getNumberOfPointsFromLevel ( level_t  level,
FullGrid::LevelOccupancy  levelOccupancy = FullGrid::LevelOccupancy::TwoToThePowerOfL,
bool  hasBoundary = true 
)
static

◆ hasBoundary()

bool sgpp::combigrid::FullGrid::hasBoundary ( ) const
inline
Returns
whether the full grid has points on the boundary

References hasBoundary_.

Referenced by sgpp::combigrid::OperationUPFullGrid::apply(), findGridPointInFullGrid(), getNumberOfPointsFromLevel(), and setHasBoundary().

◆ operator!=()

bool sgpp::combigrid::FullGrid::operator!= ( const FullGrid other) const
inline
Parameters
otherother FullGrid instance
Returns
whether both instances are equal

◆ operator==()

bool sgpp::combigrid::FullGrid::operator== ( const FullGrid other) const
inline
Parameters
otherother FullGrid instance
Returns
whether both instances are equal

References basis, hasBoundary_, and level.

◆ setBasis()

void sgpp::combigrid::FullGrid::setBasis ( const HeterogeneousBasis basis)
inline
Parameters
basistype of basis functions for evaluating on the full grid

References basis.

◆ setHasBoundary()

void sgpp::combigrid::FullGrid::setHasBoundary ( bool  hasBoundary)
inline
Parameters
hasBoundarywhether the full grid has points on the boundary

References hasBoundary(), and hasBoundary_.

◆ setLevel() [1/2]

void sgpp::combigrid::FullGrid::setLevel ( const LevelVector level)
inline
Parameters
levellevel of the full grid

References level.

◆ setLevel() [2/2]

void sgpp::combigrid::FullGrid::setLevel ( size_t  d,
level_t  level 
)
inline
Parameters
ddimension
level\(d\)-th level of the full grid

References level.

Member Data Documentation

◆ basis

HeterogeneousBasis sgpp::combigrid::FullGrid::basis
protected

type of basis functions for evaluating on the full grid

Referenced by getBasis(), operator==(), and setBasis().

◆ hasBoundary_

bool sgpp::combigrid::FullGrid::hasBoundary_
protected

whether the full grid has points on the boundary

Referenced by getMinIndex(), hasBoundary(), operator==(), and setHasBoundary().

◆ level

LevelVector sgpp::combigrid::FullGrid::level
protected

level of the full grid

Referenced by python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::__eq__(), python.learner.folding.FoldingPolicy.FoldingPolicy::__next__(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::contains(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::containsDimx(), python.uq.learner.builder.GridDescriptor.GridDescriptor::createGrid(), python.uq.estimators.MarginalIntegralStrategy.MarginalIntegralStrategy::estimate(), python.uq.learner.builder.GridDescriptor.GridDescriptor::fromGrid(), getDimension(), getLevel(), getLevel(), getLevel(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::getLevelIndex(), getMaxIndex(), getMaxIndex(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::getMaxLevel(), getMinIndex(), getNumberOfIndexVectors(), getNumberOfIndexVectors(), getNumberOfPointsFromLevel(), getNumberOfPointsFromLevel(), operator==(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::overlap(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::overlapDimx(), setLevel(), setLevel(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::transformToReferenceGrid(), python.uq.manager.ASGCStatistics.ASGCStatistics::updateResults(), python.uq.learner.builder.GridDescriptor.GridDescriptor::withLevel(), and python.uq.learner.builder.RegressorSpecificationDescriptor.FoldingDescriptor::withLevel().

◆ levelOccupancy

LevelOccupancy sgpp::combigrid::FullGrid::levelOccupancy
protected

level occupancy in the full grid

Referenced by FullGrid(), getLevelOccupancy(), getNumberOfPointsFromLevel(), and getNumberOfPointsFromLevel().


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