From 3377189ad5b1ed3f4622cd8be8f80aafd3c38a31 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Sun, 29 May 2022 09:45:51 +0200
Subject: [PATCH] Frame: rm unused fct

---
 Base/Axis/Frame.cpp                  |   5 --
 Base/Axis/Frame.h                    |   6 --
 Tests/Unit/Device/PowerfieldTest.cpp |  20 -----
 auto/Wrap/doxygenBase.i              |  22 +----
 auto/Wrap/libBornAgainBase.py        |  21 +++--
 auto/Wrap/libBornAgainBase_wrap.cpp  | 122 +++------------------------
 6 files changed, 29 insertions(+), 167 deletions(-)

diff --git a/Base/Axis/Frame.cpp b/Base/Axis/Frame.cpp
index a0fed6c0047..eed072964c1 100644
--- a/Base/Axis/Frame.cpp
+++ b/Base/Axis/Frame.cpp
@@ -53,11 +53,6 @@ Bin1D Frame::getAxisBin(size_t global_index, size_t i_selected_axis) const
     return m_axes[i_selected_axis]->bin(axis_index);
 }
 
-Bin1D Frame::getAxisBin(size_t global_index, const std::string& axis_name) const
-{
-    return getAxisBin(global_index, getAxisIndex(axis_name));
-}
-
 size_t Frame::getAxisIndex(const std::string& axis_name) const
 {
     for (size_t i = 0; i < m_axes.size(); ++i)
diff --git a/Base/Axis/Frame.h b/Base/Axis/Frame.h
index 6719e6fc218..04cfe8e5a5f 100644
--- a/Base/Axis/Frame.h
+++ b/Base/Axis/Frame.h
@@ -61,12 +61,6 @@ public:
     //! @return Corresponding Bin1D object
     Bin1D getAxisBin(size_t global_index, size_t i_selected_axis) const;
 
-    //! Returns bin of selected axis for given global_index.
-    //! @param global_index The global index of this data structure.
-    //! @param axis_name The name of selected axis.
-    //! @return Corresponding Bin1D object
-    Bin1D getAxisBin(size_t global_index, const std::string& axis_name) const;
-
     //! Returns axis bin index for given global index
     //! @param global_index The global index of this data structure.
     //! @param axis_name The name of selected axis.
diff --git a/Tests/Unit/Device/PowerfieldTest.cpp b/Tests/Unit/Device/PowerfieldTest.cpp
index 57dc0edfc4a..4172608a2f6 100644
--- a/Tests/Unit/Device/PowerfieldTest.cpp
+++ b/Tests/Unit/Device/PowerfieldTest.cpp
@@ -89,26 +89,6 @@ TEST_F(PowerfieldTest, ValueOfAxis)
     EXPECT_EQ(2.5, coordinates[1]);
 }
 
