<commit_before>#pragma once
#include <algorithm>
#include <limits>
#include "spgLineCurvy.hpp"
#include "spgLine.hpp"

namespace libspgl1 {

template<typename MatrixType, typename VectorType>
struct Vectors {
	VectorType x, xBest, xOld, r, rOld, g, gOld, dx, b, lastFv;; //If I declare this first then the code breaks unless I run I compile it in debug mode...what sort of optimization is happening in release mode?

	Vectors(Parameters parameters, const MatrixType& A, const MatrixType& At, const VectorType& b, const VectorType &x0) :
		b{b},
		x{libspgl1::projectI<VectorType>(x0, parameters.tau)},
		r{libspgl1::initialization::compute_r(A, b, x)},
		g{libspgl1::initialization::compute_g(At, r)},
		dx{libspgl1::projectI<VectorType>(x-g, parameters.tau)-x},
		xOld{x}, rOld{r}, gOld{g},
		xBest{x},
		lastFv(3)
	{
		for (size_t i=0; i<libspgl1::vector::n_elem(lastFv) ; i++){
			libspgl1::vector::set_element<double>(lastFv, i, -std::numeric_limits<double>::max());
		}
	}
};

template<typename MatrixType, typename VectorType>
struct Quantities {
	double f, dxNorm, gStep, fBest, fOld, sigma, bNorm, tauOld;

	Quantities(const libspgl1::Vectors<MatrixType, VectorType> &vectors, Parameters parameters){<commit_msg>Release vs debug mode bug disappeared, everything is being initialized in the correct order and fixed typo.<commit_after>#pragma once
#include <algorithm>
#include <limits>
#include "spgLineCurvy.hpp"
#include "spgLine.hpp"

namespace libspgl1 {

template<typename MatrixType, typename VectorType>
struct Vectors {
	VectorType b, x, r, g, dx, xOld, rOld, gOld, xBest, lastFv;

	Vectors(Parameters parameters, const MatrixType& A, const MatrixType& At, const VectorType& b, const VectorType &x0) :
		b{b},
		x{libspgl1::projectI<VectorType>(x0, parameters.tau)},
		r{libspgl1::initialization::compute_r(A, b, x)},
		g{libspgl1::initialization::compute_g(At, r)},
		dx{libspgl1::projectI<VectorType>(x-g, parameters.tau)-x},
		xOld{x}, rOld{r}, gOld{g},
		xBest{x},
		lastFv(3)
	{
		for (size_t i=0; i<libspgl1::vector::n_elem(lastFv) ; i++){
			libspgl1::vector::set_element<double>(lastFv, i, -std::numeric_limits<double>::max());
		}
	}
};

template<typename MatrixType, typename VectorType>
struct Quantities {
	double f, dxNorm, gStep, fBest, fOld, sigma, bNorm, tauOld;

	Quantities(const libspgl1::Vectors<MatrixType, VectorType> &vectors, Parameters parameters){
{'fraction_non_alphanumeric': 0.1444723618090452, 'fraction_numerical': 0.010050251256281407, 'mean_word_length': 6.442367601246106, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 21, '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': '4304017', 'n_tokens_mistral': 899, 'n_tokens_neox': 860, 'n_words': 215}