<commit_before>// Copyright 2018 Google LLC. All Rights Reserved.
/*
  Copyright (C) 2005 <NAME>

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

  This library 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
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
*/
#ifndef BOOM_COMPOSITE_MODEL_PARAM_POLICY
#define BOOM_COMPOSITE_MODEL_PARAM_POLICY

/*======================================================================
  Use this policy when the Model is defined as a composite of several
  sub-models.  E.g. latent variable models.  If the model just happens
  to have many paramters use ManyParamPolicy instead.
  ======================================================================*/

#include "Models/ModelTypes.hpp"
#include "Models/ParamTypes.hpp"
#include "cpputil/Ptr.hpp"
namespace BOOM {

  class CompositeParamPolicy : virtual public Model {
   public:
    typedef CompositeParamPolicy ParamPolicy;
    CompositeParamPolicy();

    template <class FwdIt>  // *FwdIt is a Ptr<Model>
    CompositeParamPolicy(FwdIt b, FwdIt e);

    CompositeParamPolicy(
        const CompositeParamPolicy &rhs);  // components not copied
    CompositeParamPolicy(CompositeParamPolicy &&rhs) = default;
<commit_msg>Add a comment to the copy constructor.<commit_after>// Copyright 2018 Google LLC. All Rights Reserved.
/*
  Copyright (C) 2005 <NAME>

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

  This library 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
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
*/
#ifndef BOOM_COMPOSITE_MODEL_PARAM_POLICY
#define BOOM_COMPOSITE_MODEL_PARAM_POLICY

/*======================================================================
  Use this policy when the Model is defined as a composite of several
  sub-models.  E.g. latent variable models.  If the model just happens
  to have many paramters use ManyParamPolicy instead.
  ======================================================================*/

#include "Models/ModelTypes.hpp"
#include "Models/ParamTypes.hpp"
#include "cpputil/Ptr.hpp"
namespace BOOM {

  class CompositeParamPolicy : virtual public Model {
   public:
    typedef CompositeParamPolicy ParamPolicy;
    CompositeParamPolicy();

    template <class FwdIt>  // *FwdIt is a Ptr<Model>
    CompositeParamPolicy(FwdIt b, FwdIt e);

    // When a composite model is copied, the sub models are not copied.  This is
    // because the owning model often needs to take some sort of additional
    // action prior to adding a model.
    CompositeParamPolicy(
        const CompositeParamPolicy &rhs);  // components not copied
    CompositeParamPolicy(CompositeParamPolicy &&rhs) = default;

{'fraction_non_alphanumeric': 0.12721971905645374, 'fraction_numerical': 0.011131725417439703, 'mean_word_length': 4.285714285714286, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6706115', 'n_tokens_mistral': 1003, 'n_tokens_neox': 949, 'n_words': 440}