Medusa  1.1
Coordinate Free Mehless Method implementation
mm::Polyharmonic< scal_t, k > Class Template Reference

#include <Polyharmonic_fwd.hpp>

Detailed Description

template<typename scal_t, int k = -1>
class mm::Polyharmonic< scal_t, k >

Polyharmonic Radial Basis Function of odd order.

Specifically, this class represents a function \( f(r^2) = r^k, k = 1, 3, \ldots\) as a function of squared distance with exponent \(k\). This class satisfies the Radial Basis Function concept.

Template Parameters
kOrder of the RBF. Must be odd.

Usage example:

Polyharmonic<double, 3> ph; // order given compile time
double val = ph(4.0); // value at 4.0 (this is the squared radius)
double der = ph(0.0, 2); // second derivative at 0.0
std::cout << ph << std::endl;

Definition at line 32 of file Polyharmonic_fwd.hpp.

Public Member Functions

 Polyharmonic ()
 Default constructor. Only applicable when order given as template argument. More...
 
 Polyharmonic (int order)
 If template argument was -1, the order is accepted as runtime parameter. More...
 
int order () const
 Get order of the RBF. More...
 
scalar_t operator() (scalar_t r2, int derivative) const
 Evaluate derivative of this RBF wrt. More...
 
template<int dimension>
scalar_t operator() (scalar_t r2, Lap< dimension > lap) const
 Evaluate Laplacian of this RBF wrt. More...
 
scalar_t operator() (scalar_t r2) const
 Evaluate this RBF given squared radial distance. More...
 

Public Types

typedef scal_t scalar_t
 Scalar type used for computations. More...
 

Friends

template<typename S , int K>
std::ostream & operator<< (std::ostream &os, const Polyharmonic< S, K > &m)
 Output basic information about given Gaussian RBF. More...
 

Private Attributes

const int order_
 Exponent of the RBF. More...
 

Constructor & Destructor Documentation

◆ Polyharmonic() [1/2]

template<typename scal_t , int k>
mm::Polyharmonic< scal_t, k >::Polyharmonic

Default constructor. Only applicable when order given as template argument.

Definition at line 15 of file Polyharmonic.hpp.

◆ Polyharmonic() [2/2]

template<typename scal_t , int k>
mm::Polyharmonic< scal_t, k >::Polyharmonic ( int  order)

If template argument was -1, the order is accepted as runtime parameter.

Definition at line 20 of file Polyharmonic.hpp.

Member Function Documentation

◆ operator()() [1/3]

template<typename scal_t , int k = -1>
scalar_t mm::Polyharmonic< scal_t, k >::operator() ( scalar_t  r2) const
inline

Evaluate this RBF given squared radial distance.

Definition at line 67 of file Polyharmonic_fwd.hpp.

◆ operator()() [2/3]

template<typename scal_t , int k>
scal_t mm::Polyharmonic< scal_t, k >::operator() ( scalar_t  r2,
int  derivative 
) const
inline

Evaluate derivative of this RBF wrt.

r2 at given point.

Parameters
r2Squared radial distance.
derivativeOrder of derivative to evaluate.
Exceptions
Assertionfails if derivative order is negative.

Definition at line 25 of file Polyharmonic.hpp.

◆ operator()() [3/3]

template<typename scal_t , int k = -1>
template<int dimension>
scalar_t mm::Polyharmonic< scal_t, k >::operator() ( scalar_t  r2,
Lap< dimension >  lap 
) const
inline

Evaluate Laplacian of this RBF wrt.

r at given point.

Parameters
r2Squared radial distance.
lapLaplacian operator object.

◆ order()

template<typename scal_t , int k = -1>
int mm::Polyharmonic< scal_t, k >::order ( ) const
inline

Get order of the RBF.

Definition at line 47 of file Polyharmonic_fwd.hpp.

Friends And Related Function Documentation

◆ operator<<

template<typename scal_t , int k = -1>
template<typename S , int K>
std::ostream& operator<< ( std::ostream &  os,
const Polyharmonic< S, K > &  m 
)
friend

Output basic information about given Gaussian RBF.

Definition at line 47 of file Polyharmonic.hpp.

Member Data Documentation

◆ order_

template<typename scal_t , int k = -1>
const int mm::Polyharmonic< scal_t, k >::order_
private

Exponent of the RBF.

Definition at line 38 of file Polyharmonic_fwd.hpp.


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