<commit_before>/*

    Copyright <NAME> and <NAME>, 2013

    This file is part of Lasercake.

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

    Lasercake 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 Affero General Public License for more details.

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

*/

#ifndef LASERCAKE_MOVING_BBOX_COLLISION_DETECTOR_HPP__
#define LASERCAKE_MOVING_BBOX_COLLISION_DETECTOR_HPP__

#include "geometry.hpp"


namespace moving_bbox_collision_detector_internals {

const size_t MIN_NICE_NODE_SIZE = 2;

typedef int object_id;
//typedef lint64_t time_int_type;
typedef lint32_t time_int_type;
typedef non_normalized_rational<time_int_type> time_type;
//typedef faux_optional<time_type> optional_time;
typedef boost::random::uniform_int_distribution<int64_t> uniform_random;

template <int NumDimensions>
struct bbox {
  array<int64_t, NumDimensions> min;
  array<int64_t, NumDimensions> max;

  bbox combined_with(bbox const& o)const {
    bbox result;
    for (int dim = 0; dim < NumDimensions; ++dim) {
      result.max[dim] = std::max(max[dim], o.max[dim]);
      result.min[dim] = std::min(min[dim], o.min[dim]);
    }
    return result;
  }
  bbox plus_nontrivially_including(bbox const& o)const {
    bbox result;
    for (int dim = 0; dim < NumDimensions; ++dim) {
      result.max[dim] = std::max(max[dim], o.max[dim] + 1);
      result.min[dim] = std::min(min[dim], o.min[dim] - 1);
    }
    return result;
  }
  bbox outset()const {
    bbox result;
    for (int dim = 0; dim < NumDimensions; ++dim) {
      result.max[dim] = max[dim] + 1;
      result.min[dim] = min[dim] - 1;
    }
    return result;<commit_msg>delete unused typedef of a deprecated-for-us type<commit_after>/*

    Copyright <NAME> and <NAME>, 2013

    This file is part of Lasercake.

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

    Lasercake 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 Affero General Public License for more details.

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

*/

#ifndef LASERCAKE_MOVING_BBOX_COLLISION_DETECTOR_HPP__
#define LASERCAKE_MOVING_BBOX_COLLISION_DETECTOR_HPP__

#include "geometry.hpp"


namespace moving_bbox_collision_detector_internals {

const size_t MIN_NICE_NODE_SIZE = 2;

typedef int object_id;
//typedef lint64_t time_int_type;
typedef lint32_t time_int_type;
typedef non_normalized_rational<time_int_type> time_type;
//typedef faux_optional<time_type> optional_time;

template <int NumDimensions>
struct bbox {
  array<int64_t, NumDimensions> min;
  array<int64_t, NumDimensions> max;

  bbox combined_with(bbox const& o)const {
    bbox result;
    for (int dim = 0; dim < NumDimensions; ++dim) {
      result.max[dim] = std::max(max[dim], o.max[dim]);
      result.min[dim] = std::min(min[dim], o.min[dim]);
    }
    return result;
  }
  bbox plus_nontrivially_including(bbox const& o)const {
    bbox result;
    for (int dim = 0; dim < NumDimensions; ++dim) {
      result.max[dim] = std::max(max[dim], o.max[dim] + 1);
      result.min[dim] = std::min(min[dim], o.min[dim] - 1);
    }
    return result;
  }
  bbox outset()const {
    bbox result;
    for (int dim = 0; dim < NumDimensions; ++dim) {
      result.max[dim] = max[dim] + 1;
      result.min[dim] = min[dim] - 1;
    }
    return result;
{'fraction_non_alphanumeric': 0.09568122166547363, 'fraction_numerical': 0.010498687664041995, 'mean_word_length': 3.742081447963801, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 20, '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': '4037006', 'n_tokens_mistral': 1475, 'n_tokens_neox': 1384, 'n_words': 432}