<commit_before>#ifndef VECTOR_H
#define VECTOR_H

#include "common.h"

#include <vector>
#include <math.h>


using namespace std;


////////////////////////////////////////////////////////////////////////////////
template <class T>
class vec2
{
    public:
        
        vec2(const T x_ = 0, const T y_ = 0) : x(x_), y(y_) {};
    
        const T abs() const {
            return sqrt(x * x + y * y);
        }
    
        const bool operator == (const vec2<T>& v) const {
            return x == v.x && y == v.y;
        }

        const bool operator != (const vec2<T>& v) const {
            return !(*this == v);
        }
    
        const bool operator < (const vec2<T>& v) const {
            return this->abs() < v.abs();
        }
    
        const bool operator > (const vec2<T>& v) const {
            return this->abs() > v.abs();
        }
        
        const vec2<T> operator + (const vec2<T>& v) const {
            return vec2<T>(x + v.x, y + v.y);
        }
    
        const vec2<T> operator - (const vec2<T>& v) const {
            return vec2<T>(x - v.x, y - v.y);
        }
    
        friend ostream& operator << (ostream& out, const vec2<T>& v) {
            out << "(" << v.x << ", " << v.y << ")";
            return out;
        }
    
        T x;
        T y;
};


typedef vec2<int> vec2i;


#endif
<commit_msg>fix ball set by introducing custom vector hash map<commit_after>#ifndef VECTOR_H
#define VECTOR_H

#include "common.h"

#include <vector>
#include <math.h>


using namespace std;


////////////////////////////////////////////////////////////////////////////////
template <class T>
class vec2
{
    public:
        
        vec2(const T x_ = 0, const T y_ = 0) : x(x_), y(y_) {};
    
        const T abs() const {
            return sqrt(x * x + y * y);
        }
    
        const bool operator == (const vec2<T>& v) const {
            return x == v.x && y == v.y;
        }

        const bool operator != (const vec2<T>& v) const {
            return !(*this == v);
        }
    
        const vec2<T> operator + (const vec2<T>& v) const {
            return vec2<T>(x + v.x, y + v.y);
        }
    
        const vec2<T> operator - (const vec2<T>& v) const {
            return vec2<T>(x - v.x, y - v.y);
        }
    
        friend ostream& operator << (ostream& out, const vec2<T>& v) {
            out << "(" << v.x << ", " << v.y << ")";
            return out;
        }
    
        T x;
        T y;
};


////////////////////////////////////////////////////////////////////////////////
typedef vec2<int> vec2i;


////////////////////////////////////////////////////////////////////////////////
template<>
struct hash<vec2i> {
    size_t operator()(vec2i const & v) const noexcept {
        return 51 * (51 + std::hash<int>()(v.x)) + std::hash<int>()(v.y);
    }
};


#endif

{'fraction_non_alphanumeric': 0.25193525686136525, 'fraction_numerical': 0.013370865587614356, 'mean_word_length': 1.1619771863117871, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 39, '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': '5349412', 'n_tokens_mistral': 915, 'n_tokens_neox': 890, 'n_words': 252}