-// y |
-// --------------------------------------------
-// 1 | 1   3   5   7   9   11  13  15  17  19 |
-// 0 | 0   2   4   6   8   10  12  14  16  18 |
-// --------------------------------------------
-//   | 0   1   2   3   4   5   6   7   8   9  | x
-TEST_F(PowerfieldTest, GetAxisBin)
-{
-    Powerfield<double> data{FixedBinAxis("axis1", 10, 0., 10.), FixedBinAxis("axis2", 2, 0., 10.)};
-
-    EXPECT_EQ(0.5, data.getAxisBin(0, "axis1").center());
-    EXPECT_EQ(0.5, data.getAxisBin(1, "axis1").center());
-    EXPECT_EQ(9.5, data.getAxisBin(18, "axis1").center());
-    EXPECT_EQ(9.5, data.getAxisBin(19, "axis1").center());
-    EXPECT_EQ(2.5, data.getAxisBin(0, "axis2").center());
-    EXPECT_EQ(7.5, data.getAxisBin(1, "axis2").center());
-    EXPECT_EQ(2.5, data.getAxisBin(18, "axis2").center());
-    EXPECT_EQ(7.5, data.getAxisBin(19, "axis2").center());
-}
-
 TEST_F(PowerfieldTest, SetCleared)
 {
     db_data.clear();
diff --git a/auto/Wrap/doxygenBase.i b/auto/Wrap/doxygenBase.i
index 67d2da01eaa..48e4507ab84 100644
--- a/auto/Wrap/doxygenBase.i
+++ b/auto/Wrap/doxygenBase.i
@@ -428,22 +428,6 @@ Serial number of selected axis.
 Corresponding  Bin1D object 
 ";
 
-%feature("docstring")  Frame::getAxisBin "Bin1D Frame::getAxisBin(size_t global_index, const std::string &axis_name) const
-
-Returns bin of selected axis for given global_index.
-
-Parameters:
------------
-
-global_index: 
-The global index of this data structure.
-
-axis_name: 
-The name of selected axis.
-
-Corresponding  Bin1D object 
-";
-
 %feature("docstring")  Frame::getAxisBinIndex "size_t Frame::getAxisBinIndex(size_t global_index, const std::string &axis_name) const
 
 Returns axis bin index for given global index
@@ -993,7 +977,7 @@ C++ includes: RectangularPixel.h
 // File: classRotMatrix.xml
 %feature("docstring") RotMatrix "
 
-Rotation matrix in three dimensions.
+Rotation matrix in three dimensions. Represents group SO(3). Internal parameterization based on quaternions.
 
 C++ includes: RotMatrix.h
 ";
@@ -1013,7 +997,7 @@ Destructor.
 Calculates the Euler angles corresponding to the rotation. 
 ";
 
-%feature("docstring")  RotMatrix::getInverse "RotMatrix RotMatrix::getInverse() const
+%feature("docstring")  RotMatrix::Inverse "RotMatrix RotMatrix::Inverse() const
 
 Returns the inverse transformation. 
 ";
@@ -1023,7 +1007,7 @@ Returns the inverse transformation.
 Return transformed vector  v. 
 ";
 
-%feature("docstring")  RotMatrix::transformedInverse "template C3 RotMatrix::transformedInverse< C3 >(const T &v) const
+%feature("docstring")  RotMatrix::counterTransformed "template C3 RotMatrix::counterTransformed< C3 >(const T &v) const
 
 Return transformed vector  v. 
 ";
diff --git a/auto/Wrap/libBornAgainBase.py b/auto/Wrap/libBornAgainBase.py
index 82e8fc768d3..241c1c1f79a 100644
--- a/auto/Wrap/libBornAgainBase.py
+++ b/auto/Wrap/libBornAgainBase.py
@@ -1878,7 +1878,7 @@ class RotMatrix(object):
     r"""
 
 
-    Rotation matrix in three dimensions.
+    Rotation matrix in three dimensions. Represents group SO(3). Internal parameterization based on quaternions.
 
     C++ includes: RotMatrix.h
 
@@ -1929,7 +1929,13 @@ class RotMatrix(object):
         return _libBornAgainBase.RotMatrix_zxzEulerAngles(self)
 
     def Inverse(self):
-        r"""Inverse(RotMatrix self) -> RotMatrix"""
+        r"""
+        Inverse(RotMatrix self) -> RotMatrix
+        RotMatrix RotMatrix::Inverse() const
+
+        Returns the inverse transformation. 
+
+        """
         return _libBornAgainBase.RotMatrix_Inverse(self)
 
     def __mul__(self, arg2):
@@ -2831,11 +2837,10 @@ class Frame(object):
         """
         return _libBornAgainBase.Frame_getAxesValues(self, global_index)
 
-    def getAxisBin(self, *args):
+    def getAxisBin(self, global_index, i_selected_axis):
         r"""
         getAxisBin(Frame self, size_t global_index, size_t i_selected_axis) -> Bin1D
-        getAxisBin(Frame self, size_t global_index, std::string const & axis_name) -> Bin1D
-        Bin1D Frame::getAxisBin(size_t global_index, const std::string &axis_name) const
+        Bin1D Frame::getAxisBin(size_t global_index, size_t i_selected_axis) const
 
         Returns bin of selected axis for given global_index.
 
@@ -2845,13 +2850,13 @@ class Frame(object):
         global_index: 
         The global index of this data structure.
 
-        axis_name: 
-        The name of selected axis.
+        i_selected_axis: 
+        Serial number of selected axis.
 
         Corresponding  Bin1D object 
 
         """
-        return _libBornAgainBase.Frame_getAxisBin(self, *args)
+        return _libBornAgainBase.Frame_getAxisBin(self, global_index, i_selected_axis)
 
     def getAxesBinIndices(self, global_index):
         r"""
diff --git a/auto/Wrap/libBornAgainBase_wrap.cpp b/auto/Wrap/libBornAgainBase_wrap.cpp
index 7ad86da405a..667a0609883 100644
--- a/auto/Wrap/libBornAgainBase_wrap.cpp
+++ b/auto/Wrap/libBornAgainBase_wrap.cpp
@@ -27570,7 +27570,7 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Frame_getAxisBin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
+SWIGINTERN PyObject *_wrap_Frame_getAxisBin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   Frame *arg1 = (Frame *) 0 ;
   size_t arg2 ;
@@ -27581,9 +27581,10 @@ SWIGINTERN PyObject *_wrap_Frame_getAxisBin__SWIG_0(PyObject *SWIGUNUSEDPARM(sel
   int ecode2 = 0 ;
   size_t val3 ;
   int ecode3 = 0 ;
+  PyObject *swig_obj[3] ;
   Bin1D result;
   
-  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
+  if (!SWIG_Python_UnpackTuple(args, "Frame_getAxisBin", 3, 3, swig_obj)) SWIG_fail;
   res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Frame, 0 |  0 );
   if (!SWIG_IsOK(res1)) {
     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Frame_getAxisBin" "', argument " "1"" of type '" "Frame const *""'"); 
@@ -27607,108 +27608,6 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_Frame_getAxisBin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
-  PyObject *resultobj = 0;
-  Frame *arg1 = (Frame *) 0 ;
-  size_t arg2 ;
-  std::string *arg3 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  int res3 = SWIG_OLDOBJ ;
-  Bin1D result;
-  
-  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Frame, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Frame_getAxisBin" "', argument " "1"" of type '" "Frame const *""'"); 
-  }
-  arg1 = reinterpret_cast< Frame * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Frame_getAxisBin" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    std::string *ptr = (std::string *)0;
-    res3 = SWIG_AsPtr_std_string(swig_obj[2], &ptr);
-    if (!SWIG_IsOK(res3)) {
-      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Frame_getAxisBin" "', argument " "3"" of type '" "std::string const &""'"); 
-    }
-    if (!ptr) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Frame_getAxisBin" "', argument " "3"" of type '" "std::string const &""'"); 
-    }
-    arg3 = ptr;
-  }
-  result = ((Frame const *)arg1)->getAxisBin(arg2,(std::string const &)*arg3);
-  resultobj = SWIG_NewPointerObj((new Bin1D(static_cast< const Bin1D& >(result))), SWIGTYPE_p_Bin1D, SWIG_POINTER_OWN |  0 );
-  if (SWIG_IsNewObj(res3)) delete arg3;
-  return resultobj;
-fail:
-  if (SWIG_IsNewObj(res3)) delete arg3;
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Frame_getAxisBin(PyObject *self, PyObject *args) {
-  Py_ssize_t argc;
-  PyObject *argv[4] = {
-    0
-  };
-  
-  if (!(argc = SWIG_Python_UnpackTuple(args, "Frame_getAxisBin", 0, 3, argv))) SWIG_fail;
-  --argc;
-  if (argc == 3) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Frame, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_size_t(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        {
-          int res = SWIG_AsVal_size_t(argv[2], NULL);
-          _v = SWIG_CheckState(res);
-        }
-        if (_v) {
-          return _wrap_Frame_getAxisBin__SWIG_0(self, argc, argv);
-        }
-      }
-    }
-  }
-  if (argc == 3) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Frame, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_size_t(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
-        _v = SWIG_CheckState(res);
-        if (_v) {
-          return _wrap_Frame_getAxisBin__SWIG_1(self, argc, argv);
-        }
-      }
-    }
-  }
-  
-fail:
-  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Frame_getAxisBin'.\n"
-    "  Possible C/C++ prototypes are:\n"
-    "    Frame::getAxisBin(size_t,size_t) const\n"
-    "    Frame::getAxisBin(size_t,std::string const &) const\n");
-  return 0;
-}
-
-
 SWIGINTERN PyObject *_wrap_Frame_getAxisBinIndex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
   PyObject *resultobj = 0;
   Frame *arg1 = (Frame *) 0 ;
@@ -30027,7 +29926,13 @@ static PyMethodDef SwigMethods[] = {
 		"Calculates the Euler angles corresponding to the rotation. \n"
 		"\n"
 		""},
-	 { "RotMatrix_Inverse", _wrap_RotMatrix_Inverse, METH_O, "RotMatrix_Inverse(RotMatrix self) -> RotMatrix"},
+	 { "RotMatrix_Inverse", _wrap_RotMatrix_Inverse, METH_O, "\n"
+		"RotMatrix_Inverse(RotMatrix self) -> RotMatrix\n"
+		"RotMatrix RotMatrix::Inverse() const\n"
+		"\n"
+		"Returns the inverse transformation. \n"
+		"\n"
+		""},
 	 { "RotMatrix___mul__", _wrap_RotMatrix___mul__, METH_VARARGS, "RotMatrix___mul__(RotMatrix self, RotMatrix arg2) -> RotMatrix"},
 	 { "RotMatrix___eq__", _wrap_RotMatrix___eq__, METH_VARARGS, "RotMatrix___eq__(RotMatrix self, RotMatrix arg2) -> bool"},
 	 { "RotMatrix_isIdentity", _wrap_RotMatrix_isIdentity, METH_O, "\n"
@@ -30605,8 +30510,7 @@ static PyMethodDef SwigMethods[] = {
 		""},
 	 { "Frame_getAxisBin", _wrap_Frame_getAxisBin, METH_VARARGS, "\n"
 		"Frame_getAxisBin(Frame self, size_t global_index, size_t i_selected_axis) -> Bin1D\n"
-		"Frame_getAxisBin(Frame self, size_t global_index, std::string const & axis_name) -> Bin1D\n"
-		"Bin1D Frame::getAxisBin(size_t global_index, const std::string &axis_name) const\n"
+		"Bin1D Frame::getAxisBin(size_t global_index, size_t i_selected_axis) const\n"
 		"\n"
 		"Returns bin of selected axis for given global_index.\n"
 		"\n"
@@ -30616,8 +30520,8 @@ static PyMethodDef SwigMethods[] = {
 		"global_index: \n"
 		"The global index of this data structure.\n"
 		"\n"
-		"axis_name: \n"
-		"The name of selected axis.\n"
+		"i_selected_axis: \n"
+		"Serial number of selected axis.\n"
 		"\n"
 		"Corresponding  Bin1D object \n"
 		"\n"
-- 
GitLab