<commit_before>#include "alara.h"

#ifndef _MATRIX_H
#define _MATRIX_H

#include "Chains/Chain.h"

class Matrix
{
  friend void Chain::fillTMat(Matrix&, double, int);
  friend void Chain::setDecay(Matrix&, double);
  friend void Chain::mult(Matrix&, Matrix&, Matrix&);

protected:
  int size;
  double *data;

  void square();

public:
  Matrix() { size = 0; data = NULL; };
  Matrix(int);
  Matrix(const Matrix&);
  Matrix(double*,int);
  ~Matrix();

  Matrix operator*(const Matrix&);
  Matrix& operator*=(const Matrix&);
  Matrix operator^(int);
  Matrix& operator=(const Matrix&);
  double& operator[](int idx) { return data[idx]; };

  double rowSum(int);

};

#endif
<commit_msg>Added access function to get matrix size.<commit_after>#include "alara.h"

#ifndef _MATRIX_H
#define _MATRIX_H

#include "Chains/Chain.h"

class Matrix
{
  friend void Chain::fillTMat(Matrix&, double, int);
  friend void Chain::setDecay(Matrix&, double);
  friend void Chain::mult(Matrix&, Matrix&, Matrix&);

protected:
  int size;
  double *data;

  void square();

public:
  Matrix() { size = 0; data = NULL; };
  Matrix(int);
  Matrix(const Matrix&);
  Matrix(double*,int);
  ~Matrix();

  Matrix operator*(const Matrix&);
  Matrix& operator*=(const Matrix&);
  Matrix operator^(int);
  Matrix& operator=(const Matrix&);
  double& operator[](int idx) { return data[idx]; };

  int getSize() { return size; };

  double rowSum(int);

};

#endif

{'fraction_non_alphanumeric': 0.1612002791346825, 'fraction_numerical': 0.0013956734124214933, 'mean_word_length': 4.759036144578313, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6465545', 'n_tokens_mistral': 503, 'n_tokens_neox': 491, 'n_words': 132}