![]() |
SG++-Doxygen-Documentation
|
Potentially hetereogeneous basis on full grids, i.e., a dim
-dimensional vector of 1D bases of type sgpp::base::Basis.
More...
#include <HeterogeneousBasis.hpp>
Public Member Functions | |
double | eval (const LevelVector &level, const IndexVector &index, const base::DataVector &point) const |
Evaluate basis function of given level and index at given point as the tensor product of the 1D bases. | |
const std::vector< base::Basis< level_t, index_t > * > & | getBases1d () const |
size_t | getDimension () const |
HeterogeneousBasis () | |
Default constructor, corresponds to the zero-dimensional case. | |
HeterogeneousBasis (const std::vector< base::Basis< level_t, index_t > * > &bases1d, bool isHierarchical=true) | |
Constructor. | |
HeterogeneousBasis (const std::vector< std::unique_ptr< base::Basis< level_t, index_t > > > &bases1d, bool isHierarchical=true) | |
Constructor. | |
HeterogeneousBasis (size_t dim, base::Basis< level_t, index_t > &basis1d, bool isHierarchical=true) | |
Constructor for the case in which the same basis should be used for all dimensions. | |
bool | isHierarchical () const |
bool | operator!= (const HeterogeneousBasis &other) const |
Inequality operator. | |
bool | operator== (const HeterogeneousBasis &other) const |
Equality operator. | |
void | setBases1D (const std::vector< base::Basis< level_t, index_t > * > &bases1d) |
void | setIsHierarchical (bool isHierarchical) |
Static Public Member Functions | |
static void | hierarchizeLevelIndex (level_t &level, index_t &index) |
Hierarchize level/index pair. | |
static void | hierarchizeLevelIndex (LevelVector &level, IndexVector &index) |
Hierarchize pair of level/index multi-indices. | |
static void | hierarchizeLevelIndex (std::vector< LevelVector > &levels, std::vector< IndexVector > &indices) |
Hierarchize vector of level/index multi-indices. | |
Protected Attributes | |
std::vector< base::Basis< level_t, index_t > * > | bases1d |
vector of pointers to 1D bases (do not delete before this object) | |
bool | isHierarchical_ |
whether the basis is hierarchical or nodal | |
Potentially hetereogeneous basis on full grids, i.e., a dim
-dimensional vector of 1D bases of type sgpp::base::Basis.
In every dimension, a different basis may be used (or the same basis may be used for all dimensions).
|
inline |
Default constructor, corresponds to the zero-dimensional case.
|
inlineexplicit |
Constructor.
bases1d | vector of unique_ptr to 1D bases (do not destruct before this object) |
isHierarchical | whether the basis is hierarchical or nodal |
References bases1d.
|
inlineexplicit |
Constructor.
bases1d | vector of pointers to 1D bases (do not delete before this object) |
isHierarchical | whether the basis is hierarchical or nodal |
|
inline |
Constructor for the case in which the same basis should be used for all dimensions.
dim | dimensionality |
basis1d | 1D basis (do not destruct before this object) |
isHierarchical | whether the basis is hierarchical or nodal |
|
inline |
Evaluate basis function of given level and index at given point as the tensor product of the 1D bases.
If the basis is hierarchical, hierarchizeLevelIndex
will be called before evaluating the 1D bases.
level | level of the basis function |
index | index of the basis function |
point | point at which to evaluate the basis function |
References bases1d, hierarchizeLevelIndex(), isHierarchical_, and level.
Referenced by python.uq.analysis.asgc.ASGCAnalysis.ASGCAnalysis::estimateDensity(), sgpp::combigrid::OperationEvalFullGrid::eval(), and sgpp::combigrid::OperationEvalFullGrid::multiEval().
|
inline |
References bases1d.
Referenced by sgpp::combigrid::OperationPoleHierarchisationGeneral::fromHeterogenerousBasis(), and sgpp::combigrid::OperationPoleHierarchisationGeneral::fromHeterogenerousBasis().
|
inline |
References bases1d.
|
inlinestatic |
Hierarchize level/index pair.
For every level \(\ell \ge 0\) and index \(i = 0, \dotsc, 2^\ell\), there is a unique level \(0 \le \tilde{\ell} \le \ell\) and index \(\tilde{i} = 0, \dotsc, 2^\tilde{\ell}\) such that
[in,out] | level | \(\ell\) before calling, \(\tilde{\ell}\) after calling |
[in,out] | index | \(i\) before calling, \(\tilde{i}\) after calling |
References level.
Referenced by sgpp::combigrid::CombinationGrid::combinePoints(), eval(), sgpp::combigrid::OperationPoleHierarchisationGeneral::HierarchisationGeneralSLE::getMatrixEntry(), hierarchizeLevelIndex(), and hierarchizeLevelIndex().
|
inlinestatic |
Hierarchize pair of level/index multi-indices.
Applies 1D version to each dimension.
[in,out] | level | \(\vec{\ell}\) before calling, \(\tilde{\vec{\ell}}\) after calling |
[in,out] | index | \(\vec{i}\) before calling, \(\vec{\tilde{i}}\) after calling |
References hierarchizeLevelIndex(), and level.
|
inlinestatic |
Hierarchize vector of level/index multi-indices.
Applies multi-index version to every entry.
[in,out] | levels | vector of \(\vec{\ell}\) before calling, vector of \(\tilde{\vec{\ell}}\) after calling |
[in,out] | indices | vector of \(\vec{i}\) before calling, vector of \(\vec{\tilde{i}}\) after calling |
References hierarchizeLevelIndex().
|
inline |
References isHierarchical_.
Referenced by sgpp::combigrid::OperationPoleHierarchisationGeneral::fromHeterogenerousBasis(), sgpp::combigrid::OperationPoleHierarchisationGeneral::fromHeterogenerousBasis(), and setIsHierarchical().
|
inline |
Inequality operator.
Two HeterogeneousBasis instances are equal if they contain the same 1D basis pointers and if the values of isHierarchical
are the same.
other | other HeterogeneousBasis instance |
|
inline |
Equality operator.
Two HeterogeneousBasis instances are equal if they contain the same 1D basis pointers and if the values of isHierarchical
are the same.
other | other HeterogeneousBasis instance |
References bases1d, and isHierarchical_.
|
inline |
bases1d | vector of pointers to 1D bases (do not delete before this object) |
References bases1d.
|
inline |
isHierarchical | whether the basis is hierarchical or nodal |
References isHierarchical(), and isHierarchical_.
|
protected |
vector of pointers to 1D bases (do not delete before this object)
Referenced by eval(), getBases1d(), getDimension(), HeterogeneousBasis(), operator==(), and setBases1D().
|
protected |
whether the basis is hierarchical or nodal
Referenced by eval(), isHierarchical(), operator==(), and setIsHierarchical().