<commit_before>#ifndef DTK_COMPACTLY_SUPPORTED_RADIAL_BASIS_FUNCTIONS_HPP
#define DTK_COMPACTLY_SUPPORTED_RADIAL_BASIS_FUNCTIONS_HPP

namespace DataTransferKit
{

template <typename RBF>
class RadialBasisFunction
{
  public:
    KOKKOS_FUNCTION
    RadialBasisFunction( double radius )
        : _radius( radius )
    {
    }
    KOKKOS_INLINE_FUNCTION double operator()( double x ) const
    {
        return _rbf( x / _radius );
    }

  private:
    double _radius;
    RBF _rbf;
};

KOKKOS_INLINE_FUNCTION double heaviside( double x )
{
    return x >= 0 ? 1.0 : 0.0;
}

template <int k>
struct Wendland;

template <>
struct Wendland<0>
{
    KOKKOS_INLINE_FUNCTION double operator()( double x ) const
    {
        return ( 1.0 - x ) * ( 1.0 - x );
    }
};

template <>
struct Wendland<2>
{
    KOKKOS_INLINE_FUNCTION double operator()( double x ) const
    {
        return ( 1.0 - x ) * ( 1.0 - x ) * ( 1.0 - x ) * ( 1.0 - x ) *
               ( 4.0 * x + 1.0 );
    }
};

template <>
struct Wendland<4>
{
    KOKKOS_INLINE_FUNCTION double operator()( double x ) const
    {<commit_msg>Remove unused heaviside function<commit_after>#ifndef DTK_COMPACTLY_SUPPORTED_RADIAL_BASIS_FUNCTIONS_HPP
#define DTK_COMPACTLY_SUPPORTED_RADIAL_BASIS_FUNCTIONS_HPP

namespace DataTransferKit
{

template <typename RBF>
class RadialBasisFunction
{
  public:
    KOKKOS_FUNCTION
    RadialBasisFunction( double radius )
        : _radius( radius )
    {
    }
    KOKKOS_INLINE_FUNCTION double operator()( double x ) const
    {
        return _rbf( x / _radius );
    }

  private:
    double _radius;
    RBF _rbf;
};

template <int k>
struct Wendland;

template <>
struct Wendland<0>
{
    KOKKOS_INLINE_FUNCTION double operator()( double x ) const
    {
        return ( 1.0 - x ) * ( 1.0 - x );
    }
};

template <>
struct Wendland<2>
{
    KOKKOS_INLINE_FUNCTION double operator()( double x ) const
    {
        return ( 1.0 - x ) * ( 1.0 - x ) * ( 1.0 - x ) * ( 1.0 - x ) *
               ( 4.0 * x + 1.0 );
    }
};

template <>
struct Wendland<4>
{
    KOKKOS_INLINE_FUNCTION double operator()( double x ) const
    {
{'fraction_non_alphanumeric': 0.1071260028315243, 'fraction_numerical': 0.020292590844738084, 'mean_word_length': 2.6363636363636362, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2370771', 'n_tokens_mistral': 813, 'n_tokens_neox': 768, 'n_words': 177}