<commit_before>#pragma once
#include <cmath>

using std::max;
using std::abs;
using std::hypot;

namespace search
{
    template<typename Node>
    auto dy(Node const& node) -> Size
    {
        return abs(node.goal().y - node.coordinate().y);
    }
    template<typename Node>
    auto dx(Node const& node) -> Size
    {
        return abs(node.goal().x - node.coordinate().x);
    }

    template<typename Node> 
    struct Heuristc{};

    template<typename Node>
    struct ManhattanDistance : public Heuristc<Node>
    {
        auto operator()(Node const& node) const -> Size
        {
            return max(dy(node), dx(node));
        }
    }

    template<typename Node>
    struct EuclideanDinstance : public Heuristc<Node>
    {
        auto operator()(Node const& node) const -> Size
        {
            return static_cast<Size>(hypot(dy(node), dx(node)));
        }
    }
}//end of namespace
<commit_msg>Update func.hpp<commit_after>#pragma once
#include <cmath>

using std::max;
using std::abs;
using std::hypot;

namespace search
{
    template<typename Node>
    inline auto dy(Node const& node) -> Size
    {
        return abs(node.goal().y - node.coordinate().y);
    }
    template<typename Node>
    inline auto dx(Node const& node) -> Size
    {
        return abs(node.goal().x - node.coordinate().x);
    }

    template<typename Node> 
    struct Heuristc{};

    template<typename Node>
    struct ManhattanDistance : public Heuristc<Node>
    {
        auto operator()(Node const& node) const -> Size
        {
            return max(dy(node), dx(node));
        }
    }

    template<typename Node>
    struct EuclideanDinstance : public Heuristc<Node>
    {
        auto operator()(Node const& node) const -> Size
        {
            return static_cast<Size>(hypot(dy(node), dx(node)));
        }
    }
}//end of namespace

{'fraction_non_alphanumeric': 0.1286329386437029, 'fraction_numerical': 0.0, 'mean_word_length': 2.3861566484517303, 'pattern_counts': {'":': 0, '<': 21, '<?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': '1963166', 'n_tokens_mistral': 590, 'n_tokens_neox': 561, 'n_words': 141}