<commit_before>/*
VROOM (Vehicle Routing Open-source Optimization Machine)
Copyright (C) 2015, <NAME>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef MATRIX_H
#define MATRIX_H
#include <iostream>
#include <vector>
#include "./typedefs.h"
#include "../utils/exceptions.h"

template <class T>
class line: private std::vector<T>{

  using parent = std::vector<T>;

public:
  using parent::size;
  using parent::operator[];

  line(std::size_t n) : parent(n) {
  }
};

template <class T>
class matrix : private std::vector<line<T>>{
  
  using parent = std::vector<line<T>>;
  
 public:
  using parent::size;
  using parent::operator[];
  
  matrix(std::size_t n): 
    parent(n, line<T>(n)){
  }
  
  void print() const{
    for(std::size_t i = 0; i < this->size(); ++i){
      for(std::size_t j = 0; j < (*this)[i].size(); ++i){
        std::cout << (*this)[i][j] << " ; ";
      }
      std::cout << std::endl;
    }
  }<commit_msg>Typo in matrix print function.<commit_after>/*
VROOM (Vehicle Routing Open-source Optimization Machine)
Copyright (C) 2015, <NAME>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef MATRIX_H
#define MATRIX_H
#include <iostream>
#include <vector>
#include "./typedefs.h"
#include "../utils/exceptions.h"

template <class T>
class line: private std::vector<T>{

  using parent = std::vector<T>;

public:
  using parent::size;
  using parent::operator[];

  line(std::size_t n) : parent(n) {
  }
};

template <class T>
class matrix : private std::vector<line<T>>{
  
  using parent = std::vector<line<T>>;
  
 public:
  using parent::size;
  using parent::operator[];
  
  matrix(std::size_t n): 
    parent(n, line<T>(n)){
  }
  
  void print() const{
    for(std::size_t i = 0; i < this->size(); ++i){
      for(std::size_t j = 0; j < (*this)[i].size(); ++j){
        std::cout << (*this)[i][j] << " ; ";
      }
      std::cout << std::endl;
    }
  }
{'fraction_non_alphanumeric': 0.13163972286374134, 'fraction_numerical': 0.004618937644341801, 'mean_word_length': 3.8434504792332267, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7356389', 'n_tokens_mistral': 982, 'n_tokens_neox': 952, 'n_words': 360}