Commit 18aca57d authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

[corr1] various simplifications in view of pybind11 ()

Merging branch 'corr1'  into 'main'.

See merge request !954
parents 55d29765 742bf0dc
Pipeline #67047 failed with stage
in 9 minutes and 46 seconds
......@@ -67,7 +67,7 @@ if(LINUX)
# see <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847298>
set(link_flags "-Wl,--disable-new-dtags,-rpath,\$ORIGIN:\$ORIGIN/../lib")
set_target_properties(${executable_name} PROPERTIES LINK_FLAGS ${link_flags})
endif(LINUX)
endif()
if(APPLE)
set(MACOSX_BUNDLE_IDENTIFIER org.bornagainproject.BornAgain)
......@@ -153,7 +153,7 @@ if(LINUX)
configure_file(
${CMAKE_SOURCE_DIR}/devtools/deploy/linux/adjust_pkg_linux.sh.in
${BUILD_VAR_DIR}/adjust_pkg_linux.sh @ONLY)
endif(LINUX)
endif()
# execute package-fixing script before CPack builds the final package file
configure_file(
......
......@@ -55,7 +55,7 @@ set(BA_PY_PLATFORM "" CACHE INTERNAL "Path to Python platform to build a Python
string(STRIP "${BA_PY_PLATFORM}" BA_PY_PLATFORM)
if(BA_PY_PLATFORM)
set(BA_PY_PACKAGE ON)
endif(BA_PY_PLATFORM)
endif()
option(BUILD_DEBIAN "Build a debian package" OFF)
option(BA_APPLE_BUNDLE "Create a Mac OS X bundle" OFF)
......@@ -148,7 +148,7 @@ include(BornAgain/Dependences)
if(WIN32)
include(BornAgain/InstallDll)
endif(WIN32)
endif()
# Python
if(BORNAGAIN_PYTHON OR BA_PY_PACKAGE)
......
......@@ -13,6 +13,7 @@
// ************************************************************************************************
#include "Device/Data/ArrayUtils.h"
#include "Device/Data/Datafield.h"
#include "Base/Axis/FixedBinAxis.h"
#include "Base/Axis/Frame.h"
#include <stdexcept>
......
......@@ -20,10 +20,11 @@
#ifndef BORNAGAIN_DEVICE_DATA_ARRAYUTILS_H
#define BORNAGAIN_DEVICE_DATA_ARRAYUTILS_H
#include "Device/Data/Datafield.h"
#include <memory>
#include <vector>
class Datafield;
//! Array utility functions getShape
namespace DataUtils::Array {
......
......@@ -20,6 +20,7 @@
#include "Base/Util/Assert.h"
#include "Device/Beam/Beam.h"
#include "Device/Detector/DetectorContext.h"
#include "Device/Detector/SimulationAreaIterator.h"
#include "Device/Mask/DetectorMask.h"
#include "Device/Mask/InfinitePlane.h"
#include "Device/Resolution/ConvolutionDetectorResolution.h"
......
......@@ -18,12 +18,12 @@
#include "Base/Types/ICloneable.h"
#include "Base/Types/OwningVector.h"
#include "Device/Coord/Tags.h" // enum Coords
#include "Device/Detector/SimulationAreaIterator.h"
#include "Device/Pol/PolFilter.h"
#include <functional>
class Beam;
class CoordSystem2D;
class Datafield;
class DetectorContext;
class DetectorMask;
class DiffuseElement;
......@@ -34,8 +34,8 @@ class IDetectorResolution;
class IPixel;
class IResolutionFunction2D;
class IShape2D;
class SimulationAreaIterator;
class Datafield;
//! Abstract detector interface.
//!
......
......@@ -12,6 +12,7 @@
//
// ************************************************************************************************
#include "Device/Detector/SimulationAreaIterator.h"
#include "Device/Detector/IDetector.h"
#include "Device/Mask/DetectorMask.h"
......
......@@ -15,6 +15,7 @@
#include "Device/IO/IOFactory.h"
#include "Base/Util/Assert.h"
#include "Base/Util/FileSystemUtils.h"
#include "Device/Data/Datafield.h"
#include "Device/Histo/DiffUtil.h"
#include "Device/Histo/SimulationResult.h"
#include "Device/IO/DataFormatUtils.h"
......
......@@ -17,6 +17,7 @@
#include "Base/Axis/IAxis.h"
#include "Base/Util/StringUtils.h"
#include "Device/Data/ArrayUtils.h"
#include "Device/Data/Datafield.h"
#include "Device/IO/DataFormatUtils.h"
#include <iostream>
......
......@@ -16,6 +16,7 @@
#include "Base/Axis/FixedBinAxis.h"
#include "Base/Axis/Frame.h"
#include "Base/Util/StringUtils.h"
#include "Device/Data/Datafield.h"
#include <memory>
namespace {
......
......@@ -15,7 +15,9 @@
#ifndef BORNAGAIN_DEVICE_IO_READWRITENICOS_H
#define BORNAGAIN_DEVICE_IO_READWRITENICOS_H
#include "Device/Data/Datafield.h"
#include <iostream>
class Datafield;
//! Read/write SANSDRaw files written by Nicos (*.001).
......
......@@ -17,6 +17,7 @@
#include "Base/Axis/IAxis.h"
#include "Base/Util/StringUtils.h"
#include "Device/Data/ArrayUtils.h"
#include "Device/Data/Datafield.h"
#include "Device/IO/DataFormatUtils.h"
#include <string>
#include <vector>
......
......@@ -19,6 +19,7 @@
#include "Base/Axis/Frame.h"
#include "Base/Util/Assert.h"
#include "Base/Util/SysUtils.h"
#include "Device/Data/Datafield.h"
#include <cstring> // memcpy
#include <memory>
#include <sstream>
......
......@@ -22,11 +22,12 @@
#ifdef BA_TIFF_SUPPORT
#include "Device/Data/Datafield.h"
#include <cstdint>
#include <memory>
#include <tiffio.h>
class Datafield;
//! Reads/write tiff files.
class ReadWriteTiff {
......
......@@ -106,9 +106,9 @@ if(WIN32)
if(EXISTS ${QT_VISTA_STYLE})
install(FILES ${QT_VISTA_STYLE}
DESTINATION bin/styles COMPONENT Libraries)
else(EXISTS ${QT_VISTA_STYLE})
else()
message(AUTHOR_WARNING File ${QT_VISTA_STYLE} not found.)
endif(EXISTS ${QT_VISTA_STYLE})
endif()
unset(QT_VISTA_STYLE)
endif()
......@@ -15,6 +15,7 @@
#include "GUI/Model/Model/JobFunctions.h"
#include "Base/Util/Assert.h"
#include "Device/Detector/IDetector.h"
#include "Device/Detector/SimulationAreaIterator.h"
#include "GUI/Model/Data/Data1DViewItem.h"
#include "GUI/Model/Data/DataPropertyContainer.h"
#include "GUI/Model/Data/IntensityDataItem.h"
......
......@@ -15,6 +15,7 @@
#include "Param/Distrib/DistributionHandler.h"
#include "Base/Util/Assert.h"
#include "Param/Distrib/Distributions.h"
#include "Param/Distrib/ParameterDistribution.h"
DistributionHandler::DistributionHandler()
: m_nbr_combinations(1)
......
......@@ -20,23 +20,19 @@
#ifndef BORNAGAIN_PARAM_DISTRIB_DISTRIBUTIONHANDLER_H
#define BORNAGAIN_PARAM_DISTRIB_DISTRIBUTIONHANDLER_H
#include "Param/Distrib/ParameterDistribution.h"
#include <functional>
#include <map>
#include <vector>
class ParameterDistribution;
class ParameterSample;
//! Provides the functionality to average over parameter distributions with weights.
class DistributionHandler {
public:
DistributionHandler();
virtual ~DistributionHandler();
//! add a sampled parameter distribution
void addParameterDistribution(const std::string& param_name,
const IDistribution1D& distribution, size_t nbr_samples,
double sigma_factor = 0.0,
const RealLimits& limits = RealLimits());
void addParameterDistribution(const ParameterDistribution& par_distr);
//! get the total number of parameter value combinations (product
......
......@@ -16,8 +16,8 @@
#define BORNAGAIN_PARAM_DISTRIB_DISTRIBUTIONS_H
#include "Base/Types/ICloneable.h"
#include "Fit/Param/RealLimits.h"
#include "Param/Node/INode.h"
#include "Fit/Param/RealLimits.h"
#include <vector>
class ParameterSample;
......@@ -44,7 +44,7 @@ public:
//! Returns equidistant samples, using intrinsic parameters, weighted with probabilityDensity().
std::vector<ParameterSample> equidistantSamples(size_t nbr_samples, double sigma_factor = 0.,
const RealLimits& limits = RealLimits()) const;
const RealLimits& limits = {}) const;
//! Returns equidistant samples from xmin to xmax, weighted with probabilityDensity().
std::vector<ParameterSample> equidistantSamplesInRange(size_t nbr_samples, double xmin,
......@@ -54,7 +54,7 @@ public:
//! way from mean and width parameter, taking into account limits and sigma_factor.
virtual std::vector<double>
equidistantPoints(size_t nbr_samples, double sigma_factor,
const RealLimits& limits = RealLimits()) const = 0;
const RealLimits& limits = {}) const = 0;
//! Returns equidistant interpolation points from xmin to xmax.
virtual std::vector<double> equidistantPointsInRange(size_t nbr_samples, double xmin,
......@@ -109,7 +109,7 @@ public:
//! Returns list of sample values
std::vector<double> equidistantPoints(size_t nbr_samples, double sigma_factor,
const RealLimits& limits = RealLimits()) const override;
const RealLimits& limits = {}) const override;
bool isDelta() const override;
......@@ -150,7 +150,7 @@ public:
//! generate list of sample values
std::vector<double> equidistantPoints(size_t nbr_samples, double sigma_factor,
const RealLimits& limits = RealLimits()) const override;
const RealLimits& limits = {}) const override;
bool isDelta() const override;
......@@ -194,7 +194,7 @@ public:
//! generate list of sample values
std::vector<double> equidistantPoints(size_t nbr_samples, double sigma_factor,
const RealLimits& limits = RealLimits()) const override;
const RealLimits& limits = {}) const override;
bool isDelta() const override;
......@@ -238,7 +238,7 @@ public:
//! generate list of sample values
std::vector<double> equidistantPoints(size_t nbr_samples, double sigma_factor,
const RealLimits& limits = RealLimits()) const override;
const RealLimits& limits = {}) const override;
bool isDelta() const override;
......@@ -281,7 +281,7 @@ public:
//! generate list of sample values
std::vector<double> equidistantPoints(size_t nbr_samples, double sigma_factor,
const RealLimits& limits = RealLimits()) const override;
const RealLimits& limits = {}) const override;
bool isDelta() const override;
......@@ -329,7 +329,7 @@ public:
//! generate list of sample values
std::vector<double> equidistantPoints(size_t nbr_samples, double sigma_factor,
const RealLimits& limits = RealLimits()) const override;
const RealLimits& limits = {}) const override;
bool isDelta() const override;
......
......@@ -14,6 +14,7 @@
#include "Sim/Fitting/FitObjective.h"
#include "Base/Util/Assert.h"
#include "Device/Data/Datafield.h"
#include "Fit/Minimizer/MinimizerResult.h"
#include "Sim/Fitting/FitStatus.h"
#include "Sim/Fitting/ObjectiveMetric.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment