From 28b43ebc5c0e148a4e264df83c5a97488f74d7f6 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Sun, 29 May 2022 14:11:54 +0200
Subject: [PATCH] Histogram API rm c'tor

---
 Device/Histo/Histogram1D.cpp          |   5 --
 Device/Histo/Histogram1D.h            |   5 --
 Device/Histo/Histogram2D.cpp          |   5 --
 Device/Histo/Histogram2D.h            |   7 --
 Tests/Unit/Device/Histogram1DTest.cpp | 107 +++++++++++++-------------
 Tests/Unit/Device/Histogram2DTest.cpp |   4 +-
 auto/Wrap/doxygenDevice.i             |  25 ------
 auto/Wrap/libBornAgainDevice.py       |   2 -
 auto/Wrap/libBornAgainDevice_wrap.cpp | 105 ++-----------------------
 9 files changed, 60 insertions(+), 205 deletions(-)

diff --git a/Device/Histo/Histogram1D.cpp b/Device/Histo/Histogram1D.cpp
index 8b63740601c..5828c96cc73 100644
--- a/Device/Histo/Histogram1D.cpp
+++ b/Device/Histo/Histogram1D.cpp
@@ -24,11 +24,6 @@ Histogram1D::Histogram1D(int nbinsx, double xlow, double xup)
 {
 }
 
