[go: up one dir, main page]

File: simplex.cpp

package info (click to toggle)
iminuit 2.30.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,660 kB
  • sloc: cpp: 14,591; python: 11,177; makefile: 11; sh: 5
file content (20 lines) | stat: -rw-r--r-- 537 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "fcn.hpp"
#include "pybind11.hpp"
#include <Minuit2/FCNBase.h>
#include <Minuit2/MnSimplex.h>

namespace py = pybind11;
using namespace ROOT::Minuit2;

void bind_simplex(py::module m) {
  py::class_<MnSimplex, MnApplication>(m, "MnSimplex")

      .def(py::init<const FCNBase&, const MnUserParameterState&, const MnStrategy&>(),
           py::keep_alive<1, 2>())
      .def("set_print_level",
           [](MnSimplex& self, int lvl) {
             return self.Minimizer().Builder().SetPrintLevel(lvl);
           })

      ;
}