<commit_before>
/* ---------------------------------------------------------------------
 * Numenta Platform for Intelligent Computing (NuPIC)
 * Copyright (C) 2013, Numenta, Inc.  Unless you have an agreement
 * with Numenta, Inc., for a separate license for this software code, the
 * following terms and conditions apply:
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * 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.
 *
 * http://numenta.org/licenses/
 * ---------------------------------------------------------------------
 */

#ifndef NTA_DIMENSIONS_HPP
#define NTA_DIMENSIONS_HPP

#include <vector>
#include <sstream>

namespace nta
{
  /**
   * @typedef Coordinate
   * 
   * A coordinate is a single point in an n-dimensional
   * grid described by a Dimensions object. 
   *
   * @internal
   *  
   * Because a vector of a basic type can be directly wrapped
   * by swig, we do not need a separate class. 
   *
   * @endinternal
   */
  typedef std::vector<size_t> Coordinate;

  /**
   * A Dimensions object represents the dimensions of a Region.
   *
   * A Dimensions object is an n-dimensional grid, consists of many cells, and 
   * each dimension has a size, i.e. how many cells can there be along this dimension. 
   * 
   * A node within a Region is represented by a cell of a n-dimensional grid,
   * identified by a Coordinate.
   *
   * It's implemented by a @c vector of @c size_t plus a few methods for 
   * convenience and for wrapping.
   *
   * @nosubgrouping
   *
   */
  class Dimensions : public std::vector<size_t>
  {
  public:
    /** <commit_msg>Improve the documentation of Coordinate<commit_after>
/* ---------------------------------------------------------------------
 * Numenta Platform for Intelligent Computing (NuPIC)
 * Copyright (C) 2013, Numenta, Inc.  Unless you have an agreement
 * with Numenta, Inc., for a separate license for this software code, the
 * following terms and conditions apply:
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * 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.
 *
 * http://numenta.org/licenses/
 * ---------------------------------------------------------------------
 */

#ifndef NTA_DIMENSIONS_HPP
#define NTA_DIMENSIONS_HPP

#include <vector>
#include <sstream>

namespace nta
{
  /**
   * @typedef Coordinate
   * 
   * A Coordinate is the location of a single cell in an n-dimensional
   * grid described by a Dimensions object.
   *
   * It's a direct @c typedef, so it has the exactly the same interface as 
   * @c std::vector<size_t> . A value with the index of `i` in the vector 
   * represents the location of the cell along the `i`th dimension.
   *
   * @note It must have the same number of dimensions as its corresponding 
   * Dimensions object.
   *
   * @internal
   *  
   * Because a vector of a basic type can be directly wrapped
   * by swig, we do not need a separate class. 
   *
   * @endinternal
   */
  typedef std::vector<size_t> Coordinate;

  /**
   * A Dimensions object represents the dimensions of a Region.
   *
   * A Dimensions object is an n-dimensional grid, consists of many cells, and 
   * each dimension has a size, i.e. how many cells can there be along this dimension. 
   * 
   * A node within a Region is represented by a cell of a n-dimensional grid,
   * identified by a Coordinate.
   *
   * It's implemented by a @c vector of @c size_t plus a few methods for 
   * convenience and for wrapping.
   *
   * @nosubgrouping
   *
   */
  class Dimensions : public std::vector<size_t>
  {
  public:
    /** 
{'fraction_non_alphanumeric': 0.1290824261275272, 'fraction_numerical': 0.002221728504776716, 'mean_word_length': 2.426179604261796, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '2206013', 'n_tokens_mistral': 1246, 'n_tokens_neox': 1193, 'n_words': 563}