<commit_before>#pragma once

#include <float.h>
#include <math.h>
#include <iostream>

namespace d2d
{
	class Vector
	{
	public:
		Vector() : x(0), y(0) {}
		Vector(float x, float y) : x(x), y(y) {}
		Vector(int x, int y) : x(static_cast<float>(x)), y(static_cast<float>(y)) {}
		Vector(const Vector& p) : x(p.x), y(p.y) {}

		Vector& operator = (const Vector& p) {
			x = p.x;
			y = p.y;
			return *this;
		}

		void setInvalid() { x = y = FLT_MAX; }
		bool isValid() const { return x != FLT_MAX && y != FLT_MAX; }

		void set(float _x, float _y) { x = _x; y = _y; }

		bool operator != (const Vector& v) const
		{
			return x != v.x || y != v.y;
		}
		bool operator == (const Vector& v) const
		{
			return x == v.x && y == v.y;
		}

		void operator += (const Vector& v)
		{<commit_msg>[CHANGED] vector invalid的定义<commit_after>#pragma once

#include <float.h>
#include <math.h>
#include <iostream>

static const float FLT_INVALID = FLT_INVALID;

namespace d2d
{
	class Vector
	{
	public:
		Vector() : x(0), y(0) {}
		Vector(float x, float y) : x(x), y(y) {}
		Vector(int x, int y) : x(static_cast<float>(x)), y(static_cast<float>(y)) {}
		Vector(const Vector& p) : x(p.x), y(p.y) {}

		Vector& operator = (const Vector& p) {
			x = p.x;
			y = p.y;
			return *this;
		}

		void setInvalid() { x = y = FLT_INVALID; }
		bool isValid() const { return x != FLT_INVALID && y != FLT_INVALID; }

		void set(float _x, float _y) { x = _x; y = _y; }

		bool operator != (const Vector& v) const
		{
			return x != v.x || y != v.y;
		}
		bool operator == (const Vector& v) const
		{
			return x == v.x && y == v.y;
		}

		void operator += (const Vector& v)
		{
{'fraction_non_alphanumeric': 0.18534221683827984, 'fraction_numerical': 0.0036341611144760752, 'mean_word_length': 2.9711538461538463, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '4882971', 'n_tokens_mistral': 743, 'n_tokens_neox': 678, 'n_words': 193}