<commit_before>#include "../Swarm.h"
#include <Eigen/Core>
#include <pybind11/eigen.h>
#include <pybind11/functional.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

namespace MetaOpt
{
namespace Python {

namespace py = pybind11;

void init_swarm(py::module &m) {

  py::class_<Swarm>(m, "Swarm")
      .def(py::init<const ParameterSpace &, const Parameters &, std::size_t,
                    const int>())
      .def("optimize", &Swarm::optimize)
      .def("getSolution", &Swarm::getBestSolution);
}
}
}
<commit_msg>Add default parameters for constructor<commit_after>#include "../Swarm.h"
#include <Eigen/Core>
#include <pybind11/eigen.h>
#include <pybind11/functional.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

namespace MetaOpt {
namespace Python {

namespace py = pybind11;

void init_swarm(py::module &m) {

  auto constructor = py::init<const ParameterSpace &, const Parameters &,
                              std::size_t, const int>();
  py::class_<Swarm>(m, "Swarm")
      .def(constructor, py::arg("parameter_space"), py::arg("hyper_params"),
           py::arg("num_particles") = 10, py::arg("seed") = -1)
      .def("optimize", &Swarm::optimize)
      .def("getBestSolution", &Swarm::getBestSolution)
      .def("getBestParameters", &Swarm::getBestParameters);
}
}
}

{'fraction_non_alphanumeric': 0.1706016755521706, 'fraction_numerical': 0.020563594821020565, 'mean_word_length': 4.093023255813954, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '1264977', 'n_tokens_mistral': 484, 'n_tokens_neox': 460, 'n_words': 85}