From 508da2634d89f22ac110d1e4ff9ceb4fb8fb565d Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Fri, 12 Nov 2021 23:12:32 +0100 Subject: [PATCH] clang-tidy Device; 1 manual correction (IDetector copy c'tor initalize INode) --- Device/Beam/Beam.h | 6 +- Device/Beam/FootprintGauss.h | 2 +- Device/Beam/FootprintSquare.h | 2 +- Device/Beam/IFootprintFactor.h | 4 +- Device/Coord/CoordSystem1D.cpp | 2 +- Device/Coord/CoordSystem2D.h | 4 +- Device/Coord/ICoordSystem.h | 6 +- Device/Data/DataUtils.h | 2 +- Device/Data/LLData.h | 12 +- Device/Data/OutputData.h | 14 +- Device/Data/OutputDataIterator.h | 17 +-- Device/Detector/IDetector.cpp | 7 +- Device/Detector/IDetector.h | 8 +- Device/Detector/IDetector2D.cpp | 5 +- Device/Detector/IDetector2D.h | 8 +- Device/Detector/RectangularDetector.cpp | 15 +- Device/Detector/RectangularDetector.h | 10 +- Device/Detector/SimulationAreaIterator.h | 2 +- Device/Detector/SpecularDetector1D.h | 6 +- Device/Detector/SphericalDetector.cpp | 2 +- Device/Detector/SphericalDetector.h | 4 +- Device/Histo/HistoUtils.cpp | 2 +- Device/Histo/Histogram1D.h | 4 +- Device/Histo/Histogram2D.h | 4 +- Device/Histo/IHistogram.cpp | 2 +- Device/Histo/SimulationResult.cpp | 10 +- Device/Histo/SimulationResult.h | 4 +- .../InputOutput/OutputDataReadWriteTiff.cpp | 5 +- Device/Instrument/Instrument.h | 2 +- Device/Mask/Ellipse.h | 6 +- Device/Mask/IShape2D.h | 2 +- Device/Mask/InfinitePlane.h | 6 +- Device/Mask/Line.h | 18 +-- Device/Mask/Polygon.h | 14 +- Device/Mask/Rectangle.h | 6 +- Device/Pol/PolFilter.h | 6 +- .../ConvolutionDetectorResolution.cpp | 2 +- .../ConvolutionDetectorResolution.h | 4 +- Device/Resolution/Convolve.cpp | 20 +-- Device/Resolution/Convolve.h | 4 +- Device/Resolution/IDetectorResolution.h | 2 +- Device/Resolution/IResolutionFunction2D.h | 4 +- auto/Wrap/doxygenDevice.i | 130 ++++++++-------- auto/Wrap/libBornAgainDevice.py | 84 +++++------ auto/Wrap/libBornAgainDevice_wrap.cpp | 142 +++++++++--------- 45 files changed, 304 insertions(+), 317 deletions(-) diff --git a/Device/Beam/Beam.h b/Device/Beam/Beam.h index 8ec698362a1..fc43ab9e790 100644 --- a/Device/Beam/Beam.h +++ b/Device/Beam/Beam.h @@ -35,7 +35,7 @@ public: Beam(const Beam& other); Beam& operator=(const Beam& other); - virtual ~Beam(); + ~Beam() override; Beam* clone() const; @@ -73,14 +73,14 @@ public: void setWavelength(double wavelength); void setDirection(const Direction& direction); - void setInclination(const double alpha); + void setInclination(double alpha); void setInclinationLimits(const RealLimits& limits); //! Sets the beam intensity in neutrons/sec void setIntensity(double intensity) { m_intensity = intensity; } //! Sets footprint factor to the beam. void setFootprintFactor(const IFootprintFactor& shape_factor); //! Sets the polarization density matrix according to the given Bloch vector - void setPolarization(const R3 bloch_vector); + void setPolarization(R3 bloch_vector); private: Beam(); // needed by Swig diff --git a/Device/Beam/FootprintGauss.h b/Device/Beam/FootprintGauss.h index 94113199f75..867b0f128de 100644 --- a/Device/Beam/FootprintGauss.h +++ b/Device/Beam/FootprintGauss.h @@ -27,7 +27,7 @@ public: inline static const std::string class_name = "FootprintGauss"; std::string className() const final { return class_name; } - FootprintGauss(const std::vector<double> P); + FootprintGauss(std::vector<double> P); FootprintGauss(double width_ratio); void accept(INodeVisitor* visitor) const override { visitor->visit(this); } diff --git a/Device/Beam/FootprintSquare.h b/Device/Beam/FootprintSquare.h index 1f3bf39953e..efac4d5d01d 100644 --- a/Device/Beam/FootprintSquare.h +++ b/Device/Beam/FootprintSquare.h @@ -25,7 +25,7 @@ public: inline static const std::string class_name = "FootprintSquare"; std::string className() const final { return class_name; } - FootprintSquare(const std::vector<double> P); + FootprintSquare(std::vector<double> P); FootprintSquare(double width_ratio); void accept(INodeVisitor* visitor) const override { visitor->visit(this); } diff --git a/Device/Beam/IFootprintFactor.h b/Device/Beam/IFootprintFactor.h index abfae6a3715..b25703c8b74 100644 --- a/Device/Beam/IFootprintFactor.h +++ b/Device/Beam/IFootprintFactor.h @@ -28,9 +28,9 @@ class Beam; class IFootprintFactor : public ICloneable, public INode { public: IFootprintFactor(const NodeMeta& meta, const std::vector<double>& PValues); - virtual ~IFootprintFactor(); + ~IFootprintFactor() override; - virtual IFootprintFactor* clone() const = 0; + IFootprintFactor* clone() const override = 0; double widthRatio() const { return m_width_ratio; } diff --git a/Device/Coord/CoordSystem1D.cpp b/Device/Coord/CoordSystem1D.cpp index 065042a1728..3319a261a03 100644 --- a/Device/Coord/CoordSystem1D.cpp +++ b/Device/Coord/CoordSystem1D.cpp @@ -82,7 +82,7 @@ PointwiseAxis* createAxisFrom(const IAxis& axis, Axes::Coords coords, const std: // class CoordSystem1D // ************************************************************************************************ -CoordSystem1D::CoordSystem1D(const IAxis*&& axis) : m_axis(std::move(axis)) {} +CoordSystem1D::CoordSystem1D(const IAxis*&& axis) : m_axis(axis) {} //! Returns the size of underlying axis. size_t CoordSystem1D::axisSize(size_t i_axis) const diff --git a/Device/Coord/CoordSystem2D.h b/Device/Coord/CoordSystem2D.h index 0ad80904b82..9591854893c 100644 --- a/Device/Coord/CoordSystem2D.h +++ b/Device/Coord/CoordSystem2D.h @@ -34,7 +34,7 @@ public: CoordSystem2D(const Direction& direction, double wavelength = 0); ~CoordSystem2D() override = default; - virtual size_t dimension() const override { return m_axes.size(); } + size_t dimension() const override { return m_axes.size(); } double calculateMin(size_t i_axis, Axes::Coords units) const override; double calculateMax(size_t i_axis, Axes::Coords units) const override; @@ -145,7 +145,7 @@ public: private: const Axes::Coords m_defaultUnits{Axes::Coords::DEGREES}; - OffSpecularCoordinates(const Direction& direction, const IAxis& alphaAxis, double alpha_f_min, + OffSpecularCoordinates(const Direction& direction, const IAxis& alpha_axis, double alpha_f_min, double alpha_f_max, size_t nbins); OffSpecularCoordinates(const OffSpecularCoordinates& other); //!< used by clone() double calculateValue(size_t i_axis, Axes::Coords units, double value) const override; diff --git a/Device/Coord/ICoordSystem.h b/Device/Coord/ICoordSystem.h index 3cc226cbae0..edbfafb5b84 100644 --- a/Device/Coord/ICoordSystem.h +++ b/Device/Coord/ICoordSystem.h @@ -39,9 +39,9 @@ template <class T> class OutputData; class ICoordSystem : public ICloneable { public: - virtual ~ICoordSystem(); + ~ICoordSystem() override; - virtual ICoordSystem* clone() const = 0; + ICoordSystem* clone() const override = 0; //! Returns zero-valued output data array in specified units std::unique_ptr<OutputData<double>> createOutputData(Axes::Coords units) const; @@ -52,7 +52,7 @@ public: virtual double calculateMax(size_t i_axis, Axes::Coords units) const = 0; virtual size_t axisSize(size_t i_axis) const = 0; - std::string axisName(size_t i_axis, const Axes::Coords units = Axes::Coords::UNDEFINED) const; + std::string axisName(size_t i_axis, Axes::Coords units = Axes::Coords::UNDEFINED) const; virtual std::vector<Axes::Coords> availableUnits() const = 0; virtual Axes::Coords defaultUnits() const = 0; diff --git a/Device/Data/DataUtils.h b/Device/Data/DataUtils.h index 1b80bfea451..1145edb22a9 100644 --- a/Device/Data/DataUtils.h +++ b/Device/Data/DataUtils.h @@ -25,7 +25,7 @@ double relativeDataDifference(const OutputData<double>& dat, const OutputData<do //! Returns true is relative difference is below threshold; prints informative output bool checkRelativeDifference(const OutputData<double>& dat, const OutputData<double>& ref, - const double threshold); + double threshold); //! Transforms coordinate on axis into the bin-fraction-coordinate. double coordinateToBinf(double coordinate, const IAxis& axis); diff --git a/Device/Data/LLData.h b/Device/Data/LLData.h index 38d23a843e4..f3f46e54318 100644 --- a/Device/Data/LLData.h +++ b/Device/Data/LLData.h @@ -82,12 +82,12 @@ template <class T> LLData<T> operator/(const LLData<T>& left, const LLData<T>& r template <class T> bool HaveSameDimensions(const LLData<T>& left, const LLData<T>& right); template <class T> -inline LLData<T>::LLData(size_t rank, const int* dimensions) : m_rank(0), m_dims(0), m_data_array(0) +inline LLData<T>::LLData(size_t rank, const int* dimensions) : m_rank(0), m_dims(nullptr), m_data_array(0) { allocate(rank, dimensions); } -template <class T> LLData<T>::LLData(const LLData<T>& right) : m_rank(0), m_dims(0), m_data_array(0) +template <class T> LLData<T>::LLData(const LLData<T>& right) : m_rank(0), m_dims(nullptr), m_data_array(0) { allocate(right.rank(), right.dimensions()); for (size_t i = 0; i < getTotalSize(); ++i) @@ -234,28 +234,28 @@ template <class T> T LLData<T>::getZeroElement() const template <class T> LLData<T> operator+(const LLData<T>& left, const LLData<T>& right) { - LLData<T>* p_result = new LLData<T>(left); + auto* p_result = new LLData<T>(left); (*p_result) += right; return *p_result; } template <class T> LLData<T> operator-(const LLData<T>& left, const LLData<T>& right) { - LLData<T>* p_result = new LLData<T>(left); + auto* p_result = new LLData<T>(left); (*p_result) -= right; return *p_result; } template <class T> LLData<T> operator*(const LLData<T>& left, const LLData<T>& right) { - LLData<T>* p_result = new LLData<T>(left); + auto* p_result = new LLData<T>(left); (*p_result) *= right; return *p_result; } template <class T> LLData<T> operator/(const LLData<T>& left, const LLData<T>& right) { - LLData<T>* p_result = new LLData<T>(left); + auto* p_result = new LLData<T>(left); *p_result /= right; return *p_result; } diff --git a/Device/Data/OutputData.h b/Device/Data/OutputData.h index d19f3c65cdb..881d4f6517a 100644 --- a/Device/Data/OutputData.h +++ b/Device/Data/OutputData.h @@ -36,12 +36,12 @@ public: OutputData(); OutputData(const OutputData&) = delete; - OutputData(OutputData&&); + OutputData(OutputData&&) noexcept ; const OutputData& operator=(const OutputData&) = delete; ~OutputData(); OutputData* clone() const; - void copyFrom(const OutputData<T>& x); + void copyFrom(const OutputData<T>& other); template <class U> void copyShapeFrom(const OutputData<U>& other); OutputData<double>* meanValues() const; @@ -80,10 +80,10 @@ public: friend class OutputDataIterator<const T, const OutputData<T>>; //! Read/write iterator type - typedef OutputDataIterator<T, OutputData<T>> iterator; + using iterator = OutputDataIterator<T, OutputData<T>>; //! Read-only iterator type - typedef OutputDataIterator<const T, const OutputData<T>> const_iterator; + using const_iterator = OutputDataIterator<const T, const OutputData<T>>; //! Returns read/write iterator that points to the first element iterator begin(); @@ -236,7 +236,7 @@ private: // --------------------------------------------------------------------- // template <class T> OutputData<T>::OutputData(OutputData<T>&& other) -{ + noexcept { m_axes = std::move(other.m_axes); m_ll_data = other.m_ll_data; @@ -244,7 +244,7 @@ template <class T> OutputData<T>::OutputData(OutputData<T>&& other) other.allocate(); } -template <class T> OutputData<T>::OutputData() : m_axes(), m_ll_data(nullptr) +template <class T> OutputData<T>::OutputData() : m_ll_data(nullptr) { allocate(); } @@ -257,7 +257,7 @@ template <class T> OutputData<T>::~OutputData() template <class T> OutputData<T>* OutputData<T>::clone() const { - OutputData<T>* ret = new OutputData<T>(); + auto* ret = new OutputData<T>(); ret->m_axes = m_axes; (*ret->m_ll_data) = *m_ll_data; return ret; diff --git a/Device/Data/OutputDataIterator.h b/Device/Data/OutputDataIterator.h index ac0adab6a09..24de8436da1 100644 --- a/Device/Data/OutputDataIterator.h +++ b/Device/Data/OutputDataIterator.h @@ -74,14 +74,14 @@ public: void swap(OutputDataIterator<TValue, TContainer>& other); // typedefs for std::iterator_traits - typedef std::forward_iterator_tag iterator_category; - typedef TValue value_type; - typedef ptrdiff_t difference_type; - typedef TValue* pointer_type; - typedef TValue& reference_type; + using iterator_category = std::forward_iterator_tag; + using value_type = TValue; + using difference_type = ptrdiff_t; + using pointer_type = TValue *; + using reference_type = TValue &; //#ifdef _MSC_VER - typedef TValue* pointer; - typedef TValue& reference; + using pointer = TValue *; + using reference = TValue &; //#endif private: @@ -159,8 +159,7 @@ OutputDataIterator<TValue, TContainer>& OutputDataIterator<TValue, TContainer>:: template <class TValue, class TContainer> OutputDataIterator<TValue, TContainer>::~OutputDataIterator() -{ -} += default; template <class TValue, class TContainer> OutputDataIterator<TValue, TContainer>& OutputDataIterator<TValue, TContainer>::operator++() diff --git a/Device/Detector/IDetector.cpp b/Device/Detector/IDetector.cpp index a6141331ecb..13f9dd95d85 100644 --- a/Device/Detector/IDetector.cpp +++ b/Device/Detector/IDetector.cpp @@ -18,11 +18,10 @@ #include "Device/Resolution/ConvolutionDetectorResolution.h" #include "Resample/Element/DiffuseElement.h" -IDetector::IDetector() {} +IDetector::IDetector() = default; IDetector::IDetector(const IDetector& other) - : ICloneable() - , INode() + : INode() , m_explicitROI(other.m_explicitROI) , m_axes(other.m_axes) , m_detection_properties(other.m_detection_properties) @@ -124,7 +123,7 @@ CloneableVector<IAxis> IDetector::axesClippedToRegionOfInterest() const { CloneableVector<IAxis> result; for (size_t iAxis = 0; iAxis < m_axes.size(); ++iAxis) { - auto axis = m_axes[iAxis]->clone(); + auto *axis = m_axes[iAxis]->clone(); axis->clip(regionOfInterestBounds(iAxis)); result.push_back(axis); } diff --git a/Device/Detector/IDetector.h b/Device/Detector/IDetector.h index 50c52fda1c7..e3f8d302f49 100644 --- a/Device/Detector/IDetector.h +++ b/Device/Detector/IDetector.h @@ -54,7 +54,7 @@ public: IDetector* clone() const override = 0; - virtual ~IDetector(); + ~IDetector() override; //! Inits detector with the beam settings virtual void setDetectorNormal(const Direction&) {} // nontrivial only for RectangularDetector @@ -62,7 +62,7 @@ public: void addAxis(const IAxis& axis); //! Sets the polarization analyzer characteristics of the detector - void setAnalyzer(const R3 direction, double efficiency, double total_transmission); + void setAnalyzer(R3 direction, double efficiency, double total_transmission); //! Sets the detector resolution void setDetectorResolution(const IDetectorResolution& p_detector_resolution); void setResolutionFunction(const IResolutionFunction2D& resFunc); @@ -139,8 +139,8 @@ public: //! Convert an index of the region of interest to an index of the detector. //! If no region of interest is set, then the index stays unmodified (since ROI == detector //! area). - virtual size_t regionOfInterestIndexToDetectorIndex(const size_t regionOfInterestIndex) const; - virtual size_t detectorIndexToRegionOfInterestIndex(const size_t detectorIndex) const; + virtual size_t regionOfInterestIndexToDetectorIndex(size_t regionOfInterestIndex) const; + virtual size_t detectorIndexToRegionOfInterestIndex(size_t detectorIndex) const; //! Applies the detector resolution to the given intensity maps void applyDetectorResolution(OutputData<double>* p_intensity_map) const; diff --git a/Device/Detector/IDetector2D.cpp b/Device/Detector/IDetector2D.cpp index 1e0b6ef5698..c209b0c6192 100644 --- a/Device/Detector/IDetector2D.cpp +++ b/Device/Detector/IDetector2D.cpp @@ -37,9 +37,8 @@ inline size_t ycoord(size_t index, size_t sizeY) IDetector2D::IDetector2D() : m_detector_mask(new DetectorMask) {} IDetector2D::IDetector2D(const IDetector2D& other) - : IDetector(other), m_detector_mask(other.m_detector_mask) -{ -} + += default; IDetector2D::~IDetector2D() = default; diff --git a/Device/Detector/IDetector2D.h b/Device/Detector/IDetector2D.h index 6861c471162..9dac78347eb 100644 --- a/Device/Detector/IDetector2D.h +++ b/Device/Detector/IDetector2D.h @@ -34,7 +34,7 @@ public: IDetector2D* clone() const override = 0; - virtual ~IDetector2D(); + ~IDetector2D() override; //! Sets detector parameters using angle ranges void setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min, @@ -55,9 +55,9 @@ public: //! Sets rectangular region of interest with lower left and upper right corners defined. void setRegionOfInterest(double xlow, double ylow, double xup, double yup); - virtual size_t - regionOfInterestIndexToDetectorIndex(const size_t regionOfInterestIndex) const override; - virtual size_t detectorIndexToRegionOfInterestIndex(const size_t detectorIndex) const override; + size_t + regionOfInterestIndexToDetectorIndex(size_t regionOfInterestIndex) const override; + size_t detectorIndexToRegionOfInterestIndex(size_t detectorIndex) const override; //! Returns vector of unmasked detector indices. std::vector<size_t> active_indices() const; diff --git a/Device/Detector/RectangularDetector.cpp b/Device/Detector/RectangularDetector.cpp index b31e34b9534..83a058b66b2 100644 --- a/Device/Detector/RectangularDetector.cpp +++ b/Device/Detector/RectangularDetector.cpp @@ -33,19 +33,8 @@ RectangularDetector::RectangularDetector(size_t nxbins, double width, size_t nyb } RectangularDetector::RectangularDetector(const RectangularDetector& other) - : IDetector2D(other) - , m_normal_to_detector(other.m_normal_to_detector) - , m_u0(other.m_u0) - , m_v0(other.m_v0) - , m_direction(other.m_direction) - , m_distance(other.m_distance) - , m_dbeam_u0(other.m_dbeam_u0) - , m_dbeam_v0(other.m_dbeam_v0) - , m_detector_arrangement(other.m_detector_arrangement) - , m_u_unit(other.m_u_unit) - , m_v_unit(other.m_v_unit) -{ -} + += default; RectangularDetector::~RectangularDetector() = default; diff --git a/Device/Detector/RectangularDetector.h b/Device/Detector/RectangularDetector.h index 185d16874cc..5709f376633 100644 --- a/Device/Detector/RectangularDetector.h +++ b/Device/Detector/RectangularDetector.h @@ -49,12 +49,12 @@ public: void accept(INodeVisitor* visitor) const override { visitor->visit(this); } - ~RectangularDetector(); + ~RectangularDetector() override; void setDetectorNormal(const Direction& direction) override; - void setPosition(const R3 normal_to_detector, double u0, double v0, - const R3 direction = R3(0.0, -1.0, 0.0)); + void setPosition(R3 normal_to_detector, double u0, double v0, + R3 direction = R3(0.0, -1.0, 0.0)); void setPerpendicularToSampleX(double distance, double u0, double v0); void setPerpendicularToDirectBeam(double distance, double u0, double v0); @@ -76,7 +76,7 @@ public: EDetectorArrangement getDetectorArrangment() const; //! return default axes units - virtual Axes::Coords defaultCoords() const override { return Axes::Coords::MM; } + Axes::Coords defaultCoords() const override { return Axes::Coords::MM; } RectangularPixel* regionOfInterestPixel() const; @@ -97,7 +97,7 @@ protected: private: void setDistanceAndOffset(double distance, double u0, double v0); - void initNormalVector(const R3 central_k); + void initNormalVector(R3 central_k); void initUandV(double alpha_i); R3 m_normal_to_detector; diff --git a/Device/Detector/SimulationAreaIterator.h b/Device/Detector/SimulationAreaIterator.h index fafa3ffa007..0898abe122e 100644 --- a/Device/Detector/SimulationAreaIterator.h +++ b/Device/Detector/SimulationAreaIterator.h @@ -53,7 +53,7 @@ public: size_t detectorIndex() const; bool operator==(const SimulationAreaIterator& other) const; - bool operator!=(const SimulationAreaIterator& other) const; + bool operator!=(const SimulationAreaIterator& right) const; //! prefix increment SimulationAreaIterator& operator++(); diff --git a/Device/Detector/SpecularDetector1D.h b/Device/Detector/SpecularDetector1D.h index 4507f2303be..e77e0b0f656 100644 --- a/Device/Detector/SpecularDetector1D.h +++ b/Device/Detector/SpecularDetector1D.h @@ -34,7 +34,7 @@ public: SpecularDetector1D(const IAxis& axis); SpecularDetector1D(); - virtual ~SpecularDetector1D(); + ~SpecularDetector1D() override; SpecularDetector1D* clone() const override; @@ -47,11 +47,11 @@ public: void setAxis(const IAxis& axis); //! Return default axes units - virtual Axes::Coords defaultCoords() const override { return Axes::Coords::RADIANS; } + Axes::Coords defaultCoords() const override { return Axes::Coords::RADIANS; } protected: - SpecularDetector1D(const SpecularDetector1D& other); + SpecularDetector1D(const SpecularDetector1D& detector); //! Returns the name for the axis with given index std::string axisName(size_t index) const override; diff --git a/Device/Detector/SphericalDetector.cpp b/Device/Detector/SphericalDetector.cpp index d63d8257af8..da921272699 100644 --- a/Device/Detector/SphericalDetector.cpp +++ b/Device/Detector/SphericalDetector.cpp @@ -32,7 +32,7 @@ SphericalDetector::SphericalDetector(size_t n_bin, double width, double phi, dou { } -SphericalDetector::SphericalDetector(const SphericalDetector& other) : IDetector2D(other) {} +SphericalDetector::SphericalDetector(const SphericalDetector& other) = default; SphericalDetector* SphericalDetector::clone() const { diff --git a/Device/Detector/SphericalDetector.h b/Device/Detector/SphericalDetector.h index 78505e8ab75..57441a39dd6 100644 --- a/Device/Detector/SphericalDetector.h +++ b/Device/Detector/SphericalDetector.h @@ -52,10 +52,10 @@ public: void accept(INodeVisitor* visitor) const override { visitor->visit(this); } - ~SphericalDetector() override {} + ~SphericalDetector() override = default; //! return default axes units - virtual Axes::Coords defaultCoords() const override { return Axes::Coords::RADIANS; } + Axes::Coords defaultCoords() const override { return Axes::Coords::RADIANS; } protected: //! Creates an IPixel for the given OutputData object and index diff --git a/Device/Histo/HistoUtils.cpp b/Device/Histo/HistoUtils.cpp index a3c0974f682..226a1265dfb 100644 --- a/Device/Histo/HistoUtils.cpp +++ b/Device/Histo/HistoUtils.cpp @@ -39,7 +39,7 @@ std::vector<std::pair<double, double>> DataUtils::Histo::FindPeaks(const Histogr double row_value = p.first; double col_value = p.second; - size_t xaxis_index = static_cast<size_t>(col_value); + auto xaxis_index = static_cast<size_t>(col_value); size_t yaxis_index = hist.yAxis().size() - 1 - static_cast<size_t>(row_value); Bin1D xbin = hist.xAxis().bin(xaxis_index); diff --git a/Device/Histo/Histogram1D.h b/Device/Histo/Histogram1D.h index 2da00f410ec..6d6cada123b 100644 --- a/Device/Histo/Histogram1D.h +++ b/Device/Histo/Histogram1D.h @@ -41,10 +41,10 @@ public: Histogram1D(const OutputData<double>& data); //! Returns clone of other histogram - Histogram1D* clone() const; + Histogram1D* clone() const override; //! Returns the number of histogram dimensions - size_t rank() const { return 1; } + size_t rank() const override { return 1; } //! Increment bin with abscissa x with a weight. int fill(double x, double weight = 1.0); diff --git a/Device/Histo/Histogram2D.h b/Device/Histo/Histogram2D.h index a21833ae79f..438a0a15b79 100644 --- a/Device/Histo/Histogram2D.h +++ b/Device/Histo/Histogram2D.h @@ -52,10 +52,10 @@ public: Histogram2D(std::vector<std::vector<double>> data); //! Returns clone of other histogram - Histogram2D* clone() const; + Histogram2D* clone() const override; //! Returns the number of histogram dimensions - size_t rank() const { return 2; } + size_t rank() const override { return 2; } //! Increment bin with abscissa x and ordinate y with a weight. int fill(double x, double y, double weight = 1.0); diff --git a/Device/Histo/IHistogram.cpp b/Device/Histo/IHistogram.cpp index 260aee93de9..34c00315d0c 100644 --- a/Device/Histo/IHistogram.cpp +++ b/Device/Histo/IHistogram.cpp @@ -337,7 +337,7 @@ void IHistogram::copyContentFrom(const IHistogram& other) //! creates new OutputData with histogram's shape and put there values corresponding to DataType OutputData<double>* IHistogram::createOutputData(IHistogram::DataType dataType) const { - OutputData<double>* result = new OutputData<double>; + auto* result = new OutputData<double>; result->copyShapeFrom(m_data); for (size_t i = 0; i < getTotalNumberOfBins(); ++i) (*result)[i] = binData(i, dataType); diff --git a/Device/Histo/SimulationResult.cpp b/Device/Histo/SimulationResult.cpp index a5776268922..4d63f9cee49 100644 --- a/Device/Histo/SimulationResult.cpp +++ b/Device/Histo/SimulationResult.cpp @@ -22,7 +22,7 @@ SimulationResult::SimulationResult(const OutputData<double>& data, const ICoordS } SimulationResult::SimulationResult(const OutputData<double>& data, const ICoordSystem*&& coords) - : m_data(data.clone()), m_coordsys(std::move(coords)) + : m_data(data.clone()), m_coordsys(coords) { checkDimensions(); } @@ -37,7 +37,7 @@ SimulationResult::SimulationResult(const SimulationResult& other) } SimulationResult::SimulationResult(SimulationResult&& other) - : m_data(std::move(other.m_data)), m_coordsys(std::move(other.m_coordsys)) + noexcept : m_data(std::move(other.m_data)), m_coordsys(std::move(other.m_coordsys)) { } @@ -55,9 +55,9 @@ SimulationResult& SimulationResult::operator=(const SimulationResult& other) } SimulationResult& SimulationResult::operator=(SimulationResult&& other) -{ - m_data.reset(other.m_data.release()); - m_coordsys.reset(other.m_coordsys.release()); + noexcept { + m_data = std::move(other.m_data); + m_coordsys = std::move(other.m_coordsys); return *this; } diff --git a/Device/Histo/SimulationResult.h b/Device/Histo/SimulationResult.h index b860f9c67d0..3e70aac65b7 100644 --- a/Device/Histo/SimulationResult.h +++ b/Device/Histo/SimulationResult.h @@ -44,10 +44,10 @@ public: SimulationResult(const OutputData<double>& data, const ICoordSystem*&& coords); SimulationResult(const SimulationResult& other); - SimulationResult(SimulationResult&& other); + SimulationResult(SimulationResult&& other) noexcept ; SimulationResult& operator=(const SimulationResult& other); - SimulationResult& operator=(SimulationResult&& other); + SimulationResult& operator=(SimulationResult&& other) noexcept ; #ifndef SWIG std::unique_ptr<OutputData<double>> data(Axes::Coords units = Axes::Coords::UNDEFINED) const; diff --git a/Device/InputOutput/OutputDataReadWriteTiff.cpp b/Device/InputOutput/OutputDataReadWriteTiff.cpp index f0a7214c1c8..60842a54edc 100644 --- a/Device/InputOutput/OutputDataReadWriteTiff.cpp +++ b/Device/InputOutput/OutputDataReadWriteTiff.cpp @@ -16,6 +16,7 @@ #include "Device/InputOutput/OutputDataReadWriteTiff.h" #include "Base/Util/SysUtils.h" +#include <memory> #include <tiffio.hxx> OutputDataReadWriteTiff::OutputDataReadWriteTiff() @@ -226,7 +227,7 @@ void OutputDataReadWriteTiff::write_header() void OutputDataReadWriteTiff::write_data() { - typedef int sample_t; + using sample_t = int; tmsize_t buf_size = sizeof(sample_t) * m_width; tdata_t buf = _TIFFmalloc(buf_size); if (!buf) @@ -266,7 +267,7 @@ void OutputDataReadWriteTiff::close() void OutputDataReadWriteTiff::create_output_data() { ASSERT(m_tiff); - m_data.reset(new OutputData<double>); + m_data = std::make_unique<OutputData<double>>(); m_data->addAxis("x", m_width, 0.0, double(m_width)); m_data->addAxis("y", m_height, 0.0, double(m_height)); } diff --git a/Device/Instrument/Instrument.h b/Device/Instrument/Instrument.h index a675adfb873..669c04b7bb9 100644 --- a/Device/Instrument/Instrument.h +++ b/Device/Instrument/Instrument.h @@ -37,7 +37,7 @@ public: Instrument(const Instrument& other); Instrument& operator=(const Instrument& other); - virtual ~Instrument(); + ~Instrument() override; void accept(INodeVisitor* visitor) const override { visitor->visit(this); } diff --git a/Device/Mask/Ellipse.h b/Device/Mask/Ellipse.h index b6c6ac38c0c..bf8152432d6 100644 --- a/Device/Mask/Ellipse.h +++ b/Device/Mask/Ellipse.h @@ -23,10 +23,10 @@ class Ellipse : public IShape2D { public: Ellipse(double xcenter, double ycenter, double xradius, double yradius, double theta = 0.0); - Ellipse* clone() const { return new Ellipse(m_xc, m_yc, m_xr, m_yr, m_theta); } + Ellipse* clone() const override { return new Ellipse(m_xc, m_yc, m_xr, m_yr, m_theta); } - bool contains(double x, double y) const; - bool contains(const Bin1D& binx, const Bin1D& biny) const; + bool contains(double x, double y) const override; + bool contains(const Bin1D& binx, const Bin1D& biny) const override; double getCenterX() const { return m_xc; } double getCenterY() const { return m_yc; } diff --git a/Device/Mask/IShape2D.h b/Device/Mask/IShape2D.h index f8da91f3137..7bb11e2fde9 100644 --- a/Device/Mask/IShape2D.h +++ b/Device/Mask/IShape2D.h @@ -27,7 +27,7 @@ struct Bin1D; class IShape2D : public ICloneable { public: IShape2D(const char* name) : m_name(name) {} - virtual IShape2D* clone() const = 0; + IShape2D* clone() const override = 0; //! Returns true if point with given coordinates is inside or on border of the shape. virtual bool contains(double x, double y) const = 0; diff --git a/Device/Mask/InfinitePlane.h b/Device/Mask/InfinitePlane.h index 2450aa239f8..1281b0531bd 100644 --- a/Device/Mask/InfinitePlane.h +++ b/Device/Mask/InfinitePlane.h @@ -28,10 +28,10 @@ class InfinitePlane : public IShape2D { public: InfinitePlane() : IShape2D("InfinitePlane") {} - InfinitePlane* clone() const { return new InfinitePlane(); } + InfinitePlane* clone() const override { return new InfinitePlane(); } - bool contains(double, double) const { return true; } - bool contains(const Bin1D&, const Bin1D&) const { return true; } + bool contains(double, double) const override { return true; } + bool contains(const Bin1D&, const Bin1D&) const override { return true; } }; #endif // BORNAGAIN_DEVICE_MASK_INFINITEPLANE_H diff --git a/Device/Mask/Line.h b/Device/Mask/Line.h index 597b0f1d853..67cbf373cd7 100644 --- a/Device/Mask/Line.h +++ b/Device/Mask/Line.h @@ -23,10 +23,10 @@ class Line : public IShape2D { public: Line(double x1, double y1, double x2, double y2); - Line* clone() const { return new Line(m_x1, m_y1, m_x2, m_y2); } + Line* clone() const override { return new Line(m_x1, m_y1, m_x2, m_y2); } - bool contains(double x, double y) const; - bool contains(const Bin1D& binx, const Bin1D& biny) const; + bool contains(double x, double y) const override; + bool contains(const Bin1D& binx, const Bin1D& biny) const override; private: double m_x1, m_y1, m_x2, m_y2; @@ -38,10 +38,10 @@ private: class VerticalLine : public IShape2D { public: VerticalLine(double x); - VerticalLine* clone() const { return new VerticalLine(m_x); } + VerticalLine* clone() const override { return new VerticalLine(m_x); } - bool contains(double x, double y) const; - bool contains(const Bin1D& binx, const Bin1D& biny) const; + bool contains(double x, double y) const override; + bool contains(const Bin1D& binx, const Bin1D& biny) const override; double getXpos() const { return m_x; } @@ -55,10 +55,10 @@ private: class HorizontalLine : public IShape2D { public: HorizontalLine(double y); - HorizontalLine* clone() const { return new HorizontalLine(m_y); } + HorizontalLine* clone() const override { return new HorizontalLine(m_y); } - bool contains(double x, double y) const; - bool contains(const Bin1D& binx, const Bin1D& biny) const; + bool contains(double x, double y) const override; + bool contains(const Bin1D& binx, const Bin1D& biny) const override; double getYpos() const { return m_y; } diff --git a/Device/Mask/Polygon.h b/Device/Mask/Polygon.h index 6e55923447f..68399526ab5 100644 --- a/Device/Mask/Polygon.h +++ b/Device/Mask/Polygon.h @@ -29,23 +29,23 @@ class PolygonPrivate; class Polygon : public IShape2D { public: - Polygon(const std::vector<double> x, const std::vector<double> y); - Polygon(const std::vector<std::vector<double>> points); + Polygon(std::vector<double> x, std::vector<double> y); + Polygon(std::vector<std::vector<double>> points); Polygon(const PolygonPrivate* d); - virtual ~Polygon(); + ~Polygon() override; - virtual Polygon* clone() const { return new Polygon(m_d); } + Polygon* clone() const override { return new Polygon(m_d); } - virtual bool contains(double x, double y) const; - virtual bool contains(const Bin1D& binx, const Bin1D& biny) const; + bool contains(double x, double y) const override; + bool contains(const Bin1D& binx, const Bin1D& biny) const override; double getArea() const; void getPoints(std::vector<double>& xpos, std::vector<double>& ypos) const; protected: - virtual void print(std::ostream& ostr) const; + void print(std::ostream& ostr) const override; private: PolygonPrivate* m_d; diff --git a/Device/Mask/Rectangle.h b/Device/Mask/Rectangle.h index 0140c3444b3..2788a031f1e 100644 --- a/Device/Mask/Rectangle.h +++ b/Device/Mask/Rectangle.h @@ -25,12 +25,12 @@ class Rectangle : public IShape2D { public: Rectangle(double xlow, double ylow, double xup, double yup, bool inverted = false); - Rectangle* clone() const { return new Rectangle(m_xlow, m_ylow, m_xup, m_yup, m_inverted); } + Rectangle* clone() const override { return new Rectangle(m_xlow, m_ylow, m_xup, m_yup, m_inverted); } void setInverted(bool inverted = true); - bool contains(double x, double y) const; - bool contains(const Bin1D& binx, const Bin1D& biny) const; + bool contains(double x, double y) const override; + bool contains(const Bin1D& binx, const Bin1D& biny) const override; double getArea() const; diff --git a/Device/Pol/PolFilter.h b/Device/Pol/PolFilter.h index 64be0f33acb..936b9d20549 100644 --- a/Device/Pol/PolFilter.h +++ b/Device/Pol/PolFilter.h @@ -36,10 +36,10 @@ public: PolFilter(); PolFilter(const PolFilter& other); - virtual ~PolFilter() = default; + ~PolFilter() override = default; //! Sets the polarization analyzer characteristics of the detector - void setDirEffTra(const R3 direction, double efficiency, double total_transmission); + void setDirEffTra(R3 direction, double efficiency, double total_transmission); //! Return the polarization density matrix (in spin basis along z-axis) Eigen::Matrix2cd matrix() const; @@ -53,7 +53,7 @@ public: private: //! Verify if the given analyzer properties are physical - bool check(const R3 direction, double efficiency, double total_transmission) const; + bool check(R3 direction, double efficiency, double total_transmission) const; R3 m_direction; //!< direction of polarization analysis double m_efficiency; //!< efficiency of polarization analysis diff --git a/Device/Resolution/ConvolutionDetectorResolution.cpp b/Device/Resolution/ConvolutionDetectorResolution.cpp index d992fd4ee06..e66a77b0225 100644 --- a/Device/Resolution/ConvolutionDetectorResolution.cpp +++ b/Device/Resolution/ConvolutionDetectorResolution.cpp @@ -77,7 +77,7 @@ void ConvolutionDetectorResolution::setResolutionFunction(const IResolutionFunct void ConvolutionDetectorResolution::apply1dConvolution(OutputData<double>* p_intensity_map) const { - ASSERT(m_res_function_1d == 0); + ASSERT(m_res_function_1d == nullptr); if (p_intensity_map->rank() != 1) throw std::runtime_error( "ConvolutionDetectorResolution::apply1dConvolution() -> Error! " diff --git a/Device/Resolution/ConvolutionDetectorResolution.h b/Device/Resolution/ConvolutionDetectorResolution.h index e0be50b0eca..3281a1ac2e1 100644 --- a/Device/Resolution/ConvolutionDetectorResolution.h +++ b/Device/Resolution/ConvolutionDetectorResolution.h @@ -33,7 +33,7 @@ public: inline static const std::string class_name = "ConvolutionDetectorResolution"; std::string className() const final { return class_name; } - typedef double (*cumulative_DF_1d)(double); + using cumulative_DF_1d = double (*)(double); //! Constructor taking a 1 dimensional resolution function as argument. ConvolutionDetectorResolution(cumulative_DF_1d res_function_1d); @@ -41,7 +41,7 @@ public: //! Constructor taking a 2 dimensional resolution function as argument. ConvolutionDetectorResolution(const IResolutionFunction2D& p_res_function_2d); - virtual ~ConvolutionDetectorResolution(); + ~ConvolutionDetectorResolution() override; ConvolutionDetectorResolution* clone() const override; diff --git a/Device/Resolution/Convolve.cpp b/Device/Resolution/Convolve.cpp index ca9b25bfd82..5de4f9c723c 100644 --- a/Device/Resolution/Convolve.cpp +++ b/Device/Resolution/Convolve.cpp @@ -36,25 +36,25 @@ void Convolve::Workspace::clear() w_src = 0; h_kernel = 0; w_kernel = 0; - if (in_src) + delete[] in_src; - in_src = 0; + in_src = nullptr; if (out_src) fftw_free((fftw_complex*)out_src); - out_src = 0; + out_src = nullptr; - if (in_kernel) + delete[] in_kernel; - in_kernel = 0; + in_kernel = nullptr; if (out_kernel) fftw_free((fftw_complex*)out_kernel); - out_kernel = 0; + out_kernel = nullptr; - if (dst_fft) + delete[] dst_fft; - dst_fft = 0; + dst_fft = nullptr; // if(dst) delete[] dst; // dst=0; @@ -82,9 +82,9 @@ void Convolve::fftconvolve(const double2d_t& source, const double2d_t& kernel, d setMode(FFTW_LINEAR_SAME); int h_src = (int)source.size(); - int w_src = (int)(source.size() ? source[0].size() : 0); + int w_src = (int)(!source.empty() ? source[0].size() : 0); int h_kernel = (int)kernel.size(); - int w_kernel = (kernel.size() ? (int)kernel[0].size() : 0); + int w_kernel = (!kernel.empty() ? (int)kernel[0].size() : 0); // initialization init(h_src, w_src, h_kernel, w_kernel); diff --git a/Device/Resolution/Convolve.h b/Device/Resolution/Convolve.h index 942d8eb9777..ce957c0b36e 100644 --- a/Device/Resolution/Convolve.h +++ b/Device/Resolution/Convolve.h @@ -36,10 +36,10 @@ class Convolve { public: //! definition of 1d vector of double - typedef std::vector<double> double1d_t; + using double1d_t = std::vector<double>; //! definition of 2d vector of double - typedef std::vector<double1d_t> double2d_t; + using double2d_t = std::vector<double1d_t>; Convolve(); diff --git a/Device/Resolution/IDetectorResolution.h b/Device/Resolution/IDetectorResolution.h index 524fc1a8f57..285b867baee 100644 --- a/Device/Resolution/IDetectorResolution.h +++ b/Device/Resolution/IDetectorResolution.h @@ -24,7 +24,7 @@ class IDetectorResolution : public ICloneable, public INode { public: - virtual ~IDetectorResolution() {} + ~IDetectorResolution() override = default; IDetectorResolution* clone() const override = 0; //! Apply the resolution function to the intensity data diff --git a/Device/Resolution/IResolutionFunction2D.h b/Device/Resolution/IResolutionFunction2D.h index eef5ae4dafa..8bf3eafdd5a 100644 --- a/Device/Resolution/IResolutionFunction2D.h +++ b/Device/Resolution/IResolutionFunction2D.h @@ -26,10 +26,10 @@ public: IResolutionFunction2D() = default; IResolutionFunction2D(const NodeMeta& meta, const std::vector<double>& PValues); - virtual ~IResolutionFunction2D() {} + ~IResolutionFunction2D() override = default; virtual double evaluateCDF(double x, double y) const = 0; - virtual IResolutionFunction2D* clone() const = 0; + IResolutionFunction2D* clone() const override = 0; }; #endif // BORNAGAIN_DEVICE_RESOLUTION_IRESOLUTIONFUNCTION2D_H diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i index 7a90f24fa69..3a8c257fd45 100644 --- a/auto/Wrap/doxygenDevice.i +++ b/auto/Wrap/doxygenDevice.i @@ -69,7 +69,7 @@ C++ includes: Beam.h %feature("docstring") Beam::Beam "Beam::Beam(const Beam &other) "; -%feature("docstring") Beam::~Beam "Beam::~Beam() +%feature("docstring") Beam::~Beam "Beam::~Beam() override "; %feature("docstring") Beam::clone "Beam * Beam::clone() const @@ -126,7 +126,7 @@ Returns the polarization density matrix (in spin basis along z-axis) %feature("docstring") Beam::setDirection "void Beam::setDirection(const Direction &direction) "; -%feature("docstring") Beam::setInclination "void Beam::setInclination(const double alpha) +%feature("docstring") Beam::setInclination "void Beam::setInclination(double alpha) "; %feature("docstring") Beam::setInclinationLimits "void Beam::setInclinationLimits(const RealLimits &limits) @@ -142,7 +142,7 @@ Sets the beam intensity in neutrons/sec. Sets footprint factor to the beam. "; -%feature("docstring") Beam::setPolarization "void Beam::setPolarization(const R3 bloch_vector) +%feature("docstring") Beam::setPolarization "void Beam::setPolarization(R3 bloch_vector) Sets the polarization density matrix according to the given Bloch vector. "; @@ -171,7 +171,7 @@ Constructor taking a 1 dimensional resolution function as argument. Constructor taking a 2 dimensional resolution function as argument. "; -%feature("docstring") ConvolutionDetectorResolution::~ConvolutionDetectorResolution "ConvolutionDetectorResolution::~ConvolutionDetectorResolution() +%feature("docstring") ConvolutionDetectorResolution::~ConvolutionDetectorResolution "ConvolutionDetectorResolution::~ConvolutionDetectorResolution() override "; %feature("docstring") ConvolutionDetectorResolution::clone "ConvolutionDetectorResolution * ConvolutionDetectorResolution::clone() const override @@ -292,7 +292,7 @@ C++ includes: CoordSystem2D.h %feature("docstring") CoordSystem2D::~CoordSystem2D "CoordSystem2D::~CoordSystem2D() override=default "; -%feature("docstring") CoordSystem2D::dimension "virtual size_t CoordSystem2D::dimension() const override +%feature("docstring") CoordSystem2D::dimension "size_t CoordSystem2D::dimension() const override "; %feature("docstring") CoordSystem2D::calculateMin "double CoordSystem2D::calculateMin(size_t i_axis, Axes::Coords units) const override @@ -489,15 +489,15 @@ theta: Angle of Ellipse rotation in radians "; -%feature("docstring") Ellipse::clone "Ellipse* Ellipse::clone() const +%feature("docstring") Ellipse::clone "Ellipse* Ellipse::clone() const override "; -%feature("docstring") Ellipse::contains "bool Ellipse::contains(double x, double y) const +%feature("docstring") Ellipse::contains "bool Ellipse::contains(double x, double y) const override Returns true if point with given coordinates is inside or on border of the shape. "; -%feature("docstring") Ellipse::contains "bool Ellipse::contains(const Bin1D &binx, const Bin1D &biny) const +%feature("docstring") Ellipse::contains "bool Ellipse::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of ellipse; more precisely, if mid point of two bins satisfy this condition. "; @@ -531,7 +531,7 @@ C++ includes: FootprintGauss.h %feature("docstring") FootprintGauss::className "std::string FootprintGauss::className() const final "; -%feature("docstring") FootprintGauss::FootprintGauss "FootprintGauss::FootprintGauss(const std::vector< double > P) +%feature("docstring") FootprintGauss::FootprintGauss "FootprintGauss::FootprintGauss(std::vector< double > P) "; %feature("docstring") FootprintGauss::FootprintGauss "FootprintGauss::FootprintGauss(double width_ratio) @@ -563,7 +563,7 @@ C++ includes: FootprintSquare.h %feature("docstring") FootprintSquare::className "std::string FootprintSquare::className() const final "; -%feature("docstring") FootprintSquare::FootprintSquare "FootprintSquare::FootprintSquare(const std::vector< double > P) +%feature("docstring") FootprintSquare::FootprintSquare "FootprintSquare::FootprintSquare(std::vector< double > P) "; %feature("docstring") FootprintSquare::FootprintSquare "FootprintSquare::FootprintSquare(double width_ratio) @@ -633,12 +633,12 @@ Constructor for 1D histogram with custom axis. Constructor for 1D histograms from basic OutputData object. "; -%feature("docstring") Histogram1D::clone "Histogram1D * Histogram1D::clone() const +%feature("docstring") Histogram1D::clone "Histogram1D * Histogram1D::clone() const override Returns clone of other histogram. "; -%feature("docstring") Histogram1D::rank "size_t Histogram1D::rank() const +%feature("docstring") Histogram1D::rank "size_t Histogram1D::rank() const override Returns the number of histogram dimensions. "; @@ -747,12 +747,12 @@ Constructor for 2D histograms from basic OutputData object. Constructor for 2D histograms from numpy array (thanks to swig) "; -%feature("docstring") Histogram2D::clone "Histogram2D * Histogram2D::clone() const +%feature("docstring") Histogram2D::clone "Histogram2D * Histogram2D::clone() const override Returns clone of other histogram. "; -%feature("docstring") Histogram2D::rank "size_t Histogram2D::rank() const +%feature("docstring") Histogram2D::rank "size_t Histogram2D::rank() const override Returns the number of histogram dimensions. "; @@ -855,15 +855,15 @@ y: The value at which it crosses y-axes "; -%feature("docstring") HorizontalLine::clone "HorizontalLine* HorizontalLine::clone() const +%feature("docstring") HorizontalLine::clone "HorizontalLine* HorizontalLine::clone() const override "; -%feature("docstring") HorizontalLine::contains "bool HorizontalLine::contains(double x, double y) const +%feature("docstring") HorizontalLine::contains "bool HorizontalLine::contains(double x, double y) const override Returns true if point with given coordinates is inside or on border of the shape. "; -%feature("docstring") HorizontalLine::contains "bool HorizontalLine::contains(const Bin1D &binx, const Bin1D &biny) const +%feature("docstring") HorizontalLine::contains "bool HorizontalLine::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). "; @@ -885,10 +885,10 @@ Core/Scan/CoordSystem1D.h. C++ includes: ICoordSystem.h "; -%feature("docstring") ICoordSystem::~ICoordSystem "ICoordSystem::~ICoordSystem() +%feature("docstring") ICoordSystem::~ICoordSystem "ICoordSystem::~ICoordSystem() override "; -%feature("docstring") ICoordSystem::clone "virtual ICoordSystem* ICoordSystem::clone() const =0 +%feature("docstring") ICoordSystem::clone "ICoordSystem* ICoordSystem::clone() const override=0 "; %feature("docstring") ICoordSystem::createOutputData "std::unique_ptr< OutputData< double > > ICoordSystem::createOutputData(Axes::Coords units) const @@ -908,7 +908,7 @@ Returns zero-valued output data array in specified units. %feature("docstring") ICoordSystem::axisSize "virtual size_t ICoordSystem::axisSize(size_t i_axis) const =0 "; -%feature("docstring") ICoordSystem::axisName "std::string ICoordSystem::axisName(size_t i_axis, const Axes::Coords units=Axes::Coords::UNDEFINED) const +%feature("docstring") ICoordSystem::axisName "std::string ICoordSystem::axisName(size_t i_axis, Axes::Coords units=Axes::Coords::UNDEFINED) const "; %feature("docstring") ICoordSystem::availableUnits "virtual std::vector<Axes::Coords> ICoordSystem::availableUnits() const =0 @@ -943,7 +943,7 @@ C++ includes: IDetector.h %feature("docstring") IDetector::clone "IDetector* IDetector::clone() const override=0 "; -%feature("docstring") IDetector::~IDetector "IDetector::~IDetector() +%feature("docstring") IDetector::~IDetector "IDetector::~IDetector() override "; %feature("docstring") IDetector::setDetectorNormal "virtual void IDetector::setDetectorNormal(const Direction &) @@ -954,7 +954,7 @@ Inits detector with the beam settings. %feature("docstring") IDetector::addAxis "void IDetector::addAxis(const IAxis &axis) "; -%feature("docstring") IDetector::setAnalyzer "void IDetector::setAnalyzer(const R3 direction, double efficiency, double total_transmission) +%feature("docstring") IDetector::setAnalyzer "void IDetector::setAnalyzer(R3 direction, double efficiency, double total_transmission) Sets the polarization analyzer characteristics of the detector. "; @@ -1050,12 +1050,12 @@ True if a region of interest is explicitly set. Returns the axes clipped to the region of interest. If no region of interest is explicitly defined, then the whole detector is taken as \"region of interest\". "; -%feature("docstring") IDetector::regionOfInterestIndexToDetectorIndex "size_t IDetector::regionOfInterestIndexToDetectorIndex(const size_t regionOfInterestIndex) const +%feature("docstring") IDetector::regionOfInterestIndexToDetectorIndex "size_t IDetector::regionOfInterestIndexToDetectorIndex(size_t regionOfInterestIndex) const Convert an index of the region of interest to an index of the detector. If no region of interest is set, then the index stays unmodified (since ROI == detector area). "; -%feature("docstring") IDetector::detectorIndexToRegionOfInterestIndex "size_t IDetector::detectorIndexToRegionOfInterestIndex(const size_t detectorIndex) const +%feature("docstring") IDetector::detectorIndexToRegionOfInterestIndex "size_t IDetector::detectorIndexToRegionOfInterestIndex(size_t detectorIndex) const "; %feature("docstring") IDetector::applyDetectorResolution "void IDetector::applyDetectorResolution(OutputData< double > *p_intensity_map) const @@ -1113,7 +1113,7 @@ C++ includes: IDetector2D.h %feature("docstring") IDetector2D::clone "IDetector2D* IDetector2D::clone() const override=0 "; -%feature("docstring") IDetector2D::~IDetector2D "IDetector2D::~IDetector2D() +%feature("docstring") IDetector2D::~IDetector2D "IDetector2D::~IDetector2D() override "; %feature("docstring") IDetector2D::setDetectorParameters "void IDetector2D::setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max) @@ -1150,12 +1150,12 @@ Put the mask for all detector channels (i.e. exclude whole detector from the ana Sets rectangular region of interest with lower left and upper right corners defined. "; -%feature("docstring") IDetector2D::regionOfInterestIndexToDetectorIndex "size_t IDetector2D::regionOfInterestIndexToDetectorIndex(const size_t regionOfInterestIndex) const override +%feature("docstring") IDetector2D::regionOfInterestIndexToDetectorIndex "size_t IDetector2D::regionOfInterestIndexToDetectorIndex(size_t regionOfInterestIndex) const override Convert an index of the region of interest to an index of the detector. If no region of interest is set, then the index stays unmodified (since ROI == detector area). "; -%feature("docstring") IDetector2D::detectorIndexToRegionOfInterestIndex "size_t IDetector2D::detectorIndexToRegionOfInterestIndex(const size_t detectorIndex) const override +%feature("docstring") IDetector2D::detectorIndexToRegionOfInterestIndex "size_t IDetector2D::detectorIndexToRegionOfInterestIndex(size_t detectorIndex) const override "; %feature("docstring") IDetector2D::active_indices "std::vector< size_t > IDetector2D::active_indices() const @@ -1185,7 +1185,7 @@ Interface for detector resolution algorithms. C++ includes: IDetectorResolution.h "; -%feature("docstring") IDetectorResolution::~IDetectorResolution "virtual IDetectorResolution::~IDetectorResolution() +%feature("docstring") IDetectorResolution::~IDetectorResolution "IDetectorResolution::~IDetectorResolution() override=default "; %feature("docstring") IDetectorResolution::clone "IDetectorResolution* IDetectorResolution::clone() const override=0 @@ -1213,10 +1213,10 @@ C++ includes: IFootprintFactor.h %feature("docstring") IFootprintFactor::IFootprintFactor "IFootprintFactor::IFootprintFactor(const NodeMeta &meta, const std::vector< double > &PValues) "; -%feature("docstring") IFootprintFactor::~IFootprintFactor "IFootprintFactor::~IFootprintFactor() +%feature("docstring") IFootprintFactor::~IFootprintFactor "IFootprintFactor::~IFootprintFactor() override "; -%feature("docstring") IFootprintFactor::clone "virtual IFootprintFactor* IFootprintFactor::clone() const =0 +%feature("docstring") IFootprintFactor::clone "IFootprintFactor* IFootprintFactor::clone() const override=0 "; %feature("docstring") IFootprintFactor::widthRatio "double IFootprintFactor::widthRatio() const @@ -1509,15 +1509,15 @@ C++ includes: InfinitePlane.h %feature("docstring") InfinitePlane::InfinitePlane "InfinitePlane::InfinitePlane() "; -%feature("docstring") InfinitePlane::clone "InfinitePlane* InfinitePlane::clone() const +%feature("docstring") InfinitePlane::clone "InfinitePlane* InfinitePlane::clone() const override "; -%feature("docstring") InfinitePlane::contains "bool InfinitePlane::contains(double, double) const +%feature("docstring") InfinitePlane::contains "bool InfinitePlane::contains(double, double) const override Returns true if point with given coordinates is inside or on border of the shape. "; -%feature("docstring") InfinitePlane::contains "bool InfinitePlane::contains(const Bin1D &, const Bin1D &) const +%feature("docstring") InfinitePlane::contains "bool InfinitePlane::contains(const Bin1D &, const Bin1D &) const override Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). "; @@ -1543,7 +1543,7 @@ C++ includes: Instrument.h %feature("docstring") Instrument::Instrument "Instrument::Instrument(const Instrument &other) "; -%feature("docstring") Instrument::~Instrument "Instrument::~Instrument() +%feature("docstring") Instrument::~Instrument "Instrument::~Instrument() override "; %feature("docstring") Instrument::accept "void Instrument::accept(INodeVisitor *visitor) const override @@ -1623,13 +1623,13 @@ C++ includes: IResolutionFunction2D.h %feature("docstring") IResolutionFunction2D::IResolutionFunction2D "IResolutionFunction2D::IResolutionFunction2D(const NodeMeta &meta, const std::vector< double > &PValues) "; -%feature("docstring") IResolutionFunction2D::~IResolutionFunction2D "virtual IResolutionFunction2D::~IResolutionFunction2D() +%feature("docstring") IResolutionFunction2D::~IResolutionFunction2D "IResolutionFunction2D::~IResolutionFunction2D() override=default "; %feature("docstring") IResolutionFunction2D::evaluateCDF "virtual double IResolutionFunction2D::evaluateCDF(double x, double y) const =0 "; -%feature("docstring") IResolutionFunction2D::clone "virtual IResolutionFunction2D* IResolutionFunction2D::clone() const =0 +%feature("docstring") IResolutionFunction2D::clone "IResolutionFunction2D* IResolutionFunction2D::clone() const override=0 "; @@ -1644,7 +1644,7 @@ C++ includes: IShape2D.h %feature("docstring") IShape2D::IShape2D "IShape2D::IShape2D(const char *name) "; -%feature("docstring") IShape2D::clone "virtual IShape2D* IShape2D::clone() const =0 +%feature("docstring") IShape2D::clone "IShape2D* IShape2D::clone() const override=0 "; %feature("docstring") IShape2D::contains "virtual bool IShape2D::contains(double x, double y) const =0 @@ -1669,15 +1669,15 @@ C++ includes: Line.h %feature("docstring") Line::Line "Line::Line(double x1, double y1, double x2, double y2) "; -%feature("docstring") Line::clone "Line* Line::clone() const +%feature("docstring") Line::clone "Line* Line::clone() const override "; -%feature("docstring") Line::contains "bool Line::contains(double x, double y) const +%feature("docstring") Line::contains "bool Line::contains(double x, double y) const override Returns true if point with given coordinates is inside or on border of the shape. "; -%feature("docstring") Line::contains "bool Line::contains(const Bin1D &binx, const Bin1D &biny) const +%feature("docstring") Line::contains "bool Line::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). "; @@ -1748,7 +1748,7 @@ C++ includes: OutputData.h %feature("docstring") OutputData::OutputData "OutputData< T >::OutputData(const OutputData &)=delete "; -%feature("docstring") OutputData::OutputData "OutputData< T >::OutputData(OutputData &&) +%feature("docstring") OutputData::OutputData "OutputData< T >::OutputData(OutputData &&) noexcept "; %feature("docstring") OutputData::~OutputData "OutputData< T >::~OutputData() @@ -1757,7 +1757,7 @@ C++ includes: OutputData.h %feature("docstring") OutputData::clone "OutputData< T > * OutputData< T >::clone() const "; -%feature("docstring") OutputData::copyFrom "void OutputData< T >::copyFrom(const OutputData< T > &x) +%feature("docstring") OutputData::copyFrom "void OutputData< T >::copyFrom(const OutputData< T > &other) "; %feature("docstring") OutputData::copyShapeFrom "void OutputData< T >::copyShapeFrom(const OutputData< U > &other) @@ -2165,10 +2165,10 @@ C++ includes: PolFilter.h %feature("docstring") PolFilter::PolFilter "PolFilter::PolFilter(const PolFilter &other) "; -%feature("docstring") PolFilter::~PolFilter "virtual PolFilter::~PolFilter()=default +%feature("docstring") PolFilter::~PolFilter "PolFilter::~PolFilter() override=default "; -%feature("docstring") PolFilter::setDirEffTra "void PolFilter::setDirEffTra(const R3 direction, double efficiency, double total_transmission) +%feature("docstring") PolFilter::setDirEffTra "void PolFilter::setDirEffTra(R3 direction, double efficiency, double total_transmission) Sets the polarization analyzer characteristics of the detector. "; @@ -2203,7 +2203,7 @@ A polygon, for use in detector masks. Polygon defined by two arrays with x and C++ includes: Polygon.h "; -%feature("docstring") Polygon::Polygon "Polygon::Polygon(const std::vector< double > x, const std::vector< double > y) +%feature("docstring") Polygon::Polygon "Polygon::Polygon(std::vector< double > x, std::vector< double > y) Parameters: ----------- @@ -2215,7 +2215,7 @@ y: Vector of y-coordinates of polygon points. "; -%feature("docstring") Polygon::Polygon "Polygon::Polygon(const std::vector< std::vector< double >> points) +%feature("docstring") Polygon::Polygon "Polygon::Polygon(std::vector< std::vector< double >> points) Polygon defined by two dimensional array with (x,y) coordinates of polygon points. The size of second dimension should be 2. If polygon is unclosed (the last point doesn't repeat the first one), it will be closed automatically. @@ -2229,18 +2229,18 @@ Two dimensional vector of (x,y) coordinates of polygon points. %feature("docstring") Polygon::Polygon "Polygon::Polygon(const PolygonPrivate *d) "; -%feature("docstring") Polygon::~Polygon "Polygon::~Polygon() +%feature("docstring") Polygon::~Polygon "Polygon::~Polygon() override "; -%feature("docstring") Polygon::clone "virtual Polygon* Polygon::clone() const +%feature("docstring") Polygon::clone "Polygon* Polygon::clone() const override "; -%feature("docstring") Polygon::contains "bool Polygon::contains(double x, double y) const +%feature("docstring") Polygon::contains "bool Polygon::contains(double x, double y) const override Returns true if point with given coordinates is inside or on border of the shape. "; -%feature("docstring") Polygon::contains "bool Polygon::contains(const Bin1D &binx, const Bin1D &biny) const +%feature("docstring") Polygon::contains "bool Polygon::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). "; @@ -2296,18 +2296,18 @@ inverted: swap inside/outside "; -%feature("docstring") Rectangle::clone "Rectangle* Rectangle::clone() const +%feature("docstring") Rectangle::clone "Rectangle* Rectangle::clone() const override "; %feature("docstring") Rectangle::setInverted "void Rectangle::setInverted(bool inverted=true) "; -%feature("docstring") Rectangle::contains "bool Rectangle::contains(double x, double y) const +%feature("docstring") Rectangle::contains "bool Rectangle::contains(double x, double y) const override Returns true if point with given coordinates is inside or on border of the shape. "; -%feature("docstring") Rectangle::contains "bool Rectangle::contains(const Bin1D &binx, const Bin1D &biny) const +%feature("docstring") Rectangle::contains "bool Rectangle::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). "; @@ -2368,7 +2368,7 @@ Height of the detector in mm along y-direction %feature("docstring") RectangularDetector::accept "void RectangularDetector::accept(INodeVisitor *visitor) const override "; -%feature("docstring") RectangularDetector::~RectangularDetector "RectangularDetector::~RectangularDetector() +%feature("docstring") RectangularDetector::~RectangularDetector "RectangularDetector::~RectangularDetector() override "; %feature("docstring") RectangularDetector::setDetectorNormal "void RectangularDetector::setDetectorNormal(const Direction &direction) override @@ -2376,7 +2376,7 @@ Height of the detector in mm along y-direction Inits detector with the beam settings. "; -%feature("docstring") RectangularDetector::setPosition "void RectangularDetector::setPosition(const R3 normal_to_detector, double u0, double v0, const R3 direction=R3(0.0, -1.0, 0.0)) +%feature("docstring") RectangularDetector::setPosition "void RectangularDetector::setPosition(R3 normal_to_detector, double u0, double v0, R3 direction=R3(0.0, -1.0, 0.0)) "; %feature("docstring") RectangularDetector::setPerpendicularToSampleX "void RectangularDetector::setPerpendicularToSampleX(double distance, double u0, double v0) @@ -2427,7 +2427,7 @@ Inits detector with the beam settings. %feature("docstring") RectangularDetector::getDetectorArrangment "RectangularDetector::EDetectorArrangement RectangularDetector::getDetectorArrangment() const "; -%feature("docstring") RectangularDetector::defaultCoords "virtual Axes::Coords RectangularDetector::defaultCoords() const override +%feature("docstring") RectangularDetector::defaultCoords "Axes::Coords RectangularDetector::defaultCoords() const override return default axes units "; @@ -2509,7 +2509,7 @@ C++ includes: SimulationResult.h %feature("docstring") SimulationResult::SimulationResult "SimulationResult::SimulationResult(const SimulationResult &other) "; -%feature("docstring") SimulationResult::SimulationResult "SimulationResult::SimulationResult(SimulationResult &&other) +%feature("docstring") SimulationResult::SimulationResult "SimulationResult::SimulationResult(SimulationResult &&other) noexcept "; %feature("docstring") SimulationResult::data "std::unique_ptr< OutputData< double > > SimulationResult::data(Axes::Coords units=Axes::Coords::UNDEFINED) const @@ -2568,7 +2568,7 @@ C++ includes: SpecularDetector1D.h %feature("docstring") SpecularDetector1D::SpecularDetector1D "SpecularDetector1D::SpecularDetector1D() "; -%feature("docstring") SpecularDetector1D::~SpecularDetector1D "SpecularDetector1D::~SpecularDetector1D() +%feature("docstring") SpecularDetector1D::~SpecularDetector1D "SpecularDetector1D::~SpecularDetector1D() override "; %feature("docstring") SpecularDetector1D::clone "SpecularDetector1D * SpecularDetector1D::clone() const override @@ -2585,7 +2585,7 @@ Returns detector masks container. %feature("docstring") SpecularDetector1D::setAxis "void SpecularDetector1D::setAxis(const IAxis &axis) "; -%feature("docstring") SpecularDetector1D::defaultCoords "virtual Axes::Coords SpecularDetector1D::defaultCoords() const override +%feature("docstring") SpecularDetector1D::defaultCoords "Axes::Coords SpecularDetector1D::defaultCoords() const override Return default axes units. "; @@ -2686,10 +2686,10 @@ central alpha angle %feature("docstring") SphericalDetector::accept "void SphericalDetector::accept(INodeVisitor *visitor) const override "; -%feature("docstring") SphericalDetector::~SphericalDetector "SphericalDetector::~SphericalDetector() override +%feature("docstring") SphericalDetector::~SphericalDetector "SphericalDetector::~SphericalDetector() override=default "; -%feature("docstring") SphericalDetector::defaultCoords "virtual Axes::Coords SphericalDetector::defaultCoords() const override +%feature("docstring") SphericalDetector::defaultCoords "Axes::Coords SphericalDetector::defaultCoords() const override return default axes units "; @@ -2712,15 +2712,15 @@ x: The value at which it crosses x-axes "; -%feature("docstring") VerticalLine::clone "VerticalLine* VerticalLine::clone() const +%feature("docstring") VerticalLine::clone "VerticalLine* VerticalLine::clone() const override "; -%feature("docstring") VerticalLine::contains "bool VerticalLine::contains(double x, double y) const +%feature("docstring") VerticalLine::contains "bool VerticalLine::contains(double x, double y) const override Returns true if point with given coordinates is inside or on border of the shape. "; -%feature("docstring") VerticalLine::contains "bool VerticalLine::contains(const Bin1D &binx, const Bin1D &biny) const +%feature("docstring") VerticalLine::contains "bool VerticalLine::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). "; @@ -2816,7 +2816,7 @@ Creates 2D vector from OutputData. Returns relative difference between two data sets sum(dat[i] - ref[i])/ref[i]). "; -%feature("docstring") DataUtils::Data::checkRelativeDifference "bool DataUtils::Data::checkRelativeDifference(const OutputData< double > &dat, const OutputData< double > &ref, const double threshold) +%feature("docstring") DataUtils::Data::checkRelativeDifference "bool DataUtils::Data::checkRelativeDifference(const OutputData< double > &dat, const OutputData< double > &ref, double threshold) Returns true is relative difference is below threshold; prints informative output. "; diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py index 262c901a5ba..7f0a6adf746 100644 --- a/auto/Wrap/libBornAgainDevice.py +++ b/auto/Wrap/libBornAgainDevice.py @@ -2230,7 +2230,7 @@ class IntensityData(object): r""" __init__(IntensityData self) -> IntensityData __init__(IntensityData self, IntensityData arg2) -> IntensityData - OutputData< T >::OutputData(OutputData &&) + OutputData< T >::OutputData(OutputData &&) noexcept """ _libBornAgainDevice.IntensityData_swiginit(self, _libBornAgainDevice.new_IntensityData(*args)) @@ -2244,13 +2244,13 @@ class IntensityData(object): """ return _libBornAgainDevice.IntensityData_clone(self) - def copyFrom(self, x): + def copyFrom(self, other): r""" - copyFrom(IntensityData self, IntensityData x) - void OutputData< T >::copyFrom(const OutputData< T > &x) + copyFrom(IntensityData self, IntensityData other) + void OutputData< T >::copyFrom(const OutputData< T > &other) """ - return _libBornAgainDevice.IntensityData_copyFrom(self, x) + return _libBornAgainDevice.IntensityData_copyFrom(self, other) def meanValues(self): r""" @@ -2627,8 +2627,8 @@ def relativeDataDifference(dat, ref): def checkRelativeDifference(dat, ref, threshold): r""" - checkRelativeDifference(IntensityData dat, IntensityData ref, double const threshold) -> bool - bool DataUtils::Data::checkRelativeDifference(const OutputData< double > &dat, const OutputData< double > &ref, const double threshold) + checkRelativeDifference(IntensityData dat, IntensityData ref, double threshold) -> bool + bool DataUtils::Data::checkRelativeDifference(const OutputData< double > &dat, const OutputData< double > &ref, double threshold) Returns true is relative difference is below threshold; prints informative output. @@ -2831,8 +2831,8 @@ class Beam(libBornAgainParam.INode): def setInclination(self, alpha): r""" - setInclination(Beam self, double const alpha) - void Beam::setInclination(const double alpha) + setInclination(Beam self, double alpha) + void Beam::setInclination(double alpha) """ return _libBornAgainDevice.Beam_setInclination(self, alpha) @@ -2868,7 +2868,7 @@ class Beam(libBornAgainParam.INode): def setPolarization(self, bloch_vector): r""" setPolarization(Beam self, R3 bloch_vector) - void Beam::setPolarization(const R3 bloch_vector) + void Beam::setPolarization(R3 bloch_vector) Sets the polarization density matrix according to the given Bloch vector. @@ -2902,7 +2902,7 @@ class IFootprintFactor(libBornAgainBase.ICloneable, libBornAgainParam.INode): def clone(self): r""" clone(IFootprintFactor self) -> IFootprintFactor - virtual IFootprintFactor* IFootprintFactor::clone() const =0 + IFootprintFactor* IFootprintFactor::clone() const override=0 """ return _libBornAgainDevice.IFootprintFactor_clone(self) @@ -3097,7 +3097,7 @@ class IShape2D(libBornAgainBase.ICloneable): def clone(self): r""" clone(IShape2D self) -> IShape2D - virtual IShape2D* IShape2D::clone() const =0 + IShape2D* IShape2D::clone() const override=0 """ return _libBornAgainDevice.IShape2D_clone(self) @@ -3159,7 +3159,7 @@ class Ellipse(IShape2D): def clone(self): r""" clone(Ellipse self) -> Ellipse - Ellipse* Ellipse::clone() const + Ellipse* Ellipse::clone() const override """ return _libBornAgainDevice.Ellipse_clone(self) @@ -3168,7 +3168,7 @@ class Ellipse(IShape2D): r""" contains(Ellipse self, double x, double y) -> bool contains(Ellipse self, Bin1D const & binx, Bin1D const & biny) -> bool - bool Ellipse::contains(const Bin1D &binx, const Bin1D &biny) const + bool Ellipse::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of ellipse; more precisely, if mid point of two bins satisfy this condition. @@ -3243,7 +3243,7 @@ class Line(IShape2D): def clone(self): r""" clone(Line self) -> Line - Line* Line::clone() const + Line* Line::clone() const override """ return _libBornAgainDevice.Line_clone(self) @@ -3252,7 +3252,7 @@ class Line(IShape2D): r""" contains(Line self, double x, double y) -> bool contains(Line self, Bin1D const & binx, Bin1D const & biny) -> bool - bool Line::contains(const Bin1D &binx, const Bin1D &biny) const + bool Line::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). @@ -3293,7 +3293,7 @@ class VerticalLine(IShape2D): def clone(self): r""" clone(VerticalLine self) -> VerticalLine - VerticalLine* VerticalLine::clone() const + VerticalLine* VerticalLine::clone() const override """ return _libBornAgainDevice.VerticalLine_clone(self) @@ -3302,7 +3302,7 @@ class VerticalLine(IShape2D): r""" contains(VerticalLine self, double x, double y) -> bool contains(VerticalLine self, Bin1D const & binx, Bin1D const & biny) -> bool - bool VerticalLine::contains(const Bin1D &binx, const Bin1D &biny) const + bool VerticalLine::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). @@ -3351,7 +3351,7 @@ class HorizontalLine(IShape2D): def clone(self): r""" clone(HorizontalLine self) -> HorizontalLine - HorizontalLine* HorizontalLine::clone() const + HorizontalLine* HorizontalLine::clone() const override """ return _libBornAgainDevice.HorizontalLine_clone(self) @@ -3360,7 +3360,7 @@ class HorizontalLine(IShape2D): r""" contains(HorizontalLine self, double x, double y) -> bool contains(HorizontalLine self, Bin1D const & binx, Bin1D const & biny) -> bool - bool HorizontalLine::contains(const Bin1D &binx, const Bin1D &biny) const + bool HorizontalLine::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). @@ -3406,7 +3406,7 @@ class Polygon(IShape2D): def clone(self): r""" clone(Polygon self) -> Polygon - virtual Polygon* Polygon::clone() const + Polygon* Polygon::clone() const override """ return _libBornAgainDevice.Polygon_clone(self) @@ -3415,7 +3415,7 @@ class Polygon(IShape2D): r""" contains(Polygon self, double x, double y) -> bool contains(Polygon self, Bin1D const & binx, Bin1D const & biny) -> bool - bool Polygon::contains(const Bin1D &binx, const Bin1D &biny) const + bool Polygon::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). @@ -3485,7 +3485,7 @@ class Rectangle(IShape2D): def clone(self): r""" clone(Rectangle self) -> Rectangle - Rectangle* Rectangle::clone() const + Rectangle* Rectangle::clone() const override """ return _libBornAgainDevice.Rectangle_clone(self) @@ -3502,7 +3502,7 @@ class Rectangle(IShape2D): r""" contains(Rectangle self, double x, double y) -> bool contains(Rectangle self, Bin1D const & binx, Bin1D const & biny) -> bool - bool Rectangle::contains(const Bin1D &binx, const Bin1D &biny) const + bool Rectangle::contains(const Bin1D &binx, const Bin1D &biny) const override Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). @@ -3619,7 +3619,7 @@ class IResolutionFunction2D(libBornAgainBase.ICloneable, libBornAgainParam.INode def clone(self): r""" clone(IResolutionFunction2D self) -> IResolutionFunction2D - virtual IResolutionFunction2D* IResolutionFunction2D::clone() const =0 + IResolutionFunction2D* IResolutionFunction2D::clone() const override=0 """ return _libBornAgainDevice.IResolutionFunction2D_clone(self) @@ -3909,7 +3909,7 @@ class IDetector(libBornAgainBase.ICloneable, libBornAgainParam.INode): def setAnalyzer(self, direction, efficiency, total_transmission): r""" setAnalyzer(IDetector self, R3 direction, double efficiency, double total_transmission) - void IDetector::setAnalyzer(const R3 direction, double efficiency, double total_transmission) + void IDetector::setAnalyzer(R3 direction, double efficiency, double total_transmission) Sets the polarization analyzer characteristics of the detector. @@ -4064,8 +4064,8 @@ class IDetector(libBornAgainBase.ICloneable, libBornAgainParam.INode): def regionOfInterestIndexToDetectorIndex(self, regionOfInterestIndex): r""" - regionOfInterestIndexToDetectorIndex(IDetector self, size_t const regionOfInterestIndex) -> size_t - size_t IDetector::regionOfInterestIndexToDetectorIndex(const size_t regionOfInterestIndex) const + regionOfInterestIndexToDetectorIndex(IDetector self, size_t regionOfInterestIndex) -> size_t + size_t IDetector::regionOfInterestIndexToDetectorIndex(size_t regionOfInterestIndex) const Convert an index of the region of interest to an index of the detector. If no region of interest is set, then the index stays unmodified (since ROI == detector area). @@ -4074,8 +4074,8 @@ class IDetector(libBornAgainBase.ICloneable, libBornAgainParam.INode): def detectorIndexToRegionOfInterestIndex(self, detectorIndex): r""" - detectorIndexToRegionOfInterestIndex(IDetector self, size_t const detectorIndex) -> size_t - size_t IDetector::detectorIndexToRegionOfInterestIndex(const size_t detectorIndex) const + detectorIndexToRegionOfInterestIndex(IDetector self, size_t detectorIndex) -> size_t + size_t IDetector::detectorIndexToRegionOfInterestIndex(size_t detectorIndex) const """ return _libBornAgainDevice.IDetector_detectorIndexToRegionOfInterestIndex(self, detectorIndex) @@ -4239,8 +4239,8 @@ class IDetector2D(IDetector): def regionOfInterestIndexToDetectorIndex(self, regionOfInterestIndex): r""" - regionOfInterestIndexToDetectorIndex(IDetector2D self, size_t const regionOfInterestIndex) -> size_t - size_t IDetector2D::regionOfInterestIndexToDetectorIndex(const size_t regionOfInterestIndex) const override + regionOfInterestIndexToDetectorIndex(IDetector2D self, size_t regionOfInterestIndex) -> size_t + size_t IDetector2D::regionOfInterestIndexToDetectorIndex(size_t regionOfInterestIndex) const override Convert an index of the region of interest to an index of the detector. If no region of interest is set, then the index stays unmodified (since ROI == detector area). @@ -4249,8 +4249,8 @@ class IDetector2D(IDetector): def detectorIndexToRegionOfInterestIndex(self, detectorIndex): r""" - detectorIndexToRegionOfInterestIndex(IDetector2D self, size_t const detectorIndex) -> size_t - size_t IDetector2D::detectorIndexToRegionOfInterestIndex(const size_t detectorIndex) const override + detectorIndexToRegionOfInterestIndex(IDetector2D self, size_t detectorIndex) -> size_t + size_t IDetector2D::detectorIndexToRegionOfInterestIndex(size_t detectorIndex) const override """ return _libBornAgainDevice.IDetector2D_detectorIndexToRegionOfInterestIndex(self, detectorIndex) @@ -4360,7 +4360,7 @@ class RectangularDetector(IDetector2D): def setPosition(self, *args): r""" setPosition(RectangularDetector self, R3 normal_to_detector, double u0, double v0, R3 direction=R3(0.0, -1.0, 0.0)) - void RectangularDetector::setPosition(const R3 normal_to_detector, double u0, double v0, const R3 direction=R3(0.0, -1.0, 0.0)) + void RectangularDetector::setPosition(R3 normal_to_detector, double u0, double v0, R3 direction=R3(0.0, -1.0, 0.0)) """ return _libBornAgainDevice.RectangularDetector_setPosition(self, *args) @@ -4496,7 +4496,7 @@ class RectangularDetector(IDetector2D): def defaultCoords(self): r""" defaultCoords(RectangularDetector self) -> Axes::Coords - virtual Axes::Coords RectangularDetector::defaultCoords() const override + Axes::Coords RectangularDetector::defaultCoords() const override return default axes units @@ -4566,7 +4566,7 @@ class SphericalDetector(IDetector2D): def defaultCoords(self): r""" defaultCoords(SphericalDetector self) -> Axes::Coords - virtual Axes::Coords SphericalDetector::defaultCoords() const override + Axes::Coords SphericalDetector::defaultCoords() const override return default axes units @@ -5242,7 +5242,7 @@ class Histogram1D(IHistogram): def clone(self): r""" clone(Histogram1D self) -> Histogram1D - Histogram1D * Histogram1D::clone() const + Histogram1D * Histogram1D::clone() const override Returns clone of other histogram. @@ -5252,7 +5252,7 @@ class Histogram1D(IHistogram): def rank(self): r""" rank(Histogram1D self) -> size_t - size_t Histogram1D::rank() const + size_t Histogram1D::rank() const override Returns the number of histogram dimensions. @@ -5367,7 +5367,7 @@ class Histogram2D(IHistogram): def clone(self): r""" clone(Histogram2D self) -> Histogram2D - Histogram2D * Histogram2D::clone() const + Histogram2D * Histogram2D::clone() const override Returns clone of other histogram. @@ -5377,7 +5377,7 @@ class Histogram2D(IHistogram): def rank(self): r""" rank(Histogram2D self) -> size_t - size_t Histogram2D::rank() const + size_t Histogram2D::rank() const override Returns the number of histogram dimensions. @@ -5617,7 +5617,7 @@ class SimulationResult(object): __init__(SimulationResult self, IntensityData data, ICoordSystem const *&& coords) -> SimulationResult __init__(SimulationResult self, SimulationResult other) -> SimulationResult __init__(SimulationResult self, SimulationResult other) -> SimulationResult - SimulationResult::SimulationResult(SimulationResult &&other) + SimulationResult::SimulationResult(SimulationResult &&other) noexcept """ _libBornAgainDevice.SimulationResult_swiginit(self, _libBornAgainDevice.new_SimulationResult(*args)) diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index 239fff8e495..9a29bb26a48 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -31609,10 +31609,10 @@ SWIGINTERN PyObject *_wrap_Beam_setPolarization(PyObject *SWIGUNUSEDPARM(self), { res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_BasicVector3DT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Beam_setPolarization" "', argument " "2"" of type '" "R3 const""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Beam_setPolarization" "', argument " "2"" of type '" "R3""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Beam_setPolarization" "', argument " "2"" of type '" "R3 const""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Beam_setPolarization" "', argument " "2"" of type '" "R3""'"); } else { R3 * temp = reinterpret_cast< R3 * >(argp2); arg2 = *temp; @@ -31799,7 +31799,7 @@ SWIGINTERN PyObject *_wrap_new_FootprintGauss__SWIG_0(PyObject *SWIGUNUSEDPARM(s std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; int res = swig::asptr(swig_obj[0], &ptr); if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_FootprintGauss" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const""'"); + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_FootprintGauss" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; @@ -31863,7 +31863,7 @@ SWIGINTERN PyObject *_wrap_new_FootprintGauss(PyObject *self, PyObject *args) { fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_FootprintGauss'.\n" " Possible C/C++ prototypes are:\n" - " FootprintGauss::FootprintGauss(std::vector< double,std::allocator< double > > const)\n" + " FootprintGauss::FootprintGauss(std::vector< double,std::allocator< double > >)\n" " FootprintGauss::FootprintGauss(double)\n"); return 0; } @@ -32040,7 +32040,7 @@ SWIGINTERN PyObject *_wrap_new_FootprintSquare__SWIG_0(PyObject *SWIGUNUSEDPARM( std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; int res = swig::asptr(swig_obj[0], &ptr); if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_FootprintSquare" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const""'"); + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_FootprintSquare" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; @@ -32104,7 +32104,7 @@ SWIGINTERN PyObject *_wrap_new_FootprintSquare(PyObject *self, PyObject *args) { fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_FootprintSquare'.\n" " Possible C/C++ prototypes are:\n" - " FootprintSquare::FootprintSquare(std::vector< double,std::allocator< double > > const)\n" + " FootprintSquare::FootprintSquare(std::vector< double,std::allocator< double > >)\n" " FootprintSquare::FootprintSquare(double)\n"); return 0; } @@ -33646,7 +33646,7 @@ SWIGINTERN PyObject *_wrap_new_Polygon__SWIG_0(PyObject *SWIGUNUSEDPARM(self), P std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; int res = swig::asptr(swig_obj[0], &ptr); if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_Polygon" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const""'"); + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_Polygon" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; @@ -33655,7 +33655,7 @@ SWIGINTERN PyObject *_wrap_new_Polygon__SWIG_0(PyObject *SWIGUNUSEDPARM(self), P std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0; int res = swig::asptr(swig_obj[1], &ptr); if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_Polygon" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const""'"); + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_Polygon" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; @@ -33678,7 +33678,7 @@ SWIGINTERN PyObject *_wrap_new_Polygon__SWIG_1(PyObject *SWIGUNUSEDPARM(self), P std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *ptr = (std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *)0; int res = swig::asptr(swig_obj[0], &ptr); if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_Polygon" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const""'"); + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_Polygon" "', argument " "1"" of type '" "std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >""'"); } arg1 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; @@ -33753,8 +33753,8 @@ SWIGINTERN PyObject *_wrap_new_Polygon(PyObject *self, PyObject *args) { fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_Polygon'.\n" " Possible C/C++ prototypes are:\n" - " Polygon::Polygon(std::vector< double,std::allocator< double > > const,std::vector< double,std::allocator< double > > const)\n" - " Polygon::Polygon(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const)\n" + " Polygon::Polygon(std::vector< double,std::allocator< double > >,std::vector< double,std::allocator< double > >)\n" + " Polygon::Polygon(std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >)\n" " Polygon::Polygon(PolygonPrivate const *)\n"); return 0; } @@ -35523,10 +35523,10 @@ SWIGINTERN PyObject *_wrap_IDetector_setAnalyzer(PyObject *SWIGUNUSEDPARM(self), { res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_BasicVector3DT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_setAnalyzer" "', argument " "2"" of type '" "R3 const""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IDetector_setAnalyzer" "', argument " "2"" of type '" "R3""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_setAnalyzer" "', argument " "2"" of type '" "R3 const""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IDetector_setAnalyzer" "', argument " "2"" of type '" "R3""'"); } else { R3 * temp = reinterpret_cast< R3 * >(argp2); arg2 = *temp; @@ -36978,10 +36978,10 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setPosition__SWIG_0(PyObject *SWI { res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_BasicVector3DT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RectangularDetector_setPosition" "', argument " "2"" of type '" "R3 const""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RectangularDetector_setPosition" "', argument " "2"" of type '" "R3""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RectangularDetector_setPosition" "', argument " "2"" of type '" "R3 const""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RectangularDetector_setPosition" "', argument " "2"" of type '" "R3""'"); } else { R3 * temp = reinterpret_cast< R3 * >(argp2); arg2 = *temp; @@ -37001,10 +37001,10 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setPosition__SWIG_0(PyObject *SWI { res5 = SWIG_ConvertPtr(swig_obj[4], &argp5, SWIGTYPE_p_BasicVector3DT_double_t, 0 | 0); if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "RectangularDetector_setPosition" "', argument " "5"" of type '" "R3 const""'"); + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "RectangularDetector_setPosition" "', argument " "5"" of type '" "R3""'"); } if (!argp5) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RectangularDetector_setPosition" "', argument " "5"" of type '" "R3 const""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RectangularDetector_setPosition" "', argument " "5"" of type '" "R3""'"); } else { R3 * temp = reinterpret_cast< R3 * >(argp5); arg5 = *temp; @@ -37043,10 +37043,10 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setPosition__SWIG_1(PyObject *SWI { res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_BasicVector3DT_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RectangularDetector_setPosition" "', argument " "2"" of type '" "R3 const""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RectangularDetector_setPosition" "', argument " "2"" of type '" "R3""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RectangularDetector_setPosition" "', argument " "2"" of type '" "R3 const""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RectangularDetector_setPosition" "', argument " "2"" of type '" "R3""'"); } else { R3 * temp = reinterpret_cast< R3 * >(argp2); arg2 = *temp; @@ -37137,8 +37137,8 @@ SWIGINTERN PyObject *_wrap_RectangularDetector_setPosition(PyObject *self, PyObj fail: SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'RectangularDetector_setPosition'.\n" " Possible C/C++ prototypes are:\n" - " RectangularDetector::setPosition(R3 const,double,double,R3 const)\n" - " RectangularDetector::setPosition(R3 const,double,double)\n"); + " RectangularDetector::setPosition(R3,double,double,R3)\n" + " RectangularDetector::setPosition(R3,double,double)\n"); return 0; } @@ -44876,7 +44876,7 @@ static PyMethodDef SwigMethods[] = { { "new_IntensityData", _wrap_new_IntensityData, METH_VARARGS, "\n" "IntensityData()\n" "new_IntensityData(IntensityData arg1) -> IntensityData\n" - "OutputData< T >::OutputData(OutputData &&)\n" + "OutputData< T >::OutputData(OutputData &&) noexcept\n" "\n" ""}, { "delete_IntensityData", _wrap_delete_IntensityData, METH_O, "\n" @@ -44890,8 +44890,8 @@ static PyMethodDef SwigMethods[] = { "\n" ""}, { "IntensityData_copyFrom", _wrap_IntensityData_copyFrom, METH_VARARGS, "\n" - "IntensityData_copyFrom(IntensityData self, IntensityData x)\n" - "void OutputData< T >::copyFrom(const OutputData< T > &x)\n" + "IntensityData_copyFrom(IntensityData self, IntensityData other)\n" + "void OutputData< T >::copyFrom(const OutputData< T > &other)\n" "\n" ""}, { "IntensityData_meanValues", _wrap_IntensityData_meanValues, METH_O, "\n" @@ -45162,8 +45162,8 @@ static PyMethodDef SwigMethods[] = { "\n" ""}, { "checkRelativeDifference", _wrap_checkRelativeDifference, METH_VARARGS, "\n" - "checkRelativeDifference(IntensityData dat, IntensityData ref, double const threshold) -> bool\n" - "bool DataUtils::Data::checkRelativeDifference(const OutputData< double > &dat, const OutputData< double > &ref, const double threshold)\n" + "checkRelativeDifference(IntensityData dat, IntensityData ref, double threshold) -> bool\n" + "bool DataUtils::Data::checkRelativeDifference(const OutputData< double > &dat, const OutputData< double > &ref, double threshold)\n" "\n" "Returns true is relative difference is below threshold; prints informative output. \n" "\n" @@ -45212,7 +45212,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "delete_Beam", _wrap_delete_Beam, METH_O, "\n" "delete_Beam(Beam self)\n" - "Beam::~Beam()\n" + "Beam::~Beam() override\n" "\n" ""}, { "Beam_clone", _wrap_Beam_clone, METH_O, "\n" @@ -45292,8 +45292,8 @@ static PyMethodDef SwigMethods[] = { "\n" ""}, { "Beam_setInclination", _wrap_Beam_setInclination, METH_VARARGS, "\n" - "Beam_setInclination(Beam self, double const alpha)\n" - "void Beam::setInclination(const double alpha)\n" + "Beam_setInclination(Beam self, double alpha)\n" + "void Beam::setInclination(double alpha)\n" "\n" ""}, { "Beam_setInclinationLimits", _wrap_Beam_setInclinationLimits, METH_VARARGS, "\n" @@ -45317,7 +45317,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "Beam_setPolarization", _wrap_Beam_setPolarization, METH_VARARGS, "\n" "Beam_setPolarization(Beam self, R3 bloch_vector)\n" - "void Beam::setPolarization(const R3 bloch_vector)\n" + "void Beam::setPolarization(R3 bloch_vector)\n" "\n" "Sets the polarization density matrix according to the given Bloch vector. \n" "\n" @@ -45326,12 +45326,12 @@ static PyMethodDef SwigMethods[] = { { "Beam_swiginit", Beam_swiginit, METH_VARARGS, NULL}, { "delete_IFootprintFactor", _wrap_delete_IFootprintFactor, METH_O, "\n" "delete_IFootprintFactor(IFootprintFactor self)\n" - "IFootprintFactor::~IFootprintFactor()\n" + "IFootprintFactor::~IFootprintFactor() override\n" "\n" ""}, { "IFootprintFactor_clone", _wrap_IFootprintFactor_clone, METH_O, "\n" "IFootprintFactor_clone(IFootprintFactor self) -> IFootprintFactor\n" - "virtual IFootprintFactor* IFootprintFactor::clone() const =0\n" + "IFootprintFactor* IFootprintFactor::clone() const override=0\n" "\n" ""}, { "IFootprintFactor_widthRatio", _wrap_IFootprintFactor_widthRatio, METH_O, "\n" @@ -45426,7 +45426,7 @@ static PyMethodDef SwigMethods[] = { { "FootprintSquare_swiginit", FootprintSquare_swiginit, METH_VARARGS, NULL}, { "IShape2D_clone", _wrap_IShape2D_clone, METH_O, "\n" "IShape2D_clone(IShape2D self) -> IShape2D\n" - "virtual IShape2D* IShape2D::clone() const =0\n" + "IShape2D* IShape2D::clone() const override=0\n" "\n" ""}, { "IShape2D_contains", _wrap_IShape2D_contains, METH_VARARGS, "\n" @@ -45464,13 +45464,13 @@ static PyMethodDef SwigMethods[] = { ""}, { "Ellipse_clone", _wrap_Ellipse_clone, METH_O, "\n" "Ellipse_clone(Ellipse self) -> Ellipse\n" - "Ellipse* Ellipse::clone() const\n" + "Ellipse* Ellipse::clone() const override\n" "\n" ""}, { "Ellipse_contains", _wrap_Ellipse_contains, METH_VARARGS, "\n" "Ellipse_contains(Ellipse self, double x, double y) -> bool\n" "Ellipse_contains(Ellipse self, Bin1D const & binx, Bin1D const & biny) -> bool\n" - "bool Ellipse::contains(const Bin1D &binx, const Bin1D &biny) const\n" + "bool Ellipse::contains(const Bin1D &binx, const Bin1D &biny) const override\n" "\n" "Returns true if area defined by two bins is inside or on border of ellipse; more precisely, if mid point of two bins satisfy this condition. \n" "\n" @@ -45510,13 +45510,13 @@ static PyMethodDef SwigMethods[] = { ""}, { "Line_clone", _wrap_Line_clone, METH_O, "\n" "Line_clone(Line self) -> Line\n" - "Line* Line::clone() const\n" + "Line* Line::clone() const override\n" "\n" ""}, { "Line_contains", _wrap_Line_contains, METH_VARARGS, "\n" "Line_contains(Line self, double x, double y) -> bool\n" "Line_contains(Line self, Bin1D const & binx, Bin1D const & biny) -> bool\n" - "bool Line::contains(const Bin1D &binx, const Bin1D &biny) const\n" + "bool Line::contains(const Bin1D &binx, const Bin1D &biny) const override\n" "\n" "Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). \n" "\n" @@ -45537,13 +45537,13 @@ static PyMethodDef SwigMethods[] = { ""}, { "VerticalLine_clone", _wrap_VerticalLine_clone, METH_O, "\n" "VerticalLine_clone(VerticalLine self) -> VerticalLine\n" - "VerticalLine* VerticalLine::clone() const\n" + "VerticalLine* VerticalLine::clone() const override\n" "\n" ""}, { "VerticalLine_contains", _wrap_VerticalLine_contains, METH_VARARGS, "\n" "VerticalLine_contains(VerticalLine self, double x, double y) -> bool\n" "VerticalLine_contains(VerticalLine self, Bin1D const & binx, Bin1D const & biny) -> bool\n" - "bool VerticalLine::contains(const Bin1D &binx, const Bin1D &biny) const\n" + "bool VerticalLine::contains(const Bin1D &binx, const Bin1D &biny) const override\n" "\n" "Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). \n" "\n" @@ -45569,13 +45569,13 @@ static PyMethodDef SwigMethods[] = { ""}, { "HorizontalLine_clone", _wrap_HorizontalLine_clone, METH_O, "\n" "HorizontalLine_clone(HorizontalLine self) -> HorizontalLine\n" - "HorizontalLine* HorizontalLine::clone() const\n" + "HorizontalLine* HorizontalLine::clone() const override\n" "\n" ""}, { "HorizontalLine_contains", _wrap_HorizontalLine_contains, METH_VARARGS, "\n" "HorizontalLine_contains(HorizontalLine self, double x, double y) -> bool\n" "HorizontalLine_contains(HorizontalLine self, Bin1D const & binx, Bin1D const & biny) -> bool\n" - "bool HorizontalLine::contains(const Bin1D &binx, const Bin1D &biny) const\n" + "bool HorizontalLine::contains(const Bin1D &binx, const Bin1D &biny) const override\n" "\n" "Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). \n" "\n" @@ -45597,18 +45597,18 @@ static PyMethodDef SwigMethods[] = { ""}, { "delete_Polygon", _wrap_delete_Polygon, METH_O, "\n" "delete_Polygon(Polygon self)\n" - "Polygon::~Polygon()\n" + "Polygon::~Polygon() override\n" "\n" ""}, { "Polygon_clone", _wrap_Polygon_clone, METH_O, "\n" "Polygon_clone(Polygon self) -> Polygon\n" - "virtual Polygon* Polygon::clone() const\n" + "Polygon* Polygon::clone() const override\n" "\n" ""}, { "Polygon_contains", _wrap_Polygon_contains, METH_VARARGS, "\n" "Polygon_contains(Polygon self, double x, double y) -> bool\n" "Polygon_contains(Polygon self, Bin1D const & binx, Bin1D const & biny) -> bool\n" - "bool Polygon::contains(const Bin1D &binx, const Bin1D &biny) const\n" + "bool Polygon::contains(const Bin1D &binx, const Bin1D &biny) const override\n" "\n" "Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). \n" "\n" @@ -45650,7 +45650,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "Rectangle_clone", _wrap_Rectangle_clone, METH_O, "\n" "Rectangle_clone(Rectangle self) -> Rectangle\n" - "Rectangle* Rectangle::clone() const\n" + "Rectangle* Rectangle::clone() const override\n" "\n" ""}, { "Rectangle_setInverted", _wrap_Rectangle_setInverted, METH_VARARGS, "\n" @@ -45661,7 +45661,7 @@ static PyMethodDef SwigMethods[] = { { "Rectangle_contains", _wrap_Rectangle_contains, METH_VARARGS, "\n" "Rectangle_contains(Rectangle self, double x, double y) -> bool\n" "Rectangle_contains(Rectangle self, Bin1D const & binx, Bin1D const & biny) -> bool\n" - "bool Rectangle::contains(const Bin1D &binx, const Bin1D &biny) const\n" + "bool Rectangle::contains(const Bin1D &binx, const Bin1D &biny) const override\n" "\n" "Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). \n" "\n" @@ -45696,7 +45696,7 @@ static PyMethodDef SwigMethods[] = { { "Rectangle_swiginit", Rectangle_swiginit, METH_VARARGS, NULL}, { "delete_IDetectorResolution", _wrap_delete_IDetectorResolution, METH_O, "\n" "delete_IDetectorResolution(IDetectorResolution self)\n" - "virtual IDetectorResolution::~IDetectorResolution()\n" + "IDetectorResolution::~IDetectorResolution() override=default\n" "\n" ""}, { "IDetectorResolution_clone", _wrap_IDetectorResolution_clone, METH_O, "\n" @@ -45714,7 +45714,7 @@ static PyMethodDef SwigMethods[] = { { "IDetectorResolution_swigregister", IDetectorResolution_swigregister, METH_O, NULL}, { "delete_IResolutionFunction2D", _wrap_delete_IResolutionFunction2D, METH_O, "\n" "delete_IResolutionFunction2D(IResolutionFunction2D self)\n" - "virtual IResolutionFunction2D::~IResolutionFunction2D()\n" + "IResolutionFunction2D::~IResolutionFunction2D() override=default\n" "\n" ""}, { "IResolutionFunction2D_evaluateCDF", _wrap_IResolutionFunction2D_evaluateCDF, METH_VARARGS, "\n" @@ -45724,7 +45724,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IResolutionFunction2D_clone", _wrap_IResolutionFunction2D_clone, METH_O, "\n" "IResolutionFunction2D_clone(IResolutionFunction2D self) -> IResolutionFunction2D\n" - "virtual IResolutionFunction2D* IResolutionFunction2D::clone() const =0\n" + "IResolutionFunction2D* IResolutionFunction2D::clone() const override=0\n" "\n" ""}, { "IResolutionFunction2D_swigregister", IResolutionFunction2D_swigregister, METH_O, NULL}, @@ -45854,7 +45854,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "delete_IDetector", _wrap_delete_IDetector, METH_O, "\n" "delete_IDetector(IDetector self)\n" - "IDetector::~IDetector()\n" + "IDetector::~IDetector() override\n" "\n" ""}, { "IDetector_setDetectorNormal", _wrap_IDetector_setDetectorNormal, METH_VARARGS, "\n" @@ -45871,7 +45871,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "IDetector_setAnalyzer", _wrap_IDetector_setAnalyzer, METH_VARARGS, "\n" "IDetector_setAnalyzer(IDetector self, R3 direction, double efficiency, double total_transmission)\n" - "void IDetector::setAnalyzer(const R3 direction, double efficiency, double total_transmission)\n" + "void IDetector::setAnalyzer(R3 direction, double efficiency, double total_transmission)\n" "\n" "Sets the polarization analyzer characteristics of the detector. \n" "\n" @@ -45978,15 +45978,15 @@ static PyMethodDef SwigMethods[] = { "\n" ""}, { "IDetector_regionOfInterestIndexToDetectorIndex", _wrap_IDetector_regionOfInterestIndexToDetectorIndex, METH_VARARGS, "\n" - "IDetector_regionOfInterestIndexToDetectorIndex(IDetector self, size_t const regionOfInterestIndex) -> size_t\n" - "size_t IDetector::regionOfInterestIndexToDetectorIndex(const size_t regionOfInterestIndex) const\n" + "IDetector_regionOfInterestIndexToDetectorIndex(IDetector self, size_t regionOfInterestIndex) -> size_t\n" + "size_t IDetector::regionOfInterestIndexToDetectorIndex(size_t regionOfInterestIndex) const\n" "\n" "Convert an index of the region of interest to an index of the detector. If no region of interest is set, then the index stays unmodified (since ROI == detector area). \n" "\n" ""}, { "IDetector_detectorIndexToRegionOfInterestIndex", _wrap_IDetector_detectorIndexToRegionOfInterestIndex, METH_VARARGS, "\n" - "IDetector_detectorIndexToRegionOfInterestIndex(IDetector self, size_t const detectorIndex) -> size_t\n" - "size_t IDetector::detectorIndexToRegionOfInterestIndex(const size_t detectorIndex) const\n" + "IDetector_detectorIndexToRegionOfInterestIndex(IDetector self, size_t detectorIndex) -> size_t\n" + "size_t IDetector::detectorIndexToRegionOfInterestIndex(size_t detectorIndex) const\n" "\n" ""}, { "IDetector_applyDetectorResolution", _wrap_IDetector_applyDetectorResolution, METH_VARARGS, "\n" @@ -46046,7 +46046,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "delete_IDetector2D", _wrap_delete_IDetector2D, METH_O, "\n" "delete_IDetector2D(IDetector2D self)\n" - "IDetector2D::~IDetector2D()\n" + "IDetector2D::~IDetector2D() override\n" "\n" ""}, { "IDetector2D_setDetectorParameters", _wrap_IDetector2D_setDetectorParameters, METH_VARARGS, "\n" @@ -46094,15 +46094,15 @@ static PyMethodDef SwigMethods[] = { "\n" ""}, { "IDetector2D_regionOfInterestIndexToDetectorIndex", _wrap_IDetector2D_regionOfInterestIndexToDetectorIndex, METH_VARARGS, "\n" - "IDetector2D_regionOfInterestIndexToDetectorIndex(IDetector2D self, size_t const regionOfInterestIndex) -> size_t\n" - "size_t IDetector2D::regionOfInterestIndexToDetectorIndex(const size_t regionOfInterestIndex) const override\n" + "IDetector2D_regionOfInterestIndexToDetectorIndex(IDetector2D self, size_t regionOfInterestIndex) -> size_t\n" + "size_t IDetector2D::regionOfInterestIndexToDetectorIndex(size_t regionOfInterestIndex) const override\n" "\n" "Convert an index of the region of interest to an index of the detector. If no region of interest is set, then the index stays unmodified (since ROI == detector area). \n" "\n" ""}, { "IDetector2D_detectorIndexToRegionOfInterestIndex", _wrap_IDetector2D_detectorIndexToRegionOfInterestIndex, METH_VARARGS, "\n" - "IDetector2D_detectorIndexToRegionOfInterestIndex(IDetector2D self, size_t const detectorIndex) -> size_t\n" - "size_t IDetector2D::detectorIndexToRegionOfInterestIndex(const size_t detectorIndex) const override\n" + "IDetector2D_detectorIndexToRegionOfInterestIndex(IDetector2D self, size_t detectorIndex) -> size_t\n" + "size_t IDetector2D::detectorIndexToRegionOfInterestIndex(size_t detectorIndex) const override\n" "\n" ""}, { "IDetector2D_active_indices", _wrap_IDetector2D_active_indices, METH_O, "\n" @@ -46150,7 +46150,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "delete_RectangularDetector", _wrap_delete_RectangularDetector, METH_O, "\n" "delete_RectangularDetector(RectangularDetector self)\n" - "RectangularDetector::~RectangularDetector()\n" + "RectangularDetector::~RectangularDetector() override\n" "\n" ""}, { "RectangularDetector_setDetectorNormal", _wrap_RectangularDetector_setDetectorNormal, METH_VARARGS, "\n" @@ -46162,7 +46162,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "RectangularDetector_setPosition", _wrap_RectangularDetector_setPosition, METH_VARARGS, "\n" "RectangularDetector_setPosition(RectangularDetector self, R3 normal_to_detector, double u0, double v0, R3 direction=R3(0.0, -1.0, 0.0))\n" - "void RectangularDetector::setPosition(const R3 normal_to_detector, double u0, double v0, const R3 direction=R3(0.0, -1.0, 0.0))\n" + "void RectangularDetector::setPosition(R3 normal_to_detector, double u0, double v0, R3 direction=R3(0.0, -1.0, 0.0))\n" "\n" ""}, { "RectangularDetector_setPerpendicularToSampleX", _wrap_RectangularDetector_setPerpendicularToSampleX, METH_VARARGS, "\n" @@ -46247,7 +46247,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "RectangularDetector_defaultCoords", _wrap_RectangularDetector_defaultCoords, METH_O, "\n" "RectangularDetector_defaultCoords(RectangularDetector self) -> Axes::Coords\n" - "virtual Axes::Coords RectangularDetector::defaultCoords() const override\n" + "Axes::Coords RectangularDetector::defaultCoords() const override\n" "\n" "return default axes units \n" "\n" @@ -46284,12 +46284,12 @@ static PyMethodDef SwigMethods[] = { ""}, { "delete_SphericalDetector", _wrap_delete_SphericalDetector, METH_O, "\n" "delete_SphericalDetector(SphericalDetector self)\n" - "SphericalDetector::~SphericalDetector() override\n" + "SphericalDetector::~SphericalDetector() override=default\n" "\n" ""}, { "SphericalDetector_defaultCoords", _wrap_SphericalDetector_defaultCoords, METH_O, "\n" "SphericalDetector_defaultCoords(SphericalDetector self) -> Axes::Coords\n" - "virtual Axes::Coords SphericalDetector::defaultCoords() const override\n" + "Axes::Coords SphericalDetector::defaultCoords() const override\n" "\n" "return default axes units \n" "\n" @@ -46310,7 +46310,7 @@ static PyMethodDef SwigMethods[] = { ""}, { "delete_Instrument", _wrap_delete_Instrument, METH_O, "\n" "delete_Instrument(Instrument self)\n" - "Instrument::~Instrument()\n" + "Instrument::~Instrument() override\n" "\n" ""}, { "Instrument_accept", _wrap_Instrument_accept, METH_VARARGS, "\n" @@ -46713,14 +46713,14 @@ static PyMethodDef SwigMethods[] = { ""}, { "Histogram1D_clone", _wrap_Histogram1D_clone, METH_O, "\n" "Histogram1D_clone(Histogram1D self) -> Histogram1D\n" - "Histogram1D * Histogram1D::clone() const\n" + "Histogram1D * Histogram1D::clone() const override\n" "\n" "Returns clone of other histogram. \n" "\n" ""}, { "Histogram1D_rank", _wrap_Histogram1D_rank, METH_O, "\n" "Histogram1D_rank(Histogram1D self) -> size_t\n" - "size_t Histogram1D::rank() const\n" + "size_t Histogram1D::rank() const override\n" "\n" "Returns the number of histogram dimensions. \n" "\n" @@ -46791,14 +46791,14 @@ static PyMethodDef SwigMethods[] = { ""}, { "Histogram2D_clone", _wrap_Histogram2D_clone, METH_O, "\n" "Histogram2D_clone(Histogram2D self) -> Histogram2D\n" - "Histogram2D * Histogram2D::clone() const\n" + "Histogram2D * Histogram2D::clone() const override\n" "\n" "Returns clone of other histogram. \n" "\n" ""}, { "Histogram2D_rank", _wrap_Histogram2D_rank, METH_O, "\n" "Histogram2D_rank(Histogram2D self) -> size_t\n" - "size_t Histogram2D::rank() const\n" + "size_t Histogram2D::rank() const override\n" "\n" "Returns the number of histogram dimensions. \n" "\n" @@ -46914,7 +46914,7 @@ static PyMethodDef SwigMethods[] = { "SimulationResult(IntensityData data, ICoordSystem const *&& coords)\n" "SimulationResult(SimulationResult other)\n" "new_SimulationResult(SimulationResult other) -> SimulationResult\n" - "SimulationResult::SimulationResult(SimulationResult &&other)\n" + "SimulationResult::SimulationResult(SimulationResult &&other) noexcept\n" "\n" ""}, { "SimulationResult_histogram2d", _wrap_SimulationResult_histogram2d, METH_VARARGS, "\n" -- GitLab