<commit_before>#ifndef SRC_MATVEC_H_
#define SRC_MATVEC_H_

#include <vector>
#include <ostream>
#include <initializer_list>

template<typename ElementType, unsigned DIM>
class MatVec {
private:
	std::vector<ElementType> m_vec;

  // make negative
	void neg();
public:
	MatVec();
	MatVec(ElementType element);
	MatVec(std::initializer_list<ElementType> args);
	MatVec(const MatVec<ElementType, DIM>& mec);
	MatVec(MatVec<ElementType, DIM> && mec);
	virtual ~MatVec();

	MatVec<ElementType, DIM>& operator =(const MatVec<ElementType, DIM>& mec);

	MatVec<ElementType, DIM>& operator =(MatVec<ElementType, DIM> && mec);

	friend void swap(MatVec<ElementType, DIM>& meca, MatVec<ElementType, DIM>& mecb) {
		std::swap(meca.m_vec, mecb.m_vec);
	}

	//Zugriff wie auf Array: matvec[i]
	ElementType& operator [](int i);
	const ElementType& operator [](int i) const;

	//Erlaubt iteration durch Vektor und daher range based for
	auto begin() -> decltype(m_vec.begin());<commit_msg>#include "units_typedef.h" zu MatVec.h hinzugefügt wird für sqrt() benötigt<commit_after>#ifndef SRC_MATVEC_H_
#define SRC_MATVEC_H_

#include <vector>
#include <ostream>
#include <initializer_list>

#include "units_typedef.h"

template<typename ElementType, unsigned DIM>
class MatVec {
private:
	std::vector<ElementType> m_vec;

  // make negative
	void neg();
public:
	MatVec();
	MatVec(ElementType element);
	MatVec(std::initializer_list<ElementType> args);
	MatVec(const MatVec<ElementType, DIM>& mec);
	MatVec(MatVec<ElementType, DIM> && mec);
	virtual ~MatVec();

	MatVec<ElementType, DIM>& operator =(const MatVec<ElementType, DIM>& mec);

	MatVec<ElementType, DIM>& operator =(MatVec<ElementType, DIM> && mec);

	friend void swap(MatVec<ElementType, DIM>& meca, MatVec<ElementType, DIM>& mecb) {
		std::swap(meca.m_vec, mecb.m_vec);
	}

	//Zugriff wie auf Array: matvec[i]
	ElementType& operator [](int i);
	const ElementType& operator [](int i) const;

	//Erlaubt iteration durch Vektor und daher range based for
	auto begin() -> decltype(m_vec.begin());
{'fraction_non_alphanumeric': 0.13984298331697742, 'fraction_numerical': 0.0, 'mean_word_length': 6.2562277580071175, 'pattern_counts': {'":': 0, '<': 31, '<?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': '5881434', 'n_tokens_mistral': 767, 'n_tokens_neox': 747, 'n_words': 185}