SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::base::NakBsplineExtendedBasis< LT, IT > Class Template Reference

Extended Not-a-knot B-spline basis. More...

#include <NakBsplineExtendedBasis.hpp>

Inheritance diagram for sgpp::base::NakBsplineExtendedBasis< LT, IT >:
sgpp::base::Basis< LT, IT >

Public Member Functions

double basisMean (LT l, IT i, size_t start, size_t stop, double offset, double hik, std::shared_ptr< sgpp::base::DataVector > quadCoordinates, std::shared_ptr< sgpp::base::DataVector > quadWeights, std::shared_ptr< sgpp::base::Distribution > pdf)
 
double eval (LT l, IT i, double x) override
 
double evalDx (LT l, IT i, double x) override
 
size_t getDegree () const override
 
double getIntegral (LT l, IT i) override
 
double getMean (LT l, IT i, std::shared_ptr< sgpp::base::Distribution > pdf, std::shared_ptr< sgpp::base::DataVector > quadCoordinates, std::shared_ptr< sgpp::base::DataVector > quadWeights)
 Calculates the mean int b_i(x) rho(x) dx of a basis function b_i w.r.t.
 
 NakBsplineExtendedBasis ()
 Default constructor.
 
 NakBsplineExtendedBasis (size_t degree)
 Constructor.
 
 ~NakBsplineExtendedBasis () override
 Destructor.
 
- Public Member Functions inherited from sgpp::base::Basis< LT, IT >
virtual ~Basis ()
 Destructor.
 

Protected Attributes

NakBsplineBasis< LT, IT > notAKnotBsplineBasis
 B-spline basis for B-spline evaluation.
 

Detailed Description

template<class LT, class IT>
class sgpp::base::NakBsplineExtendedBasis< LT, IT >

Extended Not-a-knot B-spline basis.

This basis is a nonboundary version for the not-a-knot Bspline basis which still can represent 1,x,...x^degree exact on [0,1]. This is achieved by adding the B-splines belonging to the left(0) and right boundary point (1) to (degree+1) inner B-splines with extension coefficients derived from SLE for the representation of 1,x,...x^degree.

Extension of the not hierarchical basis: For each of the outer B-splines b_0 and b_{2^l} a set of (degree+1) closest inner B-splines I(j) is chosen. I.e. I(0) = {1,..,degree+1}, I(2^l) = {2^l-(degree+1),...,2^l-1}. Now the functions 1,x,...,x^degree are interpolated with the not a knot B-splines basis resulting in coefficients a^1_i,...,a^{x^degree}_i, i=0,...,2^l Then the coefficients a^1_j,...,a^{x^degree}_j are represented as a linear combination of the coefficients of I(j) for j in {0,2^l}. The coefficients e_ij of these linear combinations are the extension coefficients

We build a hierarchical basis from this by choosing Lagrange polynomials on levels 1 (and 2 for degree 3 and 5) and then simply using the extended basis funtions from the nonhierarchical basis.

(Note that one could also use the Lagrange polynomials in the sets I(0),I(8). This leads to another spanned space. Also on can only extend once on level 3, then 1,x,...,x^degree are already part of the spanned space and not extend on levels >=3 again leading to another spanned space. ToDo (rehmemk) It might be interesting to compare the various possibilities of extended not a knot B-spline bases (Note: coefficients were calculated with ExtensionBspline.m))

Constructor & Destructor Documentation

◆ NakBsplineExtendedBasis() [1/2]

template<class LT , class IT >
sgpp::base::NakBsplineExtendedBasis< LT, IT >::NakBsplineExtendedBasis ( )
inline

Default constructor.

◆ NakBsplineExtendedBasis() [2/2]

template<class LT , class IT >
sgpp::base::NakBsplineExtendedBasis< LT, IT >::NakBsplineExtendedBasis ( size_t  degree)
inlineexplicit

Constructor.

Parameters
degreeB-spline degree, must be odd (if it's even, degree - 1 is used)

References sgpp::base::NakBsplineExtendedBasis< LT, IT >::getDegree().

◆ ~NakBsplineExtendedBasis()

template<class LT , class IT >
sgpp::base::NakBsplineExtendedBasis< LT, IT >::~NakBsplineExtendedBasis ( )
inlineoverride

Destructor.

Member Function Documentation

◆ basisMean()

template<class LT , class IT >
double sgpp::base::NakBsplineExtendedBasis< LT, IT >::basisMean ( LT  l,
IT  i,
size_t  start,
size_t  stop,
double  offset,
double  hik,
std::shared_ptr< sgpp::base::DataVector quadCoordinates,
std::shared_ptr< sgpp::base::DataVector quadWeights,
std::shared_ptr< sgpp::base::Distribution pdf 
)
inline

◆ eval()

◆ evalDx()

template<class LT , class IT >
double sgpp::base::NakBsplineExtendedBasis< LT, IT >::evalDx ( LT  l,
IT  i,
double  x 
)
inlineoverridevirtual

◆ getDegree()

◆ getIntegral()

template<class LT , class IT >
double sgpp::base::NakBsplineExtendedBasis< LT, IT >::getIntegral ( LT  l,
IT  i 
)
inlineoverridevirtual

◆ getMean()

template<class LT , class IT >
double sgpp::base::NakBsplineExtendedBasis< LT, IT >::getMean ( LT  l,
IT  i,
std::shared_ptr< sgpp::base::Distribution pdf,
std::shared_ptr< sgpp::base::DataVector quadCoordinates,
std::shared_ptr< sgpp::base::DataVector quadWeights 
)
inline

Calculates the mean int b_i(x) rho(x) dx of a basis function b_i w.r.t.

the probability density function rho

Parameters
llevel of basis function
iindex of basis function
pdfprobability density function
quadCoordinatescoordinates of the quadrature rule to be used
quadWeightsweights of the quadrature rule to be used
Returns
mean of basis function

References sgpp::base::NakBsplineExtendedBasis< LT, IT >::basisMean(), and sgpp::base::NakBsplineExtendedBasis< LT, IT >::getDegree().

Referenced by sgpp::base::OperationWeightedQuadratureNakBsplineExtended::doWeightedQuadrature().

Member Data Documentation

◆ notAKnotBsplineBasis


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