<commit_before>/*
 * skew_symmetric_iterator.h
 *
 * Headers for the SkewSymmetricIterator class.
 *
 * The iterator goes over all matrices of a certain size retruning all possible
 * matrices with values between -2 and 2.
 */
#pragma once

#include <memory>

#include "equiv_quiver_matrix.h"

namespace cluster {
	class SkewSymmetricIterator {

		private:
			typedef EquivQuiverMatrix M;
			typedef typename std::shared_ptr<M> MPtr;

		public:
			SkewSymmetricIterator(const int size);

			bool has_next() const;
			MPtr next();

		private:
			IntMatrix matrix_;
			int col_comp_;
			int index_;
			int num_vars_;
			int max_;

			int ipow(int x, int p) const;
			int num_vars(int size) const;

	};
}
<commit_msg>Adds documentation to the iterator header.<commit_after>/*
 * skew_symmetric_iterator.h
 *
 * Headers for the SkewSymmetricIterator class.
 *
 * The iterator goes over all matrices of a certain size retruning all possible
 * matrices with values between -2 and 2.
 */
#pragma once

#include <memory>

#include "equiv_quiver_matrix.h"

namespace cluster {
	class SkewSymmetricIterator {

		private:
			typedef EquivQuiverMatrix M;
			typedef typename std::shared_ptr<M> MPtr;

		public:
			/** 
			 * Create a new iterator which provides all skew-symmetri matrices of the
			 * specified size.
			 * @param size Size of matrices to return
			 */
			SkewSymmetricIterator(const int size);
			/**
			 * Check whether there is a next matrix to take from the iterator.
			 * @return true if next() will return a valid matrix
			 */
			bool has_next() const;
			/**
			 * Get the next matrix from the iterator.
			 * @return next matrix
			 */
			MPtr next();

		private:
			/** Matrix holding the next to return. */
			IntMatrix matrix_;
			/** Index that the col index cannot exceed. */
			int col_comp_;
			/** Current index of which matrix will be returned next. */
			int index_;
			/** Number of variable entries in the matrix which need to be set. */
			int num_vars_;
			/** Max value that index_ can take. */
			int max_;

			/** Calculate x^p. */
			int ipow(int x, int p) const;
			/** Calculate the number of variables in the matrix. */
			int num_vars(int size) const;

	};
}

{'fraction_non_alphanumeric': 0.08875739644970414, 'fraction_numerical': 0.0018206645425580337, 'mean_word_length': 3.055350553505535, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4419627', 'n_tokens_mistral': 787, 'n_tokens_neox': 648, 'n_words': 257}