SG++-Doxygen-Documentation
BSplineRoutines.cpp File Reference
#include <sgpp/combigrid/algebraic/FloatTensorVector.hpp>
#include <sgpp/combigrid/operation/multidim/fullgrid/AbstractFullGridEvaluationStrategy.hpp>
#include <sgpp/combigrid/operation/multidim/sparsegrid/LTwoScalarProductHashMapNakBsplineBoundaryCombigrid.hpp>
#include <sgpp/combigrid/utils/BSplineRoutines.hpp>
#include <sgpp/base/exception/application_exception.hpp>
#include <algorithm>
#include <iomanip>
#include <string>
#include <vector>

## Functions

sgpp::combigrid::GridFunction BSplineCoefficientGridFunction (sgpp::combigrid::MultiFunction func, sgpp::combigrid::CombiHierarchies::Collection grids, size_t degree)
Creates the GridFunction that calculates the coefficients of the B-spline interpolation. More...

sgpp::combigrid::GridFunction BSplineTensorCoefficientGridFunction (sgpp::combigrid::MultiFunction func, sgpp::combigrid::CombiHierarchies::Collection grids, size_t degree)
Creates the GridFunction that calculates the coefficients of the B-spline interpolation. More...

std::vector< double > createdeg1Knots (std::vector< double > const &xValues)
Creates the knot sequence xi needed for the evaluation of B-splines from the evaluation points xValues for B splines of degree 1 by adding the necessary point outisde [0,1] by mirroring at 0 and 1. More...

std::vector< double > createdeg3NakKnots (std::vector< double > const &xValues)
Creates the knot sequence xi needed for the evaluation of B-splines from the evaluation points xValues for B splines of degree 1 by adding the necessary point outisde [0,1] by mirroring at 0 and 1. More...

std::vector< double > createdeg5NakKnots (std::vector< double > const &xValues)
Creates the knot sequence xi needed for the evaluation of B-splines from the evaluation points xValues for B splines of degree 1 by adding the necessary point outisde [0,1] by mirroring at 0 and 1. More...

std::vector< double > createNakKnots (std::vector< double > const &xValues, size_t const &degree)
interface for creating the knot sequence xi needed for the evaluation of B-splines from the evaluation points xValues for B splines of degrees i n{1,3,5} More...

size_t getUniqueIndex (size_t level, size_t index)
unique index for level index pair More...

## Function Documentation

 sgpp::combigrid::GridFunction BSplineCoefficientGridFunction ( sgpp::combigrid::MultiFunction func, sgpp::combigrid::CombiHierarchies::Collection grids, size_t degree )

Creates the GridFunction that calculates the coefficients of the B-spline interpolation.

The coefficients for each B-Spline are saved in a TreeStorage encoded by a MultiIndex The Grid Functions coefficients are used as well for quadrature.

Parameters
 func the objective function that shall be interpolated grids vector of one dimensional grids degree degree of the B spline basis functions
 sgpp::combigrid::GridFunction BSplineTensorCoefficientGridFunction ( sgpp::combigrid::MultiFunction func, sgpp::combigrid::CombiHierarchies::Collection grids, size_t degree )

Creates the GridFunction that calculates the coefficients of the B-spline interpolation.

The coefficients for each B-Spline are saved in a TreeStorage encoded by a MultiIndex The Grid Functions coefficients are used as well for quadrature.

Parameters
 func the objective function that shall be interpolated grids vector of one dimensional grids degree degree of the B spline basis functions
 std::vector createdeg1Knots ( std::vector< double > const & xValues )

Creates the knot sequence xi needed for the evaluation of B-splines from the evaluation points xValues for B splines of degree 1 by adding the necessary point outisde [0,1] by mirroring at 0 and 1.

Parameters
 xValues grid points inside [0,1]

References python.statsfileInfo::i.

Referenced by createNakKnots().

 std::vector createdeg3NakKnots ( std::vector< double > const & xValues )

Creates the knot sequence xi needed for the evaluation of B-splines from the evaluation points xValues for B splines of degree 1 by adding the necessary point outisde [0,1] by mirroring at 0 and 1.

For dealing with the boundaries at 0 and 1 not a knot knots are used. In the case of degree 3 this means that the knot directly to the right/left of 0/1 are removed.

Parameters
 xValues grid points inside [0,1]

References python.statsfileInfo::i.

Referenced by createNakKnots().

 std::vector createdeg5NakKnots ( std::vector< double > const & xValues )

Creates the knot sequence xi needed for the evaluation of B-splines from the evaluation points xValues for B splines of degree 1 by adding the necessary point outisde [0,1] by mirroring at 0 and 1.

For dealing with the boundaries at 0 and 1 not a knot knots are used. In the case of degree 3 this means that the two knots directly to the right/left of 0/1 are removed.

Parameters
 xValues grid points inside [0,1]

References python.statsfileInfo::i.

Referenced by createNakKnots().

 std::vector createNakKnots ( std::vector< double > const & xValues, size_t const & degree )

interface for creating the knot sequence xi needed for the evaluation of B-splines from the evaluation points xValues for B splines of degrees i n{1,3,5}

Parameters
 xValues grid points inside [0,1] degree degree of the B spline basis functions

References createdeg1Knots(), createdeg3NakKnots(), and createdeg5NakKnots().

 size_t getUniqueIndex ( size_t level, size_t index )

unique index for level index pair

Parameters
 level index
Returns

References sgpp::combigrid::pow().