diff --git a/Base/Axis/Bin.cpp b/Base/Axis/Bin.cpp index bfaeafb5b3c62b05746c69a59e6dfea24c1430e4..9d47e84c5adee46e228e6fa2d8b31d2bc96375ba 100644 --- a/Base/Axis/Bin.cpp +++ b/Base/Axis/Bin.cpp @@ -15,6 +15,10 @@ #include "Base/Axis/Bin.h" #include "Base/Util/Assert.h" +Bin1D::Bin1D(const Bin1D&) = default; +Bin1D& Bin1D::operator=(const Bin1D&) = default; +bool Bin1D::operator==(const Bin1D&) const = default; + Bin1D Bin1D::FromTo(double lower, double upper) { return {lower, upper}; diff --git a/Base/Axis/Bin.h b/Base/Axis/Bin.h index 4270b5b79cb83aab560660d74dcc5009a35b51a8..d179deca6ec277f6ac3c414d7ae0cd148034d749 100644 --- a/Base/Axis/Bin.h +++ b/Base/Axis/Bin.h @@ -24,21 +24,22 @@ public: static Bin1D FromTo(double lower, double upper); static Bin1D At(double center); static Bin1D At(double center, double halfwidth); + Bin1D(const Bin1D&); + Bin1D& operator=(const Bin1D&); + bool operator==(const Bin1D&) const; double lowerBound() const { return m_lower; } double upperBound() const { return m_upper; } double center() const { return (m_lower + m_upper) / 2; } double binSize() const { return m_upper - m_lower; } - bool operator==(const Bin1D& other) const = default; - std::optional<Bin1D> clipped_or_nil(double lower, double upper) const; private: Bin1D(double lower, double upper); - const double m_lower; //!< lower bound of the bin - const double m_upper; //!< upper bound of the bin + double m_lower; //!< lower bound of the bin + double m_upper; //!< upper bound of the bin }; #endif // BORNAGAIN_BASE_AXIS_BIN_H diff --git a/Base/Axis/Scale.cpp b/Base/Axis/Scale.cpp index 70d3d8503778fee15a11f7adedef480cf984fc22..c700a7f0376a39cda8549d2eb4da1bd127e6be1f 100644 --- a/Base/Axis/Scale.cpp +++ b/Base/Axis/Scale.cpp @@ -67,12 +67,20 @@ Scale::Scale(const Coordinate& coord, std::vector<Bin1D> bins) } } +Scale::Scale(const Scale& other) +{ + m_bins = other.m_bins; + if (!other.m_trafos.empty()) { + m_trafos = other.m_trafos; + } else { + ASSERT(other.m_coord); + m_coord = std::make_unique<Coordinate>(*other.m_coord); + } +} + Scale* Scale::clone() const { - if (!m_trafos.empty()) - return new Scale(m_bins, m_trafos); - ASSERT(m_coord); - return new Scale(m_coord->label(), m_bins); + return new Scale(*this); } void Scale::setTrafos(trafo_map_t trafos) @@ -271,7 +279,7 @@ Scale Scale::plottableScale() const Scale Scale::transformedScale(const std::string& label, const trafo_t& axTrafo) const { std::vector<Bin1D> outvector; - for (const Bin1D b : m_bins) { + for (const Bin1D& b : m_bins) { double bmi = axTrafo(b.lowerBound()); double bma = axTrafo(b.upperBound()); outvector.emplace_back(Bin1D::FromTo(bmi, bma)); diff --git a/Base/Axis/Scale.h b/Base/Axis/Scale.h index 776182346605f1e75539783136e56d06344a9fb0..1aa10cd10abfa8dc545e41127eed3eed7fe00061 100644 --- a/Base/Axis/Scale.h +++ b/Base/Axis/Scale.h @@ -26,12 +26,13 @@ using trafo_t = std::function<double(double)>; using trafo_map_t = std::vector<std::pair<std::string, std::function<double(double)>>>; -//! Abstract base class for one-dimensional axes. +//! An axis, with coordinate and bins. class Scale { public: Scale(std::vector<Bin1D> bins, trafo_map_t trafos); Scale(const Coordinate& coord, std::vector<Bin1D> bins); + Scale(const Scale& other); Scale* clone() const; void setTrafos(trafo_map_t trafos); diff --git a/auto/Wrap/libBornAgainBase.py b/auto/Wrap/libBornAgainBase.py index f5d88c70fc80976c2a404252648bf0784698a03a..84d2057cad91a61a1c3984f6a6d9352a482796a0 100644 --- a/auto/Wrap/libBornAgainBase.py +++ b/auto/Wrap/libBornAgainBase.py @@ -1792,9 +1792,6 @@ class Bin1D(object): r"""Proxy of C++ Bin1D class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") - - def __init__(self, *args, **kwargs): - raise AttributeError("No constructor defined") __repr__ = _swig_repr @staticmethod @@ -1810,6 +1807,14 @@ class Bin1D(object): """ return _libBornAgainBase.Bin1D_At(*args) + def __init__(self, arg2): + r"""__init__(Bin1D self, Bin1D arg2) -> Bin1D""" + _libBornAgainBase.Bin1D_swiginit(self, _libBornAgainBase.new_Bin1D(arg2)) + + def __eq__(self, arg2): + r"""__eq__(Bin1D self, Bin1D arg2) -> bool""" + return _libBornAgainBase.Bin1D___eq__(self, arg2) + def lowerBound(self): r"""lowerBound(Bin1D self) -> double""" return _libBornAgainBase.Bin1D_lowerBound(self) @@ -1826,10 +1831,6 @@ class Bin1D(object): r"""binSize(Bin1D self) -> double""" return _libBornAgainBase.Bin1D_binSize(self) - def __eq__(self, other): - r"""__eq__(Bin1D self, Bin1D other) -> bool""" - return _libBornAgainBase.Bin1D___eq__(self, other) - def clipped_or_nil(self, lower, upper): r"""clipped_or_nil(Bin1D self, double lower, double upper) -> std::optional< Bin1D >""" return _libBornAgainBase.Bin1D_clipped_or_nil(self, lower, upper) @@ -1858,6 +1859,7 @@ class Scale(object): r""" __init__(Scale self, std::vector< Bin1D,std::allocator< Bin1D > > bins, trafo_map_t trafos) -> Scale __init__(Scale self, Coordinate const & coord, std::vector< Bin1D,std::allocator< Bin1D > > bins) -> Scale + __init__(Scale self, Scale other) -> Scale """ _libBornAgainBase.Scale_swiginit(self, _libBornAgainBase.new_Scale(*args)) diff --git a/auto/Wrap/libBornAgainBase_wrap.cpp b/auto/Wrap/libBornAgainBase_wrap.cpp index 8d3b60d0b6fc77aecf345f92e1f88ecdfb7322c3..0d950fd3d173f6b9234701f55e9d6e08db2faab0 100644 --- a/auto/Wrap/libBornAgainBase_wrap.cpp +++ b/auto/Wrap/libBornAgainBase_wrap.cpp @@ -25519,24 +25519,27 @@ fail: } -SWIGINTERN PyObject *_wrap_Bin1D_lowerBound(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_new_Bin1D(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - Bin1D *arg1 = (Bin1D *) 0 ; + Bin1D *arg1 = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; - double result; + Bin1D *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Bin1D, 0 | 0 ); + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Bin1D, 0 | 0); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_lowerBound" "', argument " "1"" of type '" "Bin1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bin1D" "', argument " "1"" of type '" "Bin1D const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bin1D" "', argument " "1"" of type '" "Bin1D const &""'"); } arg1 = reinterpret_cast< Bin1D * >(argp1); { try { - result = (double)((Bin1D const *)arg1)->lowerBound(); + result = (Bin1D *)new Bin1D((Bin1D const &)*arg1); } catch (const std::exception& ex) { // message shown in the Python interpreter const std::string msg { @@ -25545,14 +25548,59 @@ SWIGINTERN PyObject *_wrap_Bin1D_lowerBound(PyObject *self, PyObject *args) { SWIG_exception(SWIG_RuntimeError, msg.c_str()); } } - resultobj = SWIG_From_double(static_cast< double >(result)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bin1D, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_Bin1D_upperBound(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_Bin1D___eq__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Bin1D *arg1 = (Bin1D *) 0 ; + Bin1D *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + + if (!SWIG_Python_UnpackTuple(args, "Bin1D___eq__", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Bin1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D___eq__" "', argument " "1"" of type '" "Bin1D const *""'"); + } + arg1 = reinterpret_cast< Bin1D * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Bin1D, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Bin1D___eq__" "', argument " "2"" of type '" "Bin1D const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bin1D___eq__" "', argument " "2"" of type '" "Bin1D const &""'"); + } + arg2 = reinterpret_cast< Bin1D * >(argp2); + { + try { + result = (bool)((Bin1D const *)arg1)->operator ==((Bin1D const &)*arg2); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + PyErr_Clear(); + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Bin1D_lowerBound(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Bin1D *arg1 = (Bin1D *) 0 ; void *argp1 = 0 ; @@ -25564,12 +25612,12 @@ SWIGINTERN PyObject *_wrap_Bin1D_upperBound(PyObject *self, PyObject *args) { swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Bin1D, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_upperBound" "', argument " "1"" of type '" "Bin1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_lowerBound" "', argument " "1"" of type '" "Bin1D const *""'"); } arg1 = reinterpret_cast< Bin1D * >(argp1); { try { - result = (double)((Bin1D const *)arg1)->upperBound(); + result = (double)((Bin1D const *)arg1)->lowerBound(); } catch (const std::exception& ex) { // message shown in the Python interpreter const std::string msg { @@ -25585,7 +25633,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Bin1D_center(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_Bin1D_upperBound(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Bin1D *arg1 = (Bin1D *) 0 ; void *argp1 = 0 ; @@ -25597,12 +25645,12 @@ SWIGINTERN PyObject *_wrap_Bin1D_center(PyObject *self, PyObject *args) { swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Bin1D, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_center" "', argument " "1"" of type '" "Bin1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_upperBound" "', argument " "1"" of type '" "Bin1D const *""'"); } arg1 = reinterpret_cast< Bin1D * >(argp1); { try { - result = (double)((Bin1D const *)arg1)->center(); + result = (double)((Bin1D const *)arg1)->upperBound(); } catch (const std::exception& ex) { // message shown in the Python interpreter const std::string msg { @@ -25618,7 +25666,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Bin1D_binSize(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_Bin1D_center(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Bin1D *arg1 = (Bin1D *) 0 ; void *argp1 = 0 ; @@ -25630,12 +25678,12 @@ SWIGINTERN PyObject *_wrap_Bin1D_binSize(PyObject *self, PyObject *args) { swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Bin1D, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_binSize" "', argument " "1"" of type '" "Bin1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_center" "', argument " "1"" of type '" "Bin1D const *""'"); } arg1 = reinterpret_cast< Bin1D * >(argp1); { try { - result = (double)((Bin1D const *)arg1)->binSize(); + result = (double)((Bin1D const *)arg1)->center(); } catch (const std::exception& ex) { // message shown in the Python interpreter const std::string msg { @@ -25651,34 +25699,24 @@ fail: } -SWIGINTERN PyObject *_wrap_Bin1D___eq__(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_Bin1D_binSize(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Bin1D *arg1 = (Bin1D *) 0 ; - Bin1D *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject *swig_obj[2] ; - bool result; + PyObject *swig_obj[1] ; + double result; - if (!SWIG_Python_UnpackTuple(args, "Bin1D___eq__", 2, 2, swig_obj)) SWIG_fail; + if (!args) SWIG_fail; + swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Bin1D, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D___eq__" "', argument " "1"" of type '" "Bin1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bin1D_binSize" "', argument " "1"" of type '" "Bin1D const *""'"); } arg1 = reinterpret_cast< Bin1D * >(argp1); - res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Bin1D, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Bin1D___eq__" "', argument " "2"" of type '" "Bin1D const &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bin1D___eq__" "', argument " "2"" of type '" "Bin1D const &""'"); - } - arg2 = reinterpret_cast< Bin1D * >(argp2); { try { - result = (bool)((Bin1D const *)arg1)->operator ==((Bin1D const &)*arg2); + result = (double)((Bin1D const *)arg1)->binSize(); } catch (const std::exception& ex) { // message shown in the Python interpreter const std::string msg { @@ -25687,12 +25725,10 @@ SWIGINTERN PyObject *_wrap_Bin1D___eq__(PyObject *self, PyObject *args) { SWIG_exception(SWIG_RuntimeError, msg.c_str()); } } - resultobj = SWIG_From_bool(static_cast< bool >(result)); + resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: - PyErr_Clear(); - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; + return NULL; } @@ -25783,6 +25819,10 @@ SWIGINTERN PyObject *Bin1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject return SWIG_Py_Void(); } +SWIGINTERN PyObject *Bin1D_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + SWIGINTERN PyObject *_wrap_new_Scale__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; SwigValueWrapper< std::vector< Bin1D,std::allocator< Bin1D > > > arg1 ; @@ -25888,6 +25928,40 @@ fail: } +SWIGINTERN PyObject *_wrap_new_Scale__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Scale *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Scale *result = 0 ; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Scale, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Scale" "', argument " "1"" of type '" "Scale const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Scale" "', argument " "1"" of type '" "Scale const &""'"); + } + arg1 = reinterpret_cast< Scale * >(argp1); + { + try { + result = (Scale *)new Scale((Scale const &)*arg1); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Scale, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_new_Scale(PyObject *self, PyObject *args) { Py_ssize_t argc; PyObject *argv[3] = { @@ -25896,27 +25970,35 @@ SWIGINTERN PyObject *_wrap_new_Scale(PyObject *self, PyObject *args) { if (!(argc = SWIG_Python_UnpackTuple(args, "new_Scale", 0, 2, argv))) SWIG_fail; --argc; + if (argc == 1) { + int _v = 0; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Scale, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Scale__SWIG_2(self, argc, argv); + } + } if (argc == 2) { int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__vectorT_Bin1D_std__allocatorT_Bin1D_t_t, SWIG_POINTER_NO_NULL | 0); + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Coordinate, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__functionT_double_fdoubleF_t_t_std__allocatorT_std__pairT_std__string_std__functionT_double_fdoubleF_t_t_t_t, SWIG_POINTER_NO_NULL | 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__vectorT_Bin1D_std__allocatorT_Bin1D_t_t, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_Scale__SWIG_0(self, argc, argv); + return _wrap_new_Scale__SWIG_1(self, argc, argv); } } } if (argc == 2) { int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Coordinate, SWIG_POINTER_NO_NULL | 0); + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__vectorT_Bin1D_std__allocatorT_Bin1D_t_t, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__vectorT_Bin1D_std__allocatorT_Bin1D_t_t, SWIG_POINTER_NO_NULL | 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_std__vectorT_std__pairT_std__string_std__functionT_double_fdoubleF_t_t_std__allocatorT_std__pairT_std__string_std__functionT_double_fdoubleF_t_t_t_t, SWIG_POINTER_NO_NULL | 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_new_Scale__SWIG_1(self, argc, argv); + return _wrap_new_Scale__SWIG_0(self, argc, argv); } } } @@ -25925,7 +26007,8 @@ fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_Scale'.\n" " Possible C/C++ prototypes are:\n" " Scale::Scale(std::vector< Bin1D,std::allocator< Bin1D > >,trafo_map_t)\n" - " Scale::Scale(Coordinate const &,std::vector< Bin1D,std::allocator< Bin1D > >)\n"); + " Scale::Scale(Coordinate const &,std::vector< Bin1D,std::allocator< Bin1D > >)\n" + " Scale::Scale(Scale const &)\n"); return 0; } @@ -30691,17 +30774,20 @@ static PyMethodDef SwigMethods[] = { "Bin1D_At(double center) -> Bin1D\n" "Bin1D_At(double center, double halfwidth) -> Bin1D\n" ""}, + { "new_Bin1D", _wrap_new_Bin1D, METH_O, "new_Bin1D(Bin1D arg1) -> Bin1D"}, + { "Bin1D___eq__", _wrap_Bin1D___eq__, METH_VARARGS, "Bin1D___eq__(Bin1D self, Bin1D arg2) -> bool"}, { "Bin1D_lowerBound", _wrap_Bin1D_lowerBound, METH_O, "Bin1D_lowerBound(Bin1D self) -> double"}, { "Bin1D_upperBound", _wrap_Bin1D_upperBound, METH_O, "Bin1D_upperBound(Bin1D self) -> double"}, { "Bin1D_center", _wrap_Bin1D_center, METH_O, "Bin1D_center(Bin1D self) -> double"}, { "Bin1D_binSize", _wrap_Bin1D_binSize, METH_O, "Bin1D_binSize(Bin1D self) -> double"}, - { "Bin1D___eq__", _wrap_Bin1D___eq__, METH_VARARGS, "Bin1D___eq__(Bin1D self, Bin1D other) -> bool"}, { "Bin1D_clipped_or_nil", _wrap_Bin1D_clipped_or_nil, METH_VARARGS, "Bin1D_clipped_or_nil(Bin1D self, double lower, double upper) -> std::optional< Bin1D >"}, { "delete_Bin1D", _wrap_delete_Bin1D, METH_O, "delete_Bin1D(Bin1D self)"}, { "Bin1D_swigregister", Bin1D_swigregister, METH_O, NULL}, + { "Bin1D_swiginit", Bin1D_swiginit, METH_VARARGS, NULL}, { "new_Scale", _wrap_new_Scale, METH_VARARGS, "\n" "Scale(std::vector< Bin1D,std::allocator< Bin1D > > bins, trafo_map_t trafos)\n" - "new_Scale(Coordinate const & coord, std::vector< Bin1D,std::allocator< Bin1D > > bins) -> Scale\n" + "Scale(Coordinate const & coord, std::vector< Bin1D,std::allocator< Bin1D > > bins)\n" + "new_Scale(Scale other) -> Scale\n" ""}, { "Scale_clone", _wrap_Scale_clone, METH_O, "Scale_clone(Scale self) -> Scale"}, { "Scale_setTrafos", _wrap_Scale_setTrafos, METH_VARARGS, "Scale_setTrafos(Scale self, trafo_map_t trafos)"},