<commit_before>#include "BlockMatching.h"




// ----- Miscellaneous -----
template <>
void
BlockMatching<ImgClass::RGB>::image_normalizer(void)
{
	// Previous
	double max_int = .0;
	for (int i = 0; i < _width * _height; i++) {
		if (norm(_image_prev[i]) > max_int) {
			max_int = norm(_image_prev[i]);
		}
	}
	if (max_int > 1.0) {
		_image_prev /= max_int;
	}
	// Current
	max_int = .0;
	for (int i = 0; i < _width * _height; i++) {
		if (norm(_image_current[i]) > max_int) {
			max_int = norm(_image_current[i]);
		}
	}
	if (max_int > 1.0) {
		_image_current /= max_int;
	}
	// Next
	max_int = .0;
	for (int i = 0; i < _image_next.size(); i++) {
		if (norm(_image_next[i]) > max_int) {
			max_int = norm(_image_next[i]);
		}
	}
	if (max_int > 1.0) {
		_image_next /= max_int;
	}
}

template <>
void
BlockMatching<ImgClass::Lab>::image_normalizer(void)
{
	// Previous
	double max_int = .0;
	for (int i = 0; i < _width * _height; i++) {
		if (norm(_image_prev[i]) > max_int) {
			max_int = norm(_image_prev[i]);
		}
	}
	if (max_int > 1.0) {
		_image_prev /= max_int;
	}
	// Current
	max_int = .0;
	for (int i = 0; i < _width * _height; i++) {
		if (norm(_image_current[i]) > max_int) {
			max_int = norm(_image_current[i]);
		}
	}
	if (max_int > 1.0) {
		_image_current /= max_int;
	}
	// Next
	max_int = .0;
	for (int i = 0; i < _image_next.size(); i++) {
		if (norm(_image_next[i]) > max_int) {
			max_int = norm(_image_next[i]);
		}
	}<commit_msg>Change type of some variables to size_t<commit_after>#include "BlockMatching.h"




// ----- Miscellaneous -----
template <>
void
BlockMatching<ImgClass::RGB>::image_normalizer(void)
{
	// Previous
	double max_int = .0;
	for (size_t i = 0; i < _image_prev.size(); i++) {
		if (norm(_image_prev[i]) > max_int) {
			max_int = norm(_image_prev[i]);
		}
	}
	if (max_int > 1.0) {
		_image_prev /= max_int;
	}
	// Current
	max_int = .0;
	for (size_t i = 0; i < _image_current.size(); i++) {
		if (norm(_image_current[i]) > max_int) {
			max_int = norm(_image_current[i]);
		}
	}
	if (max_int > 1.0) {
		_image_current /= max_int;
	}
	// Next
	max_int = .0;
	for (size_t i = 0; i < _image_next.size(); i++) {
		if (norm(_image_next[i]) > max_int) {
			max_int = norm(_image_next[i]);
		}
	}
	if (max_int > 1.0) {
		_image_next /= max_int;
	}
}

template <>
void
BlockMatching<ImgClass::Lab>::image_normalizer(void)
{
	// Previous
	double max_int = .0;
	for (size_t i = 0; i < _image_prev.size(); i++) {
		if (norm(_image_prev[i]) > max_int) {
			max_int = norm(_image_prev[i]);
		}
	}
	if (max_int > 1.0) {
		_image_prev /= max_int;
	}
	// Current
	max_int = .0;
	for (size_t i = 0; i < _image_current.size(); i++) {
		if (norm(_image_current[i]) > max_int) {
			max_int = norm(_image_current[i]);
		}
	}
	if (max_int > 1.0) {
		_image_current /= max_int;
	}
	// Next
	max_int = .0;
	for (size_t i = 0; i < _image_next.size(); i++) {
		if (norm(_image_next[i]) > max_int) {
			max_int = norm(_image_next[i]);
		}
	}
{'fraction_non_alphanumeric': 0.18999323867478027, 'fraction_numerical': 0.014874915483434753, 'mean_word_length': 3.150070126227209, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 33, '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': '4692556', 'n_tokens_mistral': 1413, 'n_tokens_neox': 1315, 'n_words': 262}