-Histogram1D::Histogram1D(const std::vector<double>& xbins)
-    : IHistogram(VariableBinAxis("x-axis", xbins))
-{
-}
-
 Histogram1D::Histogram1D(const IAxis& axis)
     : IHistogram(axis)
 {
diff --git a/Device/Histo/Histogram1D.h b/Device/Histo/Histogram1D.h
index 5d55a377b93..f867c657660 100644
--- a/Device/Histo/Histogram1D.h
+++ b/Device/Histo/Histogram1D.h
@@ -28,11 +28,6 @@ public:
     //! @param xup upper edge of the last bin
     Histogram1D(int nbinsx, double xlow, double xup);
 
-    //! Constructor for variable bin size histograms.
-    //! @param xbins Array of size nbins+1 containing low-edges for each
-    //! bin and upper edge of last bin.
-    Histogram1D(const std::vector<double>& xbins);
-
     //! Constructor for 1D histogram with custom axis
     Histogram1D(const IAxis& axis);
 
diff --git a/Device/Histo/Histogram2D.cpp b/Device/Histo/Histogram2D.cpp
index 4cc4b2b3f8f..194c19b2970 100644
--- a/Device/Histo/Histogram2D.cpp
+++ b/Device/Histo/Histogram2D.cpp
@@ -24,11 +24,6 @@ Histogram2D::Histogram2D(int nbinsx, double xlow, double xup, int nbinsy, double
 {
 }
 
-Histogram2D::Histogram2D(const std::vector<double>& xbins, const std::vector<double>& ybins)
-    : IHistogram(VariableBinAxis("x-axis", xbins), VariableBinAxis("y-axis", ybins))
-{
-}
-
 Histogram2D::Histogram2D(const IAxis& axis_x, const IAxis& axis_y)
     : IHistogram(axis_x, axis_y)
 {
diff --git a/Device/Histo/Histogram2D.h b/Device/Histo/Histogram2D.h
index ae7ad4986e2..3581dab6f2a 100644
--- a/Device/Histo/Histogram2D.h
+++ b/Device/Histo/Histogram2D.h
@@ -32,13 +32,6 @@ public:
     //! @param yup upper edge of the last bin of Y-axis
     Histogram2D(int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup);
 
-    //! @brief Constructor for variable bin size histograms.
-    //! @param xbins Array of size nbins+1 containing low-edges for each
-    //! bin and upper edge of last bin.
-    //! @param ybins Array of size nbins+1 containing low-edges for each
-    //! bin and upper edge of last bin.
-    Histogram2D(const std::vector<double>& xbins, const std::vector<double>& ybins);
-
     //! Constructor for 2D histogram with custom axes
     Histogram2D(const IAxis& axis_x, const IAxis& axis_y);
 
diff --git a/Tests/Unit/Device/Histogram1DTest.cpp b/Tests/Unit/Device/Histogram1DTest.cpp
index e4693ad5b14..0af4653df8c 100644
--- a/Tests/Unit/Device/Histogram1DTest.cpp
+++ b/Tests/Unit/Device/Histogram1DTest.cpp
@@ -1,110 +1,107 @@
 #include "Device/Histo/Histogram1D.h"
 #include "Base/Axis/FixedBinAxis.h"
+#include "Base/Axis/VariableBinAxis.h"
 #include "Device/Data/Powerfield.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <memory>
 
 class Histogram1DTest : public ::testing::Test {
+public:
+    Histogram1D hist1{FixedBinAxis("x", 5, 0.0, 5.0)};
 };
 
 TEST_F(Histogram1DTest, FixedBinConstructor)
 {
-    Histogram1D hist(5, 0.0, 5.0);
-
-    EXPECT_EQ(size_t(1), hist.rank());
-    EXPECT_EQ(size_t(5), hist.getTotalNumberOfBins());
-    EXPECT_EQ(0.0, hist.xMin());
-    EXPECT_EQ(5.0, hist.xMax());
-    EXPECT_THROW(hist.yAxis(), std::runtime_error);
-    for (size_t index = 0; index < hist.getTotalNumberOfBins(); ++index) {
-        EXPECT_EQ(index, hist.getGlobalBin(index));
-        EXPECT_EQ(index, hist.xAxisIndex(index));
+    EXPECT_EQ(size_t(1), hist1.rank());
+    EXPECT_EQ(size_t(5), hist1.getTotalNumberOfBins());
+    EXPECT_EQ(0.0, hist1.xMin());
+    EXPECT_EQ(5.0, hist1.xMax());
+    EXPECT_THROW(hist1.yAxis(), std::runtime_error);
+    for (size_t index = 0; index < hist1.getTotalNumberOfBins(); ++index) {
+        EXPECT_EQ(index, hist1.getGlobalBin(index));
+        EXPECT_EQ(index, hist1.xAxisIndex(index));
     }
 }
 
 TEST_F(Histogram1DTest, FixedBinDefaultContent)
 {
-    Histogram1D hist(5, 0.0, 5.0);
-
     // bin centers
     std::vector<double> bin_centers = {0.5, 1.5, 2.5, 3.5, 4.5};
-    std::vector<double> centers = hist.binCenters();
+    std::vector<double> centers = hist1.binCenters();
     for (size_t index = 0; index < bin_centers.size(); ++index) {
         EXPECT_EQ(centers[index], bin_centers[index]);
-        EXPECT_EQ(hist.xAxisValue(index), bin_centers[index]);
-        EXPECT_EQ(hist.xAxis().binCenter(index), bin_centers[index]);
+        EXPECT_EQ(hist1.xAxisValue(index), bin_centers[index]);
+        EXPECT_EQ(hist1.xAxis().binCenter(index), bin_centers[index]);
     }
 
     // default bin values
-    std::vector<double> values = hist.binValues();
+    std::vector<double> values = hist1.binValues();
     for (size_t index = 0; index < bin_centers.size(); ++index) {
-        EXPECT_EQ(hist.binContent(index), 0.0);
+        EXPECT_EQ(hist1.binContent(index), 0.0);
         EXPECT_EQ(values[index], 0.0);
     }
 
     // default bin errors
-    std::vector<double> errors = hist.binErrors();
+    std::vector<double> errors = hist1.binErrors();
     for (size_t index = 0; index < bin_centers.size(); ++index) {
-        EXPECT_EQ(hist.binError(index), 0.0);
+        EXPECT_EQ(hist1.binError(index), 0.0);
         EXPECT_EQ(errors[index], 0.0);
     }
 
     // default bin entries
     for (size_t index = 0; index < bin_centers.size(); ++index)
-        EXPECT_EQ(hist.binNumberOfEntries(index), 0);
+        EXPECT_EQ(hist1.binNumberOfEntries(index), 0);
 }
 
 TEST_F(Histogram1DTest, FixedBinFill)
 {
-    Histogram1D hist(5, 0.0, 5.0);
-
     // filling two different bins
 
-    hist.fill(0.5, 88.0);
-    hist.fill(4.5, 99.0);
-    EXPECT_EQ(hist.binContent(0), 88.0);
-    EXPECT_EQ(hist.binNumberOfEntries(0), 1);
-    EXPECT_EQ(hist.binError(0), 0.0);
+    hist1.fill(0.5, 88.0);
+    hist1.fill(4.5, 99.0);
+    EXPECT_EQ(hist1.binContent(0), 88.0);
+    EXPECT_EQ(hist1.binNumberOfEntries(0), 1);
+    EXPECT_EQ(hist1.binError(0), 0.0);
 
-    EXPECT_EQ(hist.binContent(4), 99.0);
-    EXPECT_EQ(hist.binNumberOfEntries(4), 1);
-    EXPECT_EQ(hist.binError(4), 0.0);
+    EXPECT_EQ(hist1.binContent(4), 99.0);
+    EXPECT_EQ(hist1.binNumberOfEntries(4), 1);
+    EXPECT_EQ(hist1.binError(4), 0.0);
 
     std::vector<double> values = {88.0, 0.0, 0.0, 0.0, 99.0};
-    for (size_t index = 0; index < hist.getTotalNumberOfBins(); ++index) {
-        EXPECT_EQ(hist.binValues()[index], values[index]);
-        EXPECT_EQ(hist.binErrors()[index], 0.0);
+    for (size_t index = 0; index < hist1.getTotalNumberOfBins(); ++index) {
+        EXPECT_EQ(hist1.binValues()[index], values[index]);
+        EXPECT_EQ(hist1.binErrors()[index], 0.0);
     }
 
     // resetting histograms
-    hist.reset();
-    EXPECT_EQ(hist.binContent(0), 0.0);
-    EXPECT_EQ(hist.binNumberOfEntries(0), 0);
-    EXPECT_EQ(hist.binError(0), 0.0);
-    EXPECT_EQ(hist.binContent(4), 0.0);
-    EXPECT_EQ(hist.binNumberOfEntries(4), 0);
-    EXPECT_EQ(hist.binError(4), 0.0);
+    hist1.reset();
+    EXPECT_EQ(hist1.binContent(0), 0.0);
+    EXPECT_EQ(hist1.binNumberOfEntries(0), 0);
+    EXPECT_EQ(hist1.binError(0), 0.0);
+    EXPECT_EQ(hist1.binContent(4), 0.0);
+    EXPECT_EQ(hist1.binNumberOfEntries(4), 0);
+    EXPECT_EQ(hist1.binError(4), 0.0);
 
     // another fill
     const double xvalue(1.5);
     const int xbin = 1;
 
-    hist.fill(xvalue, 1.0);
-    hist.fill(xvalue, 3.0);
-    EXPECT_EQ(2, hist.binNumberOfEntries(xbin));
-    EXPECT_EQ(4.0, hist.binContent(xbin));
-    EXPECT_EQ(2.0, hist.binAverage(xbin));
-    EXPECT_EQ(1.0, hist.binError(xbin));
+    hist1.fill(xvalue, 1.0);
+    hist1.fill(xvalue, 3.0);
+    EXPECT_EQ(2, hist1.binNumberOfEntries(xbin));
+    EXPECT_EQ(4.0, hist1.binContent(xbin));
+    EXPECT_EQ(2.0, hist1.binAverage(xbin));
+    EXPECT_EQ(1.0, hist1.binError(xbin));
 
     // another fill
-    hist.reset();
-    hist.fill(xvalue, 1.0);
-    hist.fill(xvalue, 2.0);
-    hist.fill(xvalue, 3.0);
-    EXPECT_EQ(3, hist.binNumberOfEntries(xbin));
-    EXPECT_EQ(6.0, hist.binContent(xbin));
-    EXPECT_EQ(2.0, hist.binAverage(xbin));
-    EXPECT_EQ(2.0 / 3.0, hist.binError(xbin) * hist.binError(xbin));
+    hist1.reset();
+    hist1.fill(xvalue, 1.0);
+    hist1.fill(xvalue, 2.0);
+    hist1.fill(xvalue, 3.0);
+    EXPECT_EQ(3, hist1.binNumberOfEntries(xbin));
+    EXPECT_EQ(6.0, hist1.binContent(xbin));
+    EXPECT_EQ(2.0, hist1.binAverage(xbin));
+    EXPECT_EQ(2.0 / 3.0, hist1.binError(xbin) * hist1.binError(xbin));
 }
 
 //     -1.0  -0.5        0.5   1.0        2.0  X
@@ -113,7 +110,7 @@ TEST_F(Histogram1DTest, crop)
 {
     std::vector<double> xedges = {-1.0, -0.5, 0.5, 1.0, 2.0};
     std::vector<double> xvalues = {-0.75, 0.0, 0.75, 1.5};
-    Histogram1D hist(xedges);
+    Histogram1D hist(VariableBinAxis("x", xedges));
 
     for (size_t i = 0; i < xvalues.size(); ++i)
         hist.fill(xvalues[i], i * 10.0);
diff --git a/Tests/Unit/Device/Histogram2DTest.cpp b/Tests/Unit/Device/Histogram2DTest.cpp
index 3f0bbbc99c1..fda93074693 100644
--- a/Tests/Unit/Device/Histogram2DTest.cpp
+++ b/Tests/Unit/Device/Histogram2DTest.cpp
@@ -1,5 +1,6 @@
 #include "Device/Histo/Histogram2D.h"
 #include "Base/Axis/Bin.h"
+#include "Base/Axis/VariableBinAxis.h"
 #include "Device/Histo/Histogram1D.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <memory>
@@ -23,7 +24,8 @@ protected:
 //     -1.0  -0.5        0.5   1.0        2.0  X
 
 Histogram2DTest::Histogram2DTest()
-    : hist{{-1.0, -0.5, 0.5, 1.0, 2.0}, {0.0, 1.0, 2.0, 4.0}}
+    : hist(VariableBinAxis("x", {-1.0, -0.5, 0.5, 1.0, 2.0}),
+           VariableBinAxis("y", {0.0, 1.0, 2.0, 4.0}))
 {
 }
 
diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i
index 77a1c145967..59bd3a0913d 100644
--- a/auto/Wrap/doxygenDevice.i
+++ b/auto/Wrap/doxygenDevice.i
@@ -583,17 +583,6 @@ xup:
 upper edge of the last bin 
 ";
 
-%feature("docstring")  Histogram1D::Histogram1D "Histogram1D::Histogram1D(const std::vector< double > &xbins)
-
-Constructor for variable bin size histograms.
-
-Parameters:
------------
-
-xbins: 
-Array of size nbins+1 containing low-edges for each bin and upper edge of last bin. 
-";
-
 %feature("docstring")  Histogram1D::Histogram1D "Histogram1D::Histogram1D(const IAxis &axis)
 
 Constructor for 1D histogram with custom axis. 
@@ -683,20 +672,6 @@ yup:
 upper edge of the last bin of Y-axis 
 ";
 
-%feature("docstring")  Histogram2D::Histogram2D "Histogram2D::Histogram2D(const std::vector< double > &xbins, const std::vector< double > &ybins)
-
-Constructor for variable bin size histograms.
-
-Parameters:
------------
-
-xbins: 
-Array of size nbins+1 containing low-edges for each bin and upper edge of last bin.
-
-ybins: 
-Array of size nbins+1 containing low-edges for each bin and upper edge of last bin. 
-";
-
 %feature("docstring")  Histogram2D::Histogram2D "Histogram2D::Histogram2D(const IAxis &axis_x, const IAxis &axis_y)
 
 Constructor for 2D histogram with custom axes. 
diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py
index 5ebbe821e00..1733b39ab2c 100644
--- a/auto/Wrap/libBornAgainDevice.py
+++ b/auto/Wrap/libBornAgainDevice.py
@@ -4647,7 +4647,6 @@ class Histogram1D(IHistogram):
     def __init__(self, *args):
         r"""
         __init__(Histogram1D self, int nbinsx, double xlow, double xup) -> Histogram1D
-        __init__(Histogram1D self, vdouble1d_t xbins) -> Histogram1D
         __init__(Histogram1D self, IAxis axis) -> Histogram1D
         __init__(Histogram1D self, IntensityData data) -> Histogram1D
         Histogram1D::Histogram1D(const Powerfield< double > &data)
@@ -4771,7 +4770,6 @@ class Histogram2D(IHistogram):
     def __init__(self, *args):
         r"""
         __init__(Histogram2D self, int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup) -> Histogram2D
-        __init__(Histogram2D self, vdouble1d_t xbins, vdouble1d_t ybins) -> Histogram2D
         __init__(Histogram2D self, IAxis axis_x, IAxis axis_y) -> Histogram2D
         __init__(Histogram2D self, IntensityData data) -> Histogram2D
         Histogram2D::Histogram2D(const Powerfield< double > &data)
diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp
index e38e72a2a61..68c64702b23 100644
--- a/auto/Wrap/libBornAgainDevice_wrap.cpp
+++ b/auto/Wrap/libBornAgainDevice_wrap.cpp
@@ -37716,34 +37716,6 @@ fail:
 
 
 SWIGINTERN PyObject *_wrap_new_Histogram1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
-  PyObject *resultobj = 0;
-  std::vector< double,std::allocator< double > > *arg1 = 0 ;
-  int res1 = SWIG_OLDOBJ ;
-  Histogram1D *result = 0 ;
-  
-  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
-  {
-    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
-    res1 = swig::asptr(swig_obj[0], &ptr);
-    if (!SWIG_IsOK(res1)) {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Histogram1D" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
-    }
-    if (!ptr) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Histogram1D" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
-    }
-    arg1 = ptr;
-  }
-  result = (Histogram1D *)new Histogram1D((std::vector< double,std::allocator< double > > const &)*arg1);
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Histogram1D, SWIG_POINTER_NEW |  0 );
-  if (SWIG_IsNewObj(res1)) delete arg1;
-  return resultobj;
-fail:
-  if (SWIG_IsNewObj(res1)) delete arg1;
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_new_Histogram1D__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
   IAxis *arg1 = 0 ;
   void *argp1 = 0 ;
@@ -37767,7 +37739,7 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_new_Histogram1D__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
+SWIGINTERN PyObject *_wrap_new_Histogram1D__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
   Powerfield< double > *arg1 = 0 ;
   void *argp1 = 0 ;
@@ -37804,7 +37776,7 @@ SWIGINTERN PyObject *_wrap_new_Histogram1D(PyObject *self, PyObject *args) {
     int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IAxis, SWIG_POINTER_NO_NULL | 0);
     _v = SWIG_CheckState(res);
     if (_v) {
-      return _wrap_new_Histogram1D__SWIG_2(self, argc, argv);
+      return _wrap_new_Histogram1D__SWIG_1(self, argc, argv);
     }
   }
   if (argc == 1) {
@@ -37812,15 +37784,7 @@ SWIGINTERN PyObject *_wrap_new_Histogram1D(PyObject *self, PyObject *args) {
     int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_NO_NULL | 0);
     _v = SWIG_CheckState(res);
     if (_v) {
-      return _wrap_new_Histogram1D__SWIG_3(self, argc, argv);
-    }
-  }
-  if (argc == 1) {
-    int _v;
-    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      return _wrap_new_Histogram1D__SWIG_1(self, argc, argv);
+      return _wrap_new_Histogram1D__SWIG_2(self, argc, argv);
     }
   }
   if (argc == 3) {
@@ -37850,7 +37814,6 @@ fail:
   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_Histogram1D'.\n"
     "  Possible C/C++ prototypes are:\n"
     "    Histogram1D::Histogram1D(int,double,double)\n"
-    "    Histogram1D::Histogram1D(std::vector< double,std::allocator< double > > const &)\n"
     "    Histogram1D::Histogram1D(IAxis const &)\n"
     "    Histogram1D::Histogram1D(Powerfield< double > const &)\n");
   return 0;
@@ -38294,49 +38257,6 @@ fail:
 
 
 SWIGINTERN PyObject *_wrap_new_Histogram2D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
-  PyObject *resultobj = 0;
-  std::vector< double,std::allocator< double > > *arg1 = 0 ;
-  std::vector< double,std::allocator< double > > *arg2 = 0 ;
-  int res1 = SWIG_OLDOBJ ;
-  int res2 = SWIG_OLDOBJ ;
-  Histogram2D *result = 0 ;
-  
-  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
-  {
-    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
-    res1 = swig::asptr(swig_obj[0], &ptr);
-    if (!SWIG_IsOK(res1)) {
-      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Histogram2D" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
-    }
-    if (!ptr) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Histogram2D" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
-    }
-    arg1 = ptr;
-  }
-  {
-    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
-    res2 = swig::asptr(swig_obj[1], &ptr);
-    if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Histogram2D" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
-    }
-    if (!ptr) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Histogram2D" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
-    }
-    arg2 = ptr;
-  }
-  result = (Histogram2D *)new Histogram2D((std::vector< double,std::allocator< double > > const &)*arg1,(std::vector< double,std::allocator< double > > const &)*arg2);
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Histogram2D, SWIG_POINTER_NEW |  0 );
-  if (SWIG_IsNewObj(res1)) delete arg1;
-  if (SWIG_IsNewObj(res2)) delete arg2;
-  return resultobj;
-fail:
-  if (SWIG_IsNewObj(res1)) delete arg1;
-  if (SWIG_IsNewObj(res2)) delete arg2;
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_new_Histogram2D__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
   IAxis *arg1 = 0 ;
   IAxis *arg2 = 0 ;
