Multivariate Expansion#

template<class BasisEvaluatorType, typename MemorySpace>
class MultivariateExpansion : public mpart::ParameterizedFunctionBase<MemorySpace>#

Defines a multivariate expansion based on the tensor product of 1d basis functions.

Template Parameters:
  • BasisEvaluatorType – The type of the 1d basis functions

  • MemorySpace – The Kokkos memory space where the coefficients and evaluations are stored.

Public Functions

template<typename SetType>
inline MultivariateExpansion(unsigned int outDim, SetType const &mset, BasisEvaluatorType const &basis1d)#
template<typename ExpansionType>
inline MultivariateExpansion(unsigned int outDim, ExpansionType expansion)#
virtual ~MultivariateExpansion() = default#
inline virtual void EvaluateImpl(StridedMatrix<const double, MemorySpace> const &pts, StridedMatrix<double, MemorySpace> output) override#

Pure virtual EvaluateImpl function that is overridden by children of this class.

Parameters:
  • pts – A \(d_{in}\times N\) matrix containining \(N\) points in \(\mathbb{R}^d\) where this function be evaluated. Each column is a point.

  • output – A preallocated \(d_{out}\times N\) that will be filled with the evaluations. This matrix must be sized correctly before being passed into this function.

inline virtual void GradientImpl(StridedMatrix<const double, MemorySpace> const &pts, StridedMatrix<const double, MemorySpace> const &sens, StridedMatrix<double, MemorySpace> output) override#
inline virtual void CoeffGradImpl(StridedMatrix<const double, MemorySpace> const &pts, StridedMatrix<const double, MemorySpace> const &sens, StridedMatrix<double, MemorySpace> output) override#

Pure virtual function overridden by child classes for computing the gradient of the function output with respect to the parameter vector \(\mathbf{w}\). See the non-virtual CoeffGrad function for more details.

Evaluates the gradient with respect to the coefficients and stores the results in a preallocated matrix.

Parameters:
  • pts – A \(d_{in}\times N\) matrix containining \(N\) points in \(\mathbb{R}^d\) where this function be evaluated. Each column is a point.

  • sens – A matrix of sensitivity vectors. Each column contains one sensitivity.

  • output – A preallocated matrix to store the results.

inline std::vector<unsigned int> DiagonalCoeffIndices() const#