<commit_before>/*
 * reflection_table.h
 *
 *  Copyright (C) 2013 Diamond Light Source
 *
 *  Author: <NAME>
 *
 *  This code is distributed under the BSD license, a copy of which is
 *  included in the root directory of this package.
 */
#ifndef DIALS_ARRAY_FAMILY_REFLECTION_TABLE_H
#define DIALS_ARRAY_FAMILY_REFLECTION_TABLE_H

#include <dials/array_family/flex_table.h>
#include <dials/model/data/shoebox.h>
#include <scitbx/array_family/tiny_types.h>
#include <scitbx/mat3.h>
#include <scitbx/vec3.h>
#include <scitbx/vec2.h>
#include <cctbx/miller.h>

namespace dials { namespace af {

  using scitbx::vec2;
  using scitbx::vec3;
  using scitbx::mat3;
  using scitbx::af::int6;
  using model::Shoebox;


  template <> inline
  vec2<double> init_zero< vec2<double> >() {
    return vec2<double>(0.0,0.0);
  }

  template <> inline
  vec3<double> init_zero< vec3<double> >() {
    return vec3<double>(0.0,0.0,0.0);
  }

  template <> inline
  mat3<double> init_zero< mat3<double> >() {
    return mat3<double>(0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
  }

  template <> inline
  int6 init_zero<int6>() {
    return int6(0,0,0,0,0,0);
  }

  template <> inline
  cctbx::miller::index<> init_zero< cctbx::miller::index<> >() {
    return cctbx::miller::index<>(0,0,0);
  }


  typedef flex_type_generator<
    bool,
    int,
    std::size_t,
    double,
    std::string,
    vec2<double>,
    vec3<double>,
    mat3<double>,
    int6,
    cctbx::miller::index<>,
    Shoebox<>
  > reflection_table_type_generator;

  typedef reflection_table_type_generator::type reflection_table_types;


  class reflection_table : public flex_table<reflection_table_types> {
  public:

    typedef flex_table<reflection_table_types>::map_type map_type;
    typedef flex_table<reflection_table_types>::key_type key_type;
    typedef flex_table<reflection_table_types>::mapped_type mapped_type;
    typedef flex_table<reflection_table_types>::map_value_type map_value_type;
    typedef flex_table<reflection_table_types>::iterator iterator;
    typedef flex_table<reflection_table_types>::const_iterator const_iterator;
    typedef flex_table<reflection_table_types>::size_type size_type;
    typedef std::map<std::size_t, std::string> experiment_map_type;

    reflection_table()
      : flex_table(),
        experiment_identifiers_(boost::make_shared<experiment_map_type>()) {}

    reflection_table(size_type n)
      : flex_table(n),
        experiment_identifiers_(boost::make_shared<experiment_map_type>()) {}

    boost::shared_ptr<experiment_map_type> experiment_identifiers() {
      return experiment_identifiers_;
    }

  protected:

    boost::shared_ptr<experiment_map_type> experiment_identifiers_;

  };

  enum Flags {
<commit_msg>Fixed for compile error on RHEL6<commit_after>/*
 * reflection_table.h
 *
 *  Copyright (C) 2013 Diamond Light Source
 *
 *  Author: <NAME>
 *
 *  This code is distributed under the BSD license, a copy of which is
 *  included in the root directory of this package.
 */
#ifndef DIALS_ARRAY_FAMILY_REFLECTION_TABLE_H
#define DIALS_ARRAY_FAMILY_REFLECTION_TABLE_H

#include <dials/array_family/flex_table.h>
#include <dials/model/data/shoebox.h>
#include <scitbx/array_family/tiny_types.h>
#include <scitbx/mat3.h>
#include <scitbx/vec3.h>
#include <scitbx/vec2.h>
#include <cctbx/miller.h>

namespace dials { namespace af {

  using scitbx::vec2;
  using scitbx::vec3;
  using scitbx::mat3;
  using scitbx::af::int6;
  using model::Shoebox;


  template <> inline
  vec2<double> init_zero< vec2<double> >() {
    return vec2<double>(0.0,0.0);
  }

  template <> inline
  vec3<double> init_zero< vec3<double> >() {
    return vec3<double>(0.0,0.0,0.0);
  }

  template <> inline
  mat3<double> init_zero< mat3<double> >() {
    return mat3<double>(0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
  }

  template <> inline
  int6 init_zero<int6>() {
    return int6(0,0,0,0,0,0);
  }

  template <> inline
  cctbx::miller::index<> init_zero< cctbx::miller::index<> >() {
    return cctbx::miller::index<>(0,0,0);
  }


  typedef flex_type_generator<
    bool,
    int,
    std::size_t,
    double,
    std::string,
    vec2<double>,
    vec3<double>,
    mat3<double>,
    int6,
    cctbx::miller::index<>,
    Shoebox<>
  > reflection_table_type_generator;

  typedef reflection_table_type_generator::type reflection_table_types;


  class reflection_table : public flex_table<reflection_table_types> {
  public:

    typedef flex_table<reflection_table_types>::map_type map_type;
    typedef flex_table<reflection_table_types>::key_type key_type;
    typedef flex_table<reflection_table_types>::mapped_type mapped_type;
    typedef flex_table<reflection_table_types>::map_value_type map_value_type;
    typedef flex_table<reflection_table_types>::iterator iterator;
    typedef flex_table<reflection_table_types>::const_iterator const_iterator;
    typedef flex_table<reflection_table_types>::size_type size_type;
    typedef std::map<std::size_t, std::string> experiment_map_type;

    reflection_table()
      : flex_table<reflection_table_types>(),
        experiment_identifiers_(boost::make_shared<experiment_map_type>()) {}

    reflection_table(size_type n)
      : flex_table<reflection_table_types>(n),
        experiment_identifiers_(boost::make_shared<experiment_map_type>()) {}

    boost::shared_ptr<experiment_map_type> experiment_identifiers() {
      return experiment_identifiers_;
    }

  protected:

    boost::shared_ptr<experiment_map_type> experiment_identifiers_;

  };

  enum Flags {

{'fraction_non_alphanumeric': 0.12366660640028927, 'fraction_numerical': 0.023323088049177362, 'mean_word_length': 4.750519750519751, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, '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': '5978103', 'n_tokens_mistral': 2068, 'n_tokens_neox': 1984, 'n_words': 325}