@@ -38371,7 +38291,7 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_new_Histogram2D__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
+SWIGINTERN PyObject *_wrap_new_Histogram2D__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
   Powerfield< double > *arg1 = 0 ;
   void *argp1 = 0 ;
@@ -38408,7 +38328,7 @@ SWIGINTERN PyObject *_wrap_new_Histogram2D(PyObject *self, PyObject *args) {
     int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_PowerfieldT_double_t, SWIG_POINTER_NO_NULL | 0);
     _v = SWIG_CheckState(res);
     if (_v) {
-      return _wrap_new_Histogram2D__SWIG_3(self, argc, argv);
+      return _wrap_new_Histogram2D__SWIG_2(self, argc, argv);
     }
   }
   if (argc == 2) {
@@ -38418,18 +38338,6 @@ SWIGINTERN PyObject *_wrap_new_Histogram2D(PyObject *self, PyObject *args) {
     if (_v) {
       int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_IAxis, SWIG_POINTER_NO_NULL | 0);
       _v = SWIG_CheckState(res);
-      if (_v) {
-        return _wrap_new_Histogram2D__SWIG_2(self, argc, argv);
-      }
-    }
-  }
-  if (argc == 2) {
-    int _v;
-    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      int res = swig::asptr(argv[1], (std::vector< double,std::allocator< double > >**)(0));
-      _v = SWIG_CheckState(res);
       if (_v) {
         return _wrap_new_Histogram2D__SWIG_1(self, argc, argv);
       }
@@ -38480,7 +38388,6 @@ fail:
   SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_Histogram2D'.\n"
     "  Possible C/C++ prototypes are:\n"
     "    Histogram2D::Histogram2D(int,double,double,int,double,double)\n"
-    "    Histogram2D::Histogram2D(std::vector< double,std::allocator< double > > const &,std::vector< double,std::allocator< double > > const &)\n"
     "    Histogram2D::Histogram2D(IAxis const &,IAxis const &)\n"
     "    Histogram2D::Histogram2D(Powerfield< double > const &)\n");
   return 0;
