<commit_before>#include <iostream>

#include "matrix.h"
#include "checks.h"




template<std::size_t NumberOfRows, std::size_t NumberOfCulomns>
std::size_t TestMatrixAssign() {
	AMatrix::Matrix<double, NumberOfRows,NumberOfCulomns> a_matrix;
	AMatrix::Matrix<double, NumberOfRows,NumberOfCulomns> b_matrix;
	for (std::size_t i = 0; i < a_matrix.size1(); i++)
		for (std::size_t j = 0; j < a_matrix.size2(); j++)
			a_matrix(i, j) =  2.33 * i - 4.52 * j;

	b_matrix = a_matrix;
	
	for (std::size_t i = 0; i < a_matrix.size1(); i++)
		for (std::size_t j = 0; j < a_matrix.size2(); j++)
			AMATRIX_CHECK_EQUAL(b_matrix(i,j), 2.33 * i - 4.52 * j);

	return 0; // not failed
}


int main()
{
	std::size_t number_of_failed_tests = 0;
	number_of_failed_tests += TestMatrixAssign<1,1>();

	number_of_failed_tests += TestMatrixAssign<1,2>();
	number_of_failed_tests += TestMatrixAssign<2,1>();
	number_of_failed_tests += TestMatrixAssign<2,2>();

	number_of_failed_tests += TestMatrixAssign<3,1>();
	number_of_failed_tests += TestMatrixAssign<3,2>();
	number_of_failed_tests += TestMatrixAssign<3,3>();
	number_of_failed_tests += TestMatrixAssign<1,3>();
	number_of_failed_tests += TestMatrixAssign<2,3>();
	number_of_failed_tests += TestMatrixAssign<3,3>();

	std::cout << number_of_failed_tests << "tests failed" << std::endl;

	return number_of_failed_tests;
}
<commit_msg>Adding zero matrix assign test<commit_after>#include <iostream>

#include "matrix.h"
#include "checks.h"




template<std::size_t TSize1, std::size_t TSize2>
std::size_t TestZeroMatrixAssign() {
	AMatrix::Matrix<double, TSize1,TSize2> a_matrix;
	a_matrix = AMatrix::ZeroMatrix<double, TSize1, TSize2>();
	
	for (std::size_t i = 0; i < a_matrix.size1(); i++)
		for (std::size_t j = 0; j < a_matrix.size2(); j++)
			AMATRIX_CHECK_EQUAL(a_matrix(i,j), 0.00);

	return 0; // not failed
}

template<std::size_t TSize1, std::size_t TSize2>
std::size_t TestMatrixAssign() {
	AMatrix::Matrix<double, TSize1,TSize2> a_matrix;
	AMatrix::Matrix<double, TSize1,TSize2> b_matrix;
	for (std::size_t i = 0; i < a_matrix.size1(); i++)
		for (std::size_t j = 0; j < a_matrix.size2(); j++)
			a_matrix(i, j) =  2.33 * i - 4.52 * j;

	b_matrix = a_matrix;
	
	for (std::size_t i = 0; i < a_matrix.size1(); i++)
		for (std::size_t j = 0; j < a_matrix.size2(); j++)
			AMATRIX_CHECK_EQUAL(b_matrix(i,j), 2.33 * i - 4.52 * j);

	return 0; // not failed
}


int main()
{
	std::size_t number_of_failed_tests = 0;
	number_of_failed_tests += TestZeroMatrixAssign<1,1>();

	number_of_failed_tests += TestZeroMatrixAssign<1,2>();
	number_of_failed_tests += TestZeroMatrixAssign<2,1>();
	number_of_failed_tests += TestZeroMatrixAssign<2,2>();

	number_of_failed_tests += TestZeroMatrixAssign<3,1>();
	number_of_failed_tests += TestZeroMatrixAssign<3,2>();
	number_of_failed_tests += TestZeroMatrixAssign<3,3>();
	number_of_failed_tests += TestZeroMatrixAssign<1,3>();
	number_of_failed_tests += TestZeroMatrixAssign<2,3>();
	number_of_failed_tests += TestZeroMatrixAssign<3,3>();

	number_of_failed_tests += TestMatrixAssign<1,1>();

	number_of_failed_tests += TestMatrixAssign<1,2>();
	number_of_failed_tests += TestMatrixAssign<2,1>();
	number_of_failed_tests += TestMatrixAssign<2,2>();

	number_of_failed_tests += TestMatrixAssign<3,1>();
	number_of_failed_tests += TestMatrixAssign<3,2>();
	number_of_failed_tests += TestMatrixAssign<3,3>();
	number_of_failed_tests += TestMatrixAssign<1,3>();
	number_of_failed_tests += TestMatrixAssign<2,3>();
	number_of_failed_tests += TestMatrixAssign<3,3>();

	std::cout << number_of_failed_tests << "tests failed" << std::endl;

	return number_of_failed_tests;
}

{'fraction_non_alphanumeric': 0.16213991769547326, 'fraction_numerical': 0.03401920438957476, 'mean_word_length': 6.517525773195876, 'pattern_counts': {'":': 0, '<': 66, '<?xml version=': 0, '>': 44, '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': '1753799', 'n_tokens_mistral': 1482, 'n_tokens_neox': 1397, 'n_words': 247}