|  | Medusa
    1.1
    Coordinate Free Mehless Method implementation |  | 
 
 
 
Go to the documentation of this file.    1 #ifndef MEDUSA_BITS_APPROXIMATIONS_GAUSSIAN_HPP_ 
    2 #define MEDUSA_BITS_APPROXIMATIONS_GAUSSIAN_HPP_ 
   16 template <
typename scal_t>
 
   21 template <
class scal_t>
 
   23     assert_msg(derivative >= 0, 
"Derivative of negative order %d requested.", derivative);
 
   24     scal_t f = -1.0/shape_/shape_;
 
   25     return std::exp(r2*f) * 
ipow(f, derivative);
 
   28 template <
class scal_t>
 
   29 template <
int dimension>
 
   31     scal_t f = -1.0/shape_/shape_;
 
   32     return (2*dimension*f + 4*r2*(f*f)) * std::exp(r2*f);
 
   38     return os << 
"Gaussian RBF with shape " << b.
shape();
 
   43 #endif  // MEDUSA_BITS_APPROXIMATIONS_GAUSSIAN_HPP_ 
 
 
Root namespace for the whole library.
scalar_t shape_
Shape parameter.
Scalar scalar_t
Type of the elements, alias of Scalar.
scalar_t shape() const
Returns shape parameter.
double ipow(double base)
Compile time integer power, returns base raised to power exponent.
std::ostream & operator<<(std::ostream &os, const Gaussian< S > &b)
Output basic information about given Gaussian RBF.
#define assert_msg(cond,...)
Assert with better error reporting.
Gaussian(scalar_t shape=1.0)
Creates a Gaussian RBF with shape parameter shape. The shape should be positive.
scalar_t operator()(scalar_t r2, int derivative) const
Evaluate derivative of this RBF wrt.
Gaussian Radial Basis Function.
Represents the Laplacian operator.