@@ -42804,7 +42711,6 @@ static PyMethodDef SwigMethods[] = {
 	 { "IHistogram_swigregister", IHistogram_swigregister, METH_O, NULL},
 	 { "new_Histogram1D", _wrap_new_Histogram1D, METH_VARARGS, "\n"
 		"Histogram1D(int nbinsx, double xlow, double xup)\n"
-		"Histogram1D(vdouble1d_t xbins)\n"
 		"Histogram1D(IAxis axis)\n"
 		"new_Histogram1D(IntensityData data) -> Histogram1D\n"
 		"Histogram1D::Histogram1D(const Powerfield< double > &data)\n"
@@ -42881,7 +42787,6 @@ static PyMethodDef SwigMethods[] = {
 	 { "Histogram1D_swiginit", Histogram1D_swiginit, METH_VARARGS, NULL},
 	 { "new_Histogram2D", _wrap_new_Histogram2D, METH_VARARGS, "\n"
 		"Histogram2D(int nbinsx, double xlow, double xup, int nbinsy, double ylow, double yup)\n"
-		"Histogram2D(vdouble1d_t xbins, vdouble1d_t ybins)\n"
 		"Histogram2D(IAxis axis_x, IAxis axis_y)\n"
 		"new_Histogram2D(IntensityData data) -> Histogram2D\n"
 		"Histogram2D::Histogram2D(const Powerfield< double > &data)\n"
-- 
GitLab