<commit_before>#include <Core/Containers/Tex.hpp>
#include <Core/Math/LinearAlgebra.hpp>
#include <Core/Math/Types.hpp>

namespace Ra {
namespace Core {

// Helper functions
namespace {
// This is a helper class for the texture fetch implementation. This interpolate linear
// interpolation from values at a corner of a grid.
template <uint N>
struct NLinearInterpolator {
    template <typename T>
    static T interpolate(
        const Grid<T, N>& grid,                    // grid from which values are read
        const typename Tex<T, N>::Vector& fact,    // factors of the interpolation (between 0 and 1)
        const typename Tex<T, N>::IdxVector& size, // size of the  dual grid
        const typename Tex<T, N>::IdxVector& clamped_nearest ) // base indices of the cell
    {
        CORE_ERROR( "N-linear interpolation not implemented for N= " << N );
        return T();
    }
};

template <>
struct NLinearInterpolator<2> {
    // bilinear interpolation in a quad cell
    template <typename T>
    static T interpolate( const Grid<T, 2>& grid, const Vector2& fact, const Vector2ui& size,
                          const Vector2ui& clamped_nearest ) {
        const uint i0 = clamped_nearest[0];<commit_msg>Fix include path in Tex.inl ;<commit_after>#include <Core/Containers/Tex.hpp>
#include <Core/Math/LinearAlgebra.hpp>
#include <Core/Types.hpp>

namespace Ra {
namespace Core {

// Helper functions
namespace {
// This is a helper class for the texture fetch implementation. This interpolate linear
// interpolation from values at a corner of a grid.
template <uint N>
struct NLinearInterpolator {
    template <typename T>
    static T interpolate(
        const Grid<T, N>& grid,                    // grid from which values are read
        const typename Tex<T, N>::Vector& fact,    // factors of the interpolation (between 0 and 1)
        const typename Tex<T, N>::IdxVector& size, // size of the  dual grid
        const typename Tex<T, N>::IdxVector& clamped_nearest ) // base indices of the cell
    {
        CORE_ERROR( "N-linear interpolation not implemented for N= " << N );
        return T();
    }
};

template <>
struct NLinearInterpolator<2> {
    // bilinear interpolation in a quad cell
    template <typename T>
    static T interpolate( const Grid<T, 2>& grid, const Vector2& fact, const Vector2ui& size,
                          const Vector2ui& clamped_nearest ) {
        const uint i0 = clamped_nearest[0];
{'fraction_non_alphanumeric': 0.09506323949408405, 'fraction_numerical': 0.0073439412484700125, 'mean_word_length': 2.8193146417445485, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 29, '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': '1332979', 'n_tokens_mistral': 715, 'n_tokens_neox': 680, 'n_words': 266}