From 33bd5fd57ee68576e9c075b48a7115b99cfb6fe7 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (laptop)" <j.wuttke@fz-juelich.de> Date: Wed, 27 Mar 2013 11:02:32 +0100 Subject: [PATCH] Change wording of brief class description to Qt usage: - 3rd person form: "Does" this or that. - For all const methods that return something: "Returns" ... - For boolean return value: "Returns true if " ... --- App/inc/AppOptionsDescription.h | 2 +- App/inc/DrawHelper.h | 4 +- App/inc/FitSuiteObserverFactory.h | 4 +- App/inc/FunctionalTestFactory.h | 4 +- App/inc/IsGISAXSTools.h | 18 +++--- App/inc/TestFittingModule1.h | 4 +- App/inc/TestFresnelCoeff.h | 6 +- App/inc/TestIsGISAXS12.h | 4 +- App/inc/TestIsGISAXS13.h | 2 +- App/inc/TestIsGISAXS5.h | 4 +- App/inc/TestMesoCrystal1.h | 2 +- App/inc/TestMesoCrystal2.h | 2 +- App/inc/TestPerformance.h | 2 +- App/inc/TestRoughness.h | 4 +- App/src/AppOptionsDescription.cpp | 2 +- App/src/DrawHelper.cpp | 2 +- App/src/FitSuiteObserverFactory.cpp | 2 +- App/src/IsGISAXSTools.cpp | 2 +- App/src/TestFresnelCoeff.cpp | 4 +- Core/Algorithms/inc/Beam.h | 2 +- Core/Algorithms/inc/ChiSquaredFrequency.h | 2 +- Core/Algorithms/inc/ChiSquaredModule.h | 8 +-- .../inc/ConvolutionDetectorResolution.h | 2 +- Core/Algorithms/inc/DWBASimulation.h | 16 +++--- Core/Algorithms/inc/Detector.h | 10 ++-- Core/Algorithms/inc/IChiSquaredModule.h | 32 +++++------ .../inc/IInterferenceFunctionStrategy.h | 6 +- Core/Algorithms/inc/IOutputDataNormalizer.h | 2 +- Core/Algorithms/inc/Instrument.h | 28 +++++----- .../inc/LayerDecoratorDWBASimulation.h | 10 +++- .../Algorithms/inc/MultiLayerDWBASimulation.h | 2 +- Core/Algorithms/inc/OpticalFresnel.h | 2 +- Core/Algorithms/inc/Simulation.h | 34 +++++------ Core/Algorithms/inc/StrategyBuilder.h | 6 +- Core/Algorithms/src/DiffuseDWBASimulation.cpp | 2 +- Core/Fitting/inc/AttLimits.h | 26 ++++----- Core/Fitting/inc/FitObject.h | 24 ++++---- Core/Fitting/inc/FitParameter.h | 16 +++--- Core/Fitting/inc/FitParameterLinked.h | 10 ++-- Core/Fitting/inc/FitSuite.h | 26 ++++----- Core/Fitting/inc/FitSuiteObjects.h | 36 ++++++------ Core/Fitting/inc/FitSuiteParameters.h | 20 +++---- Core/Fitting/inc/IMinimizer.h | 24 ++++---- Core/Fitting/src/FitObject.cpp | 6 +- Core/Fitting/src/FitParameterLinked.cpp | 4 +- Core/Fitting/src/FitSuite.cpp | 8 +-- Core/Fitting/src/FitSuiteObjects.cpp | 10 ++-- Core/Fitting/src/FitSuiteParameters.cpp | 18 ++---- Core/Fitting/src/MinimizerTest.cpp | 4 +- Core/FormFactors/inc/FormFactorBox.h | 4 +- .../inc/FormFactorDecoratorDebyeWaller.h | 2 +- Core/FormFactors/inc/FormFactorEllipsoid.h | 6 +- Core/FormFactors/inc/FormFactorFullSphere.h | 4 +- Core/FormFactors/inc/FormFactorGauss.h | 2 +- Core/FormFactors/inc/FormFactorLorentz.h | 2 +- .../inc/FormFactorParallelepiped.h | 2 +- Core/FormFactors/inc/IFormFactor.h | 10 ++-- Core/FormFactors/inc/IFormFactorBorn.h | 6 +- Core/FormFactors/src/FormFactorCylinder.cpp | 2 +- Core/FormFactors/src/FormFactorGauss.cpp | 2 +- .../src/FormFactorHemiSpheroid.cpp | 2 +- Core/Geometry/inc/BasicVector3D.h | 44 +++++++-------- Core/Geometry/inc/Transform3D.h | 18 +++--- Core/Geometry/src/BasicVector3D.cpp | 18 +++--- Core/PythonAPI/inc/PythonOutputData.h | 7 +-- Core/PythonAPI/src/PythonOutputData.cpp | 6 +- Core/Samples/inc/DiffuseParticleInfo.h | 8 +-- Core/Samples/inc/HomogeneousMaterial.h | 6 +- Core/Samples/inc/ICompositeIterator.h | 2 +- Core/Samples/inc/ICompositeSample.h | 6 +- Core/Samples/inc/IDecoration.h | 12 ++-- Core/Samples/inc/ISample.h | 8 +-- .../inc/InterferenceFunction1DParaCrystal.h | 2 +- .../inc/InterferenceFunction2DLattice.h | 12 ++-- .../inc/InterferenceFunction2DParaCrystal.h | 8 +-- Core/Samples/inc/Lattice.h | 24 ++++---- Core/Samples/inc/LatticeBasis.h | 18 +++--- Core/Samples/inc/Layer.h | 20 +++---- Core/Samples/inc/LayerDecorator.h | 12 ++-- Core/Samples/inc/LayerInterface.h | 16 +++--- Core/Samples/inc/LayerRoughness.h | 20 +++---- Core/Samples/inc/MaterialManager.h | 8 +-- Core/Samples/inc/MultiLayer.h | 44 +++++++-------- Core/Samples/inc/Particle.h | 10 ++-- Core/Samples/inc/ParticleBuilder.h | 2 +- Core/Samples/inc/ParticleCoreShell.h | 8 +-- Core/Samples/inc/ParticleDecoration.h | 20 +++---- Core/Samples/inc/ParticleInfo.h | 14 ++--- Core/Samples/inc/PositionParticleInfo.h | 8 +-- Core/Samples/src/ICompositeSample.cpp | 4 +- Core/Samples/src/ISample.cpp | 2 +- Core/Samples/src/Layer.cpp | 4 +- Core/Samples/src/MaterialManager.cpp | 6 +- Core/Samples/src/MultiLayer.cpp | 4 +- Core/Samples/src/ParticleBuilder.cpp | 2 +- Core/Samples/src/ParticleDecoration.cpp | 8 +-- Core/Samples/src/ParticleInfo.cpp | 2 +- Core/Tools/inc/AxisBin.h | 6 +- Core/Tools/inc/AxisDouble.h | 8 +-- Core/Tools/inc/Convolve.h | 2 +- Core/Tools/inc/IAxis.h | 8 +-- Core/Tools/inc/IFactory.h | 10 ++-- Core/Tools/inc/INamed.h | 14 +++-- Core/Tools/inc/IObserver.h | 2 +- Core/Tools/inc/IParameterized.h | 6 +- Core/Tools/inc/MemberFunctionIntegrator.h | 2 +- Core/Tools/inc/MessageService.h | 2 +- Core/Tools/inc/OutputData.h | 56 +++++++++---------- Core/Tools/inc/OutputDataFunctions.h | 4 +- Core/Tools/inc/OutputDataIterator.h | 10 ++-- Core/Tools/inc/OutputDataReader.h | 2 +- Core/Tools/inc/OutputDataWriter.h | 2 +- Core/Tools/inc/ParameterPool.h | 16 +++--- Core/Tools/inc/ProgramOptions.h | 18 +++--- Core/Tools/inc/RealParameterWrapper.h | 8 +-- Core/Tools/inc/StochasticSampledParameter.h | 12 ++-- Core/Tools/inc/Utils.h | 18 +++--- Core/Tools/src/CoreOptionsDescription.cpp | 2 +- Core/Tools/src/IParameterized.cpp | 4 +- Core/Tools/src/ParameterPool.cpp | 12 ++-- Core/Tools/src/Utils.cpp | 10 ++-- Fit/Factory/inc/ROOTMinimizer.h | 4 +- Fit/Factory/inc/ROOTMinimizerHelper.h | 8 +-- pub/core/Doxyfile | 4 +- 124 files changed, 588 insertions(+), 589 deletions(-) diff --git a/App/inc/AppOptionsDescription.h b/App/inc/AppOptionsDescription.h index 91ad1d855c4..6d9dc983742 100644 --- a/App/inc/AppOptionsDescription.h +++ b/App/inc/AppOptionsDescription.h @@ -18,7 +18,7 @@ class ProgramOptions; -//! add command line and config file options +//! Adds command line and config file options void AddApplicationOptions(ProgramOptions *p_options); #endif // APPPROGRAMOPTIONS_H diff --git a/App/inc/DrawHelper.h b/App/inc/DrawHelper.h index 639a06680bd..ae3c8ff0b4c 100644 --- a/App/inc/DrawHelper.h +++ b/App/inc/DrawHelper.h @@ -32,7 +32,7 @@ class TPad; class DrawHelper :public TObject { public: - //! set own drawing style + //! Sets own drawing style static void SetStyle(); //! saving canvases from memory into multipage pdf file @@ -47,7 +47,7 @@ class DrawHelper :public TObject //! draw multilayer structure in TPad static void DrawMultilayer(const MultiLayer *sample); - //! create and register canvas + //! Creates and register canvas static TCanvas *createAndRegisterCanvas( std::string name, std::string title, int xsize=0, int ysize=0); diff --git a/App/inc/FitSuiteObserverFactory.h b/App/inc/FitSuiteObserverFactory.h index 99db5a1e23f..577516656c6 100644 --- a/App/inc/FitSuiteObserverFactory.h +++ b/App/inc/FitSuiteObserverFactory.h @@ -31,7 +31,7 @@ class TPaveText; class TCanvas; -//! Print fit progress at the end of each FitSuite's iteration. +//! Prints fit progress at the end of each FitSuite's iteration. class FitSuiteObserverPrint : public IObserver { @@ -68,7 +68,7 @@ class FitSuiteObserverDraw : public IObserver void update(IObservable *subject); - //! Return relative difference between simulation and real data. + //! Returns elative difference between simulation and real data. OutputData<double > *getRelativeDifferenceMap( const OutputData<double> *p_simu_data, const OutputData<double> *p_real_data); diff --git a/App/inc/FunctionalTestFactory.h b/App/inc/FunctionalTestFactory.h index 97037e97bc7..6d2d5522424 100644 --- a/App/inc/FunctionalTestFactory.h +++ b/App/inc/FunctionalTestFactory.h @@ -44,11 +44,11 @@ class FunctionalTestFactory : public ISingleton<FunctionalTestFactory>, static void execute_all(ProgramOptions *p_options) { instance().this_execute_all(p_options); } - //! print names of registered tests + //! Prints names of registered tests static void print_testnames() { instance().this_print_testnames(); } - //! print benchmark summary + //! Prints benchmark summary static void print_benchmarks() { instance().this_print_benchmarks(); } diff --git a/App/inc/IsGISAXSTools.h b/App/inc/IsGISAXSTools.h index f0b4f59f543..753ef83511f 100644 --- a/App/inc/IsGISAXSTools.h +++ b/App/inc/IsGISAXSTools.h @@ -85,18 +85,18 @@ class IsGISAXSTools { const std::string &draw_options, const std::string &histogram_title = std::string()); - //! Set minimum of y-axis (for 1D histogram), or z-axis (2D histograms). + //! Sets minimum of y-axis (for 1D histogram), or z-axis (2D histograms). static void setMinimum(double hist_min) { m_hist_min = hist_min; m_has_min = true; } - //! Set maximum of y-axis (for 1D histogram), or z-axis (2D histograms). + //! Sets maximum of y-axis (for 1D histogram), or z-axis (2D histograms). static void setMaximum(double hist_max) { m_hist_max = hist_max; m_has_max = true; } - //! Return true if user has defined minimum + //! Returns true if user has defined minimum static bool hasMinimum() { return m_has_min; } - //! Return true if user has defined minimum + //! Returns true if user has defined minimum static bool hasMaximum() { return m_has_max; } //! Reset user defined min values for histograms, they will be calculated automatically @@ -115,25 +115,25 @@ class IsGISAXSTools { std::vector<std::vector<double > > &v_axis0, std::vector<std::vector<double > > &v_axis1); - //! Create two-dimensional TH2D from OutputData. + //! Creates two-dimensional TH2D from OutputData. static TH2D *getOutputDataTH2D( const OutputData<double>& output, const std::string &histo_name); - //! Create one, two, three-dimensional histograms from OutputData. + //! Creates one, two, three-dimensional histograms from OutputData. static TH1 *getOutputDataTH123D( const OutputData<double>& output, const std::string &histo_name); - //! Create TLine for displaying of one-dimensional data scan. + //! Creates TLine for displaying of one-dimensional data scan. static TLine *getOutputDataScanLine(const OutputData<double> &data); - //! Create TH1D for displaying of one-dimensional data scan. + //! Creates TH1D for displaying of one-dimensional data scan. static TH1D *getOutputDataScanHist( const OutputData<double> &data, const std::string &hname=std::string("scan_hist")); - //! Create noisy data. + //! Creates noisy data. static OutputData<double > *createNoisyData( const OutputData<double> &exact_data, double noise_factor = 0.1); diff --git a/App/inc/TestFittingModule1.h b/App/inc/TestFittingModule1.h index d81cdde4a13..3a3a3ec3211 100644 --- a/App/inc/TestFittingModule1.h +++ b/App/inc/TestFittingModule1.h @@ -34,9 +34,9 @@ class TestFittingModule1 : public IFunctionalTest virtual void execute(); private: - //! initialize sample: layer + nanoparticles, 2 parameters + //! Initializes sample: layer + nanoparticles, 2 parameters void initializeSample1(); - //! initialize sample: layer + substrate + nanoparticles, 4 parameters + //! Initializes sample: layer + substrate + nanoparticles, 4 parameters void initializeSample2(); void initializeSimulation(); diff --git a/App/inc/TestFresnelCoeff.h b/App/inc/TestFresnelCoeff.h index adf106c39c4..63d1e482512 100644 --- a/App/inc/TestFresnelCoeff.h +++ b/App/inc/TestFresnelCoeff.h @@ -21,7 +21,7 @@ #include "MultiLayer.h" #include "OutputData.h" -//! Calculate Fresnel coefficients for several typical multilayer samples and produce validation plots +//! Returns Fresnel coefficients for several typical multilayer samples and produce validation plots class TestFresnelCoeff : public IFunctionalTest { @@ -31,12 +31,12 @@ class TestFresnelCoeff : public IFunctionalTest void execute(); private: - //! calculate Fresnel coefficients .vs. alpha_i for several standard samples + //! Returns Fresnel coefficients .vs. alpha_i for several standard samples void test_standard_samples(); //! draw results of the test void draw_standard_samples(); - //! calculate Fresnel coefficients .vs. alpha_i for set of roughnesses + //! Returns Fresnel coefficients .vs. alpha_i for set of roughnesses void test_roughness_set(); //! draw result of the test void draw_roughness_set(); diff --git a/App/inc/TestIsGISAXS12.h b/App/inc/TestIsGISAXS12.h index a2e7af49c37..342098cde71 100644 --- a/App/inc/TestIsGISAXS12.h +++ b/App/inc/TestIsGISAXS12.h @@ -46,7 +46,7 @@ class TestIsGISAXS12 : public IFunctionalTest virtual ISample *buildSample() const; protected: - //! register some class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); double m_particle_probability1; double m_particle_radius1; @@ -60,7 +60,7 @@ class TestIsGISAXS12 : public IFunctionalTest double m_interf_width; }; - //! initialize simulation + //! Initializes simulation void initializeSimulation(); //! run standard isgisaxs comparison diff --git a/App/inc/TestIsGISAXS13.h b/App/inc/TestIsGISAXS13.h index 14a372bb504..9e41db3ac6e 100644 --- a/App/inc/TestIsGISAXS13.h +++ b/App/inc/TestIsGISAXS13.h @@ -36,7 +36,7 @@ class TestIsGISAXS13 : public IFunctionalTest virtual void execute(); private: - //! initialize simulation + //! Initializes simulation void initializeSimulation(); //! run standard isgisaxs comparison diff --git a/App/inc/TestIsGISAXS5.h b/App/inc/TestIsGISAXS5.h index 88bb574c94a..bb12aa8e295 100644 --- a/App/inc/TestIsGISAXS5.h +++ b/App/inc/TestIsGISAXS5.h @@ -40,7 +40,7 @@ class TestIsGISAXS5 : public IFunctionalTest SampleBuilder(); virtual ISample *buildSample() const; protected: - //! register some class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); double m_particle_radius; double m_dispersion_radius; @@ -51,7 +51,7 @@ class TestIsGISAXS5 : public IFunctionalTest private: - //! initialize simulation + //! Initializes simulation void initializeSimulation(); //! run standard isgisaxs comparison diff --git a/App/inc/TestMesoCrystal1.h b/App/inc/TestMesoCrystal1.h index 627af93848b..294421493b7 100644 --- a/App/inc/TestMesoCrystal1.h +++ b/App/inc/TestMesoCrystal1.h @@ -43,7 +43,7 @@ class TestMesoCrystal1 : public IFunctionalTest virtual ISample *buildSample() const; protected: - //! initialize pool parameters + //! Initializes pool parameters virtual void init_parameters(); private: MesoCrystal *createMesoCrystal(double particle_radius, complex_t n_particle, diff --git a/App/inc/TestMesoCrystal2.h b/App/inc/TestMesoCrystal2.h index 60afd97df21..0bea256ab5a 100644 --- a/App/inc/TestMesoCrystal2.h +++ b/App/inc/TestMesoCrystal2.h @@ -48,7 +48,7 @@ class TestMesoCrystal2 : public IFunctionalTest virtual ISample *buildSample() const; protected: - //! initialize pool parameters + //! Initializes pool parameters virtual void init_parameters(); private: // MesoCrystal *createMesoCrystal(double particle_radius, complex_t n_particle, const IFormFactor *p_meso_form_factor) const; diff --git a/App/inc/TestPerformance.h b/App/inc/TestPerformance.h index d47f292c03e..25a391b27cf 100644 --- a/App/inc/TestPerformance.h +++ b/App/inc/TestPerformance.h @@ -54,7 +54,7 @@ class TestPerformance : public IFunctionalTest //! save performance information on disk void write_performance(); - //! return delimeter between columns + //! Returns delimeter between columns. std::string get_delimeter() { return std::string(" | "); } std::map<std::string, std::string > m_performance_info; //!< holds system information diff --git a/App/inc/TestRoughness.h b/App/inc/TestRoughness.h index 42451511e4b..76ef67920ed 100644 --- a/App/inc/TestRoughness.h +++ b/App/inc/TestRoughness.h @@ -36,10 +36,10 @@ class TestRoughness : public IFunctionalTest //! Draw profile of rough surface for different sets of roughness parameters void DrawProfile(); - //! Calculate correlated z-coordinates of surface using matrix method. + //! Returns correlated z-coordinates of surface using matrix method. void GetProfileXZ_MatrixMethod(); - //! Calculate correlated z-coordinates of surface using fast Fourier transform method. + //! Returns correlated z-coordinates of surface using fast Fourier transform method. void GetProfileXZ_FFTMethod(); //! Some tests of FFT. diff --git a/App/src/AppOptionsDescription.cpp b/App/src/AppOptionsDescription.cpp index 48a487255f2..07a35754f50 100644 --- a/App/src/AppOptionsDescription.cpp +++ b/App/src/AppOptionsDescription.cpp @@ -21,7 +21,7 @@ namespace bpo = boost::program_options; -//! Add command line and config file options. +//! Adds command line and config file options. void AddApplicationOptions(ProgramOptions* p_options) { diff --git a/App/src/DrawHelper.cpp b/App/src/DrawHelper.cpp index f52501049f1..4a04edad57c 100644 --- a/App/src/DrawHelper.cpp +++ b/App/src/DrawHelper.cpp @@ -81,7 +81,7 @@ void DrawHelper::ExecuteMagnifier(int event, int px, int py, TObject *sel) } } -//! Set our own default style to draw things. +//! Sets our own default style to draw things. void DrawHelper::SetStyle() { diff --git a/App/src/FitSuiteObserverFactory.cpp b/App/src/FitSuiteObserverFactory.cpp index 23f1b7ec42e..327ebba521f 100644 --- a/App/src/FitSuiteObserverFactory.cpp +++ b/App/src/FitSuiteObserverFactory.cpp @@ -33,7 +33,7 @@ #include <iomanip> #include <sstream> -//! Print results of fit iteration. +//! Prints results of fit iteration. void FitSuiteObserverPrint::update(IObservable *subject) { diff --git a/App/src/IsGISAXSTools.cpp b/App/src/IsGISAXSTools.cpp index ecc8d25960c..aac5adbb733 100644 --- a/App/src/IsGISAXSTools.cpp +++ b/App/src/IsGISAXSTools.cpp @@ -114,7 +114,7 @@ void IsGISAXSTools::drawOutputDataInPad(const OutputData<double>& output, delete hist; } -//! Create TH2D from OutputData. +//! Creates TH2D from OutputData. TH2D *IsGISAXSTools::getOutputDataTH2D(const OutputData<double>& output, const std::string& histo_name) diff --git a/App/src/TestFresnelCoeff.cpp b/App/src/TestFresnelCoeff.cpp index fc5858dcbf9..e7257d62008 100644 --- a/App/src/TestFresnelCoeff.cpp +++ b/App/src/TestFresnelCoeff.cpp @@ -62,7 +62,7 @@ void TestFresnelCoeff::execute() } /* ************************************************************************* */ -//! calculate Fresnel coefficients .vs. alpha_i for several standard samples +//! Returns Fresnel coefficients .vs. alpha_i for several standard samples /* ************************************************************************* */ void TestFresnelCoeff::test_standard_samples() { @@ -225,7 +225,7 @@ void TestFresnelCoeff::draw_standard_samples() } /* ************************************************************************* */ -//! calculate Fresnel coefficients .vs. alpha_i for set of roughnesses +//! Returns Fresnel coefficients .vs. alpha_i for set of roughnesses /* ************************************************************************* */ void TestFresnelCoeff::test_roughness_set() { diff --git a/Core/Algorithms/inc/Beam.h b/Core/Algorithms/inc/Beam.h index 97d035b79a7..72adf9f7936 100644 --- a/Core/Algorithms/inc/Beam.h +++ b/Core/Algorithms/inc/Beam.h @@ -40,7 +40,7 @@ class Beam : public IParameterized void setIntensity(double intensity) { m_intensity = intensity; } protected: - //! Register some class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); private: diff --git a/Core/Algorithms/inc/ChiSquaredFrequency.h b/Core/Algorithms/inc/ChiSquaredFrequency.h index 8a56852f80c..f817140a46d 100644 --- a/Core/Algorithms/inc/ChiSquaredFrequency.h +++ b/Core/Algorithms/inc/ChiSquaredFrequency.h @@ -38,7 +38,7 @@ class ChiSquaredFrequency : public IChiSquaredModule } double getCutoff() const { return m_cutoff; } - //! return output data which contains chi^2 values + //! Returns output data which contains chi^2 values virtual OutputData<double > *createChi2DifferenceMap() const; protected: virtual void initWeights(); diff --git a/Core/Algorithms/inc/ChiSquaredModule.h b/Core/Algorithms/inc/ChiSquaredModule.h index bce496e619f..9fc61763664 100644 --- a/Core/Algorithms/inc/ChiSquaredModule.h +++ b/Core/Algorithms/inc/ChiSquaredModule.h @@ -21,7 +21,7 @@ class ChiSquaredModule : public IChiSquaredModule { public: - ChiSquaredModule(){} + ChiSquaredModule() {} ChiSquaredModule(const ChiSquaredModule &other) : IChiSquaredModule(other) {} virtual ~ChiSquaredModule() {} @@ -29,13 +29,13 @@ class ChiSquaredModule : public IChiSquaredModule virtual ChiSquaredModule *clone() const { return new ChiSquaredModule(*this); } - //! calculate chi squared volume over experimental and simulated data + //! Returns chi squared volume over experimental and simulated data. virtual double calculateChiSquared(); - //! return output data which contains chi^2 values + //! Returns output data which contains chi^2 values. virtual OutputData<double> *createChi2DifferenceMap() const; - //! return residual between data and simulation for single element + //! Returns residual between data and simulation for single element. virtual double getResidualValue(size_t index ) const; }; diff --git a/Core/Algorithms/inc/ConvolutionDetectorResolution.h b/Core/Algorithms/inc/ConvolutionDetectorResolution.h index 86935a76aa4..e3b396d579c 100644 --- a/Core/Algorithms/inc/ConvolutionDetectorResolution.h +++ b/Core/Algorithms/inc/ConvolutionDetectorResolution.h @@ -39,7 +39,7 @@ class ConvolutionDetectorResolution : public IDetectorResolution virtual void applyDetectorResolution( OutputData<double> *p_intensity_map) const; - //! add parameters from local pool to external pool and call recursion over direct children + //! Adds parameters from local pool to external pool and call recursion over direct children virtual std::string addParametersToExternalPool( std::string path, ParameterPool *external_pool, int copy_number=-1) const; diff --git a/Core/Algorithms/inc/DWBASimulation.h b/Core/Algorithms/inc/DWBASimulation.h index 23524adc78c..baae20083b7 100644 --- a/Core/Algorithms/inc/DWBASimulation.h +++ b/Core/Algorithms/inc/DWBASimulation.h @@ -31,18 +31,18 @@ class DWBASimulation : public ISimulation virtual ~DWBASimulation() { delete mp_simulation; } - //! Initialize the simulation with the parameters from simulation + //! Initializes the simulation with the parameters from simulation virtual void init(const Simulation& simulation); - //! Set thread information for masking + //! Sets thread information for masking virtual void setThreadInfo(const ThreadInfo& thread_info) { m_thread_info = thread_info; } - //! Return output data containing calculated intensity + //! Returns output data containing calculated intensity. const OutputData<double>& getDWBAIntensity() const { return m_dwba_intensity; } - //! add intensity to current dwba intensity + //! Adds intensity to current dwba intensity void addDWBAIntensity(const OutputData<double>& data_to_add) { m_dwba_intensity += data_to_add; } @@ -56,16 +56,16 @@ class DWBASimulation : public ISimulation typedef OutputDataIterator<const double, const OutputData<double> > const_iterator; - //! Return a read/write iterator that points to the first element + //! Returns read/write iterator that points to the first element iterator begin(); - //! Return a read-only iterator that points to the first element + //! Returns read-only iterator that points to the first element const_iterator begin() const; - //! Return a read/write iterator that points to the one past last element + //! Returns read/write iterator that points to the one past last element const iterator end() { return m_dwba_intensity.end(); } - //! Return a read-only iterator that points to the one past last element + //! Returns read-only iterator that points to the one past last element const const_iterator end() const { return m_dwba_intensity.end(); } protected: diff --git a/Core/Algorithms/inc/Detector.h b/Core/Algorithms/inc/Detector.h index 334158f724f..c715a983fc6 100644 --- a/Core/Algorithms/inc/Detector.h +++ b/Core/Algorithms/inc/Detector.h @@ -57,7 +57,7 @@ class Detector : public IParameterized const IDetectorResolution *getDetectorResolutionFunction() const { return mp_detector_resolution; } - //! Add parameters from local pool to external pool and call recursion over direct children. + //! Adds parameters from local pool to external pool and call recursion over direct children. virtual std::string addParametersToExternalPool( std::string path, ParameterPool *external_pool, @@ -68,13 +68,13 @@ class Detector : public IParameterized protected: - //! Register some class members for later access via parameter pool. + //! Registers some class members for later access via parameter pool. virtual void init_parameters() {} bool isCorrectAxisIndex(size_t index) const { return index<getDimension(); } - //! Check if data has a compatible format with the detector. + //! Checks if data has a compatible format with the detector. bool dataShapeMatches(const OutputData<double> *p_data) const; private: @@ -82,11 +82,11 @@ class Detector : public IParameterized //! swap function void swapContent(Detector &other); - //! initialize axis the way IsGISAXS does + //! Initializes axis the way IsGISAXS does void initializeAnglesIsgisaxs( AxisDouble *p_axis, const TSampledRange<double> &axis_range) const; - //! calculate the solid angle for the given data element + //! Returns the solid angle for the given data element double getSolidAngle(OutputData<double> *p_data, size_t index) const; SafePointerVector<IAxis> m_axes; diff --git a/Core/Algorithms/inc/IChiSquaredModule.h b/Core/Algorithms/inc/IChiSquaredModule.h index 1b8ed1ee1a4..60154ec1a78 100644 --- a/Core/Algorithms/inc/IChiSquaredModule.h +++ b/Core/Algorithms/inc/IChiSquaredModule.h @@ -32,66 +32,66 @@ class IChiSquaredModule : public ICloneable //! clone method virtual IChiSquaredModule* clone() const = 0; - //! return output data which contains chi^2 values + //! Returns output data which contains chi^2 values virtual OutputData<double>* createChi2DifferenceMap() const=0; - //! calculate chi dquared value + //! Returns chi dquared value virtual double calculateChiSquared() = 0; - //! get real data + //! Returns real data const OutputData<double>* getRealData() const { return mp_real_data; } - //! get simulated data + //! Returns simulated data const OutputData<double>* getSimulationData() const { return mp_simulation_data; } - //! set real and simulated data pair + //! Sets real and simulated data pair void setRealAndSimulatedData( const OutputData<double >& real_data, const OutputData<double >&simulation_data); - //! get squared function + //! Returns squared function const ISquaredFunction* getSquaredFunction() const { return mp_squared_function; } - //! set squared function + //! Sets squared function void setChiSquaredFunction(const ISquaredFunction& squared_function); - //! get fitting data selector + //! Returns fitting data selector virtual const IFittingDataSelector* getFittingDataSelector() const { return mp_data_selector; } - //! set fitting data selector + //! Sets fitting data selector virtual void setFittingDataSelector(const IFittingDataSelector& selector); - //! get data normalizer + //! Returns data normalizer virtual const IOutputDataNormalizer* getOutputDataNormalizer() const { return mp_data_normalizer; } virtual IOutputDataNormalizer* getOutputDataNormalizer() { return mp_data_normalizer; } - //! set data normalizer + //! Sets data normalizer virtual void setOutputDataNormalizer( const IOutputDataNormalizer& data_normalizer); - //! get data normalizer + //! Returns data normalizer virtual const IIntensityFunction* getIntensityFunction() const { return mp_intensity_function; } - //! set data normalizer + //! Sets data normalizer virtual void setIntensityFunction( const IIntensityFunction& intensity_function); - //! return last calculated chi squared value + //! Returns last calculated chi squared value. virtual double getValue() const { return m_chi2_value; } - //! set number of degree of freedom + //! Sets number of degree of freedom. void setNdegreeOfFreedom(int ndegree_of_freedom) { m_ndegree_of_freedom = ndegree_of_freedom; } - //! return residual between data and simulation for single element + //! Returns residual between data and simulation for single element. virtual double getResidualValue(size_t /* index */) const { throw NotImplementedException( "IChiSquaredModule::getResidualValue() -> Error! Not implemented."); } diff --git a/Core/Algorithms/inc/IInterferenceFunctionStrategy.h b/Core/Algorithms/inc/IInterferenceFunctionStrategy.h index 08a06cff237..cdf59d77908 100644 --- a/Core/Algorithms/inc/IInterferenceFunctionStrategy.h +++ b/Core/Algorithms/inc/IInterferenceFunctionStrategy.h @@ -36,13 +36,13 @@ class IInterferenceFunctionStrategy virtual double evaluate(const cvector_t& k_i, const Bin1DCVector& k_f_bin, double alpha_i, double alpha_f) const=0; protected: - //! calculate mean form factor, possibly including their position information + //! Returns mean form factor, possibly including their position information complex_t meanFormFactor(const cvector_t& k_i, const Bin1DCVector& k_f_bin, double alpha_i, double alpha_f, bool use_position=false) const; - //! calculate mean squared form factor + //! Returns mean squared form factor double meanSquaredFormFactor(const cvector_t& k_i, const Bin1DCVector& k_f_bin, double alpha_i, double alpha_f) const; - //! get q-vector from k_i and the bin of k_f + //! Returns q-vector from k_i and the bin of k_f cvector_t getQ(const cvector_t& k_i, const Bin1DCVector& k_f_bin) const; SafePointerVector<FormFactorInfo> m_ff_infos; //!< form factor info SafePointerVector<IInterferenceFunction> m_ifs; //!< interference functions diff --git a/Core/Algorithms/inc/IOutputDataNormalizer.h b/Core/Algorithms/inc/IOutputDataNormalizer.h index 0a9352b8599..3b8c5441ed3 100644 --- a/Core/Algorithms/inc/IOutputDataNormalizer.h +++ b/Core/Algorithms/inc/IOutputDataNormalizer.h @@ -49,7 +49,7 @@ class OutputDataNormalizer : public IOutputDataNormalizer m_max_intensity = max_intensity; } protected: - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); double m_scale; diff --git a/Core/Algorithms/inc/Instrument.h b/Core/Algorithms/inc/Instrument.h index 9e443701c05..48bdebef35f 100644 --- a/Core/Algorithms/inc/Instrument.h +++ b/Core/Algorithms/inc/Instrument.h @@ -30,54 +30,54 @@ class Instrument : public IParameterized ~Instrument() {} - //! get the beam data + //! Returns the beam data Beam getBeam() const; - //! set the beam data + //! Sets the beam data void setBeam(Beam beam); - //! set the beam wavelength and incoming angles + //! Sets the beam wavelength and incoming angles void setBeamParameters(double lambda, double alpha_i, double phi_i); - //! set the beam's intensity + //! Sets the beam's intensity void setBeamIntensity(double intensity) { m_beam.setIntensity(intensity); } - //! get the beam's intensity + //! Returns the beam's intensity double getIntensity() const { return m_beam.getIntensity(); } - //! get the detector data + //! Returns the detector data Detector getDetector() const; - //! get a detector axis + //! Returns a detector axis const IAxis &getDetectorAxis(size_t index) const; - //! get the detector's dimension + //! Returns the detector's dimension size_t getDetectorDimension() const { return m_detector.getDimension(); } - //! set detector parameters using axes of output data + //! Sets detector parameters using axes of output data void matchDetectorParameters(const OutputData<double > &output_data); - //! set detector parameters using angle ranges + //! Sets detector parameters using angle ranges void setDetectorParameters(size_t n_phi, double phi_f_min, double phi_f_max, size_t n_alpha, double alpha_f_min, double alpha_f_max, bool isgisaxs_style=false); - //! set detector parameters using parameter object + //! Sets detector parameters using parameter object void setDetectorParameters(const DetectorParameters ¶ms); - //! set detector resolution function + //! Sets detector resolution function void setDetectorResolutionFunction(IResolutionFunction2D *p_resolution_function); //! apply the detector resolution to the given intensity map void applyDetectorResolution(OutputData<double> *p_intensity_map) const; - //! add parameters from local pool to external pool and call recursion over direct children + //! Adds parameters from local pool to external pool and call recursion over direct children virtual std::string addParametersToExternalPool(std::string path, ParameterPool *external_pool, int copy_number=-1) const; //! normalize a detector image void normalize(OutputData<double> *p_intensity) const; protected: - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); Detector m_detector; diff --git a/Core/Algorithms/inc/LayerDecoratorDWBASimulation.h b/Core/Algorithms/inc/LayerDecoratorDWBASimulation.h index 372b2eb9be6..d289d8bf33b 100644 --- a/Core/Algorithms/inc/LayerDecoratorDWBASimulation.h +++ b/Core/Algorithms/inc/LayerDecoratorDWBASimulation.h @@ -30,9 +30,13 @@ class LayerDecoratorDWBASimulation : public LayerDWBASimulation LayerDecoratorDWBASimulation(const LayerDecorator *p_layer_decorator); virtual ~LayerDecoratorDWBASimulation(); - LayerDecoratorDWBASimulation *clone() const { throw NotImplementedException("LayerDecoratorDWBASimulation::clone() -> Error: not implemented."); } + LayerDecoratorDWBASimulation *clone() const + { + throw NotImplementedException("LayerDecoratorDWBASimulation::clone() -> " + "Error: not implemented."); + } - virtual void init(const Simulation &simulation); + virtual void init(const Simulation& simulation); virtual void run(); protected: @@ -41,7 +45,7 @@ class LayerDecoratorDWBASimulation : public LayerDWBASimulation private: IInterferenceFunctionStrategy *createAndInitStrategy() const; - std::vector<IFormFactor *> createDWBAFormFactors() const; + std::vector<IFormFactor*> createDWBAFormFactors() const; void calculateCoherentIntensity(const IInterferenceFunctionStrategy *p_strategy); void calculateInCoherentIntensity(); diff --git a/Core/Algorithms/inc/MultiLayerDWBASimulation.h b/Core/Algorithms/inc/MultiLayerDWBASimulation.h index 6d11a3ca948..3136180e0a6 100644 --- a/Core/Algorithms/inc/MultiLayerDWBASimulation.h +++ b/Core/Algorithms/inc/MultiLayerDWBASimulation.h @@ -40,7 +40,7 @@ class MultiLayerDWBASimulation : public DWBASimulation virtual void init(const Simulation &simulation); - //! Set thread information for masking + //! Sets thread information for masking virtual void setThreadInfo(const ThreadInfo &thread_info); virtual void run(); diff --git a/Core/Algorithms/inc/OpticalFresnel.h b/Core/Algorithms/inc/OpticalFresnel.h index 1bd49f71053..7d34d914b55 100644 --- a/Core/Algorithms/inc/OpticalFresnel.h +++ b/Core/Algorithms/inc/OpticalFresnel.h @@ -63,7 +63,7 @@ class OpticalFresnel : public ISimulation //typedef std::vector<FresnelCoeff > MultiLayerCoeff_t; // set of Fresnel coefficients for set of layers, [nlayer] typedef MultiLayerCoeff MultiLayerCoeff_t; // set of Fresnel coefficients for set of layers, [nlayer] - //! calculate Fresnel coefficients for given multi layer and kvector + //! Returns Fresnel coefficients for given multi layer and kvector void execute(const MultiLayer &sample, const kvector_t &k, MultiLayerCoeff_t &coeff); private: diff --git a/Core/Algorithms/inc/Simulation.h b/Core/Algorithms/inc/Simulation.h index 3892fa178a1..db7ceac27fc 100644 --- a/Core/Algorithms/inc/Simulation.h +++ b/Core/Algorithms/inc/Simulation.h @@ -42,51 +42,51 @@ class Simulation : public IParameterized, public ICloneable //! Run a simulation with the current parameter settings void runSimulation(); - //! Calculate intensity for a single detector element + //! Returns intensity for a single detector element void runSimulationElement(size_t index); //! Normalize the detector counts void normalize(); - //! Set the sample to be tested + //! Sets the sample to be tested void setSample(const ISample& sample); - //! Get the sample + //! Returns the sample ISample *getSample() const { return mp_sample; } - //! Set the sample builder + //! Sets the sample builder void setSampleBuilder(const ISampleBuilder *p_sample_builder); - //! Get detector intensity map for all scan parameters + //! Returns detector intensity map for all scan parameters const OutputData<double>* getOutputData() const { return &m_intensity_map; } //! Clone detector intensity map for all scan parameters. OutputData<double>* getOutputDataClone() const { return m_intensity_map.clone(); } - //! Set the instrument containing beam and detector information + //! Sets the instrument containing beam and detector information void setInstrument(const Instrument& instrument); - //! Get the instrument containing beam and detector information + //! Returns the instrument containing beam and detector information const Instrument& getInstrument() const { return m_instrument; } - //! Set beam parameters from here (forwarded to Instrument) + //! Sets beam parameters from here (forwarded to Instrument) void setBeamParameters(double lambda, double alpha_i, double phi_i); - //! Set beam intensity from here (forwarded to Instrument) + //! Sets beam intensity from here (forwarded to Instrument) void setBeamIntensity(double intensity); - //! Set detector parameters using axes of output data + //! Sets detector parameters using axes of output data void setDetectorParameters(const OutputData<double >& output_data); - //! Set detector parameters using angle ranges + //! Sets detector parameters using angle ranges void setDetectorParameters(size_t n_phi, double phi_f_min, double phi_f_max, size_t n_alpha, double alpha_f_min, double alpha_f_max, bool isgisaxs_style=false); - //! Set detector parameters using parameter object + //! Sets detector parameters using parameter object void setDetectorParameters(const DetectorParameters& params); - //! Get simulation parameters + //! Returns simulation parameters SimulationParameters getSimulationParameters() const { return m_sim_params; } @@ -94,15 +94,15 @@ class Simulation : public IParameterized, public ICloneable void setDetectorResolutionFunction( IResolutionFunction2D *p_resolution_function); - //! Set simulation parameters + //! Sets simulation parameters void setSimulationParameters(const SimulationParameters& sim_params) { m_sim_params = sim_params; } - //! Set the program options + //! Sets the program options void setProgramOptions(ProgramOptions *p_options) { mp_options = p_options; } - //! Add parameters from local to external pool, and call recursion over direct children + //! Adds parameters from local to external pool, and call recursion over direct children std::string addParametersToExternalPool( std::string path, ParameterPool *external_pool, @@ -114,7 +114,7 @@ class Simulation : public IParameterized, public ICloneable protected: Simulation(const Simulation& other); - //! Register some class members for later access via parameter pool + //! Registers some class members for later access via parameter pool void init_parameters(); //! Default implementation only adds the detector axes diff --git a/Core/Algorithms/inc/StrategyBuilder.h b/Core/Algorithms/inc/StrategyBuilder.h index 8010506be8e..6c102673d5a 100644 --- a/Core/Algorithms/inc/StrategyBuilder.h +++ b/Core/Algorithms/inc/StrategyBuilder.h @@ -39,10 +39,10 @@ class LayerDecoratorStrategyBuilder const Simulation &simulation, const SimulationParameters &sim_params); virtual ~LayerDecoratorStrategyBuilder(); - //! set R and T coefficient map for DWBA simulation + //! Sets R and T coefficient map for DWBA simulation void setReflectionTransmissionFunction(const IDoubleToPairOfComplexMap &rt_map); - //! create a strategy object which is able to calculate the scattering for fixed k_f + //! Creates a strategy object which is able to calculate the scattering for fixed k_f virtual IInterferenceFunctionStrategy *createStrategy(); protected: LayerDecorator *mp_layer_decorator; //!< decorated layer @@ -57,7 +57,7 @@ class LayerDecoratorStrategyBuilder void collectInterferenceFunctions(); //! retrieve wavelength from simulation double getWavelength(); - //! create formfactor info for single particle + //! Creates formfactor info for single particle FormFactorInfo *createFormFactorInfo(const ParticleInfo *p_particle_info, complex_t n_ambient_refractive_index, complex_t factor) const; diff --git a/Core/Algorithms/src/DiffuseDWBASimulation.cpp b/Core/Algorithms/src/DiffuseDWBASimulation.cpp index 95967d9e42d..5a023405d96 100644 --- a/Core/Algorithms/src/DiffuseDWBASimulation.cpp +++ b/Core/Algorithms/src/DiffuseDWBASimulation.cpp @@ -66,7 +66,7 @@ void DiffuseDWBASimulation::run() delete diffuse_terms[i]; } -//! Initialize vector<DiffuseFormFactorTerm*> term. +//! Initializes vector<DiffuseFormFactorTerm*> term. //! Called near beginning of this->run(). //! Collect one entry (p_diffuse_term) per particle type and layer[?]. diff --git a/Core/Fitting/inc/AttLimits.h b/Core/Fitting/inc/AttLimits.h index 7ccc6218f97..4dbec04ff49 100644 --- a/Core/Fitting/inc/AttLimits.h +++ b/Core/Fitting/inc/AttLimits.h @@ -29,18 +29,18 @@ class AttLimits //! if has lower limit virtual bool hasLowerLimit() const { return m_has_lower_limit; } - //! get lower limit + //! Returns lower limit virtual double getLowerLimit() const { return m_lower_limit; } - //! set lower limit + //! Sets lower limit virtual void setLowerLimit(double value) { m_lower_limit = value; m_has_lower_limit = true; } //! remove lower limit virtual void removeLowerLimit() { m_lower_limit = 0.0; m_has_lower_limit = false; } //! if has upper limit virtual bool hasUpperLimit() const { return m_has_upper_limit; } - //! get upper limit + //! Returns upper limit virtual double getUpperLimit() const { return m_upper_limit; } - //! set upper limit + //! Sets upper limit virtual void setUpperLimit(double value) { m_upper_limit = value; m_has_upper_limit = true; } //! remove upper limit virtual void removeUpperLimit() { m_upper_limit = 0.0; m_has_upper_limit = false; } @@ -48,12 +48,12 @@ class AttLimits //! if has lower and upper limit virtual bool hasLowerAndUpperLimits() const { return (m_has_lower_limit && m_has_upper_limit); } - //! set object fixed + //! Sets object fixed virtual void setFixed(bool is_fixed) { m_is_fixed = is_fixed; } //! if object is fixed at some value virtual bool isFixed() const { return m_is_fixed; } - //! set lower and upper limits + //! Sets lower and upper limits virtual void setLimits(double xmin, double xmax) { setLowerLimit(xmin); setUpperLimit(xmax); } //! remove limits virtual void removeLimits() { removeLowerLimit(); removeUpperLimit(); } @@ -61,22 +61,22 @@ class AttLimits // --------- // static creation methods - //! create an object bounded from the left + //! Creates an object bounded from the left static AttLimits lowerLimited(double bound_value) { return AttLimits(true, false, false, bound_value, 0.0); } - //! create an object bounded from the right + //! Creates an object bounded from the right static AttLimits upperLimited(double bound_value) { return AttLimits(false, true, false, 0.0, bound_value); } - //! create an object bounded from the left and right + //! Creates an object bounded from the left and right static AttLimits limited(double left_bound_value, double right_bound_value) { return AttLimits(true, true, false, left_bound_value, right_bound_value); } - //! create an object withoud bounds (default) + //! Creates an object withoud bounds (default) static AttLimits limitless() { return AttLimits(); } - //! create a fixed value object + //! Creates a fixed value object static AttLimits fixed() { return AttLimits(false, false, true, 0.0, 0.0); } - //! print class + //! Prints class friend std::ostream &operator<<(std::ostream &ostr, const AttLimits &m) { m.print(ostr); return ostr; } protected: @@ -93,7 +93,7 @@ class AttLimits double m_lower_limit; //! minimum allowed value double m_upper_limit; //! maximum allowed value - //! print class + //! Prints class void print(std::ostream &ostr) const { if(isFixed()) { diff --git a/Core/Fitting/inc/FitObject.h b/Core/Fitting/inc/FitObject.h index 467a222c5f8..bb956097869 100644 --- a/Core/Fitting/inc/FitObject.h +++ b/Core/Fitting/inc/FitObject.h @@ -29,40 +29,40 @@ class FitObject : public IParameterized FitObject(const Simulation &simulation, const OutputData<double > &real_data, const IChiSquaredModule &chi2_module=ChiSquaredModule(), double weight = 1.0); ~FitObject(); - //! get simulation + //! Returns simulation const Simulation *getSimulation() const { return m_simulation; } Simulation *getSimulation() { return m_simulation; } - //! set simulation + //! Sets simulation void setSimulation(const Simulation &simulation) { delete m_simulation; m_simulation = simulation.clone(); } - //! get real data + //! Returns real data const OutputData<double > *getRealData() const { return m_real_data; } - //! set real data + //! Sets real data void setRealData(const OutputData<double > &real_data); - //! get simulated data + //! Returns simulated data const OutputData<double > *getSimulationData() const { return m_simulation->getOutputData(); } - //! get chi2 module + //! Returns chi2 module const IChiSquaredModule *getChiSquaredModule() const {return m_chi2_module; } IChiSquaredModule *getChiSquaredModule() {return m_chi2_module; } - //! set chi2 module + //! Sets chi2 module void setChiSquaredModule(const IChiSquaredModule &chi2_module) { delete m_chi2_module; m_chi2_module = chi2_module.clone(); } - //! calculate chi squared value + //! Returns chi squared value double calculateChiSquared(); - //! add parameters from local pool to external pool and call recursion over direct children + //! Adds parameters from local pool to external pool and call recursion over direct children virtual std::string addParametersToExternalPool(std::string path, ParameterPool *external_pool, int copy_number=-1) const; - //! return weight of data set in chi2 calculations + //! Returns weight of data set in chi2 calculations double getWeight() const { return m_weight; } - //! return size of data + //! Returns size of data size_t getSizeOfData() const { return m_real_data->getAllocatedSize(); } protected: - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); private: diff --git a/Core/Fitting/inc/FitParameter.h b/Core/Fitting/inc/FitParameter.h index 27466e570dc..2167b6d4726 100644 --- a/Core/Fitting/inc/FitParameter.h +++ b/Core/Fitting/inc/FitParameter.h @@ -31,26 +31,26 @@ class FitParameter : public INamed, public AttLimits FitParameter(const std::string &name, double value, double step=0.0, const AttLimits &limits=AttLimits::limitless(), double error=0.0); virtual ~FitParameter(){} - //! set value of parameter + //! Sets value of parameter virtual void setValue(double value) { m_value = value;} - //! get value of parameter + //! Returns value of parameter virtual double getValue() const { return m_value;} - //! set parameter step for minimizer + //! Sets parameter step for minimizer virtual void setStep(double value) { m_step = value; } - //! get parameter step for minimizer + //! Returns parameter step for minimizer virtual double getStep() const { return m_step;} - //! set parameter error + //! Sets parameter error virtual void setError(double value) { m_error = value; } - //! get parameter step for minimizer + //! Returns parameter step for minimizer virtual double getError() const { return m_error;} - //! print class + //! Prints class friend std::ostream &operator<<(std::ostream &ostr, const FitParameter &m) { m.print(ostr); return ostr; } protected: - //! print class + //! Prints class void print(std::ostream &ostr) const; double m_value; //! parameter value diff --git a/Core/Fitting/inc/FitParameterLinked.h b/Core/Fitting/inc/FitParameterLinked.h index 5ba67c4cd5c..6f3197d1f4c 100644 --- a/Core/Fitting/inc/FitParameterLinked.h +++ b/Core/Fitting/inc/FitParameterLinked.h @@ -34,7 +34,7 @@ class FitParameterLinked : public FitParameter FitParameterLinked(const std::string &name, double value, double step, const AttLimits &attlim=AttLimits::limitless(), double error=0.0); virtual ~FitParameterLinked(){} - //! set given value for all binded parameters + //! Sets given value for all binded parameters virtual void setValue(double value) { FitParameter::setValue(value); for(pool_parameters_t::iterator it=m_pool_parameters.begin(); it!=m_pool_parameters.end(); ++it) { @@ -42,17 +42,17 @@ class FitParameterLinked : public FitParameter } } - //! add real parameter to the collection + //! Adds real parameter to the collection virtual void addParameter(ParameterPool::parameter_t par); - //! add parameters from pool which match given wildcard + //! Adds parameters from pool which match given wildcard virtual void addMatchedParametersFromPool(const ParameterPool *pool, const std::string &wildcard = std::string()); - //! print class + //! Prints class friend std::ostream &operator<<(std::ostream &ostr, const FitParameterLinked &m) { m.print(ostr); return ostr; } protected: - //! print class + //! Prints class void print(std::ostream &ostr) const; pool_parameters_t m_pool_parameters; //! collection of parameters from parameter pools diff --git a/Core/Fitting/inc/FitSuite.h b/Core/Fitting/inc/FitSuite.h index c48fc031951..4457b9c662b 100644 --- a/Core/Fitting/inc/FitSuite.h +++ b/Core/Fitting/inc/FitSuite.h @@ -39,19 +39,19 @@ class FitSuite : public IObservable //! clear all and prepare for the next fit void clear(); - //! add pair of (simulation, real data) for consecutive simulation + //! Adds pair of (simulation, real data) for consecutive simulation void addSimulationAndRealData(const Simulation &simulation, const OutputData<double > &real_data, const IChiSquaredModule &chi2_module=ChiSquaredModule()); - //! add fit parameter + //! Adds fit parameter void addFitParameter(const std::string &name, double value, double step, const AttLimits &attlim=AttLimits::limitless(), double error=0.0); void addFitParameter(const std::string &name, double value, const AttLimits &attlim=AttLimits::limitless(), double error=0.0); - //! add fit strategy + //! Adds fit strategy void addFitStrategy(IFitSuiteStrategy *strategy); - //! set minimizer + //! Sets minimizer void setMinimizer(IMinimizer *minimizer) { delete m_minimizer; m_minimizer = minimizer; } - //! get minimizer + //! Returns minimizer IMinimizer *getMinimizer() { return m_minimizer; } //! link fitting parameters to parameters defined in simulations @@ -63,25 +63,25 @@ class FitSuite : public IObservable //! run single minimization round virtual void minimize(); - //! return reference to the kit with data + //! Returns reference to the kit with data FitSuiteObjects *getFitObjects() { return &m_fit_objects; } - //! return reference to fit parameters + //! Returns reference to fit parameters FitSuiteParameters *getFitParameters() { return &m_fit_parameters; } - //! return reference to fit parameters + //! Returns reference to fit parameters FitSuiteStrategies *getFitStrategies() { return &m_fit_strategies; } //! if the last iteration is done (used by observers to print summary) bool isLastIteration() const { return m_is_last_iteration; } - //! get current number of minimization function calls + //! Returns current number of minimization function calls size_t getNCalls() const; - //! get the number of current strategy + //! Returns the number of current strategy size_t getNStrategy() const { return m_fit_strategies.getNStrategy(); } - //! print results of the screen + //! Prints results of the screen void printResults() const; AttFitting &getAttributes() { return m_fit_attributes; } @@ -92,7 +92,7 @@ class FitSuite : public IObservable FitSuite &operator=(const FitSuite &); FitSuite(const FitSuite &); - //! check if all prerequisites to run fit fit are filled + //! Checks if all prerequisites to run fit fit are filled bool check_prerequisites() const; AttFitting m_fit_attributes; //! general fit attributes @@ -103,7 +103,7 @@ class FitSuite : public IObservable FitSuiteChiSquaredFunction m_function_chi2; FitSuiteGradientFunction m_function_gradient; - bool m_is_last_iteration; //! set to true after last iteration complete + bool m_is_last_iteration; //! Sets to true after last iteration complete }; #endif // FITSUITE_H diff --git a/Core/Fitting/inc/FitSuiteObjects.h b/Core/Fitting/inc/FitSuiteObjects.h index 874268e8650..0fd230f7746 100644 --- a/Core/Fitting/inc/FitSuiteObjects.h +++ b/Core/Fitting/inc/FitSuiteObjects.h @@ -37,64 +37,64 @@ class FitSuiteObjects : public IParameterized //! clear all data void clear(); - //! return number of fit items + //! Returns number of fit items size_t size() const { return m_fit_objects.size(); } - //! add to kit pair of (simulation, real data) for consecutive simulation and chi2 module + //! Adds to kit pair of (simulation, real data) for consecutive simulation and chi2 module void add(const Simulation &simulation, const OutputData<double > &real_data, const IChiSquaredModule &chi2_module, double weight = 1.0); //! loop through all defined simulations and run them void runSimulations(); - //! get total number of data points + //! Returns total number of data points size_t getSizeOfDataSet() const; - //! get sum of chi squared values for all fit objects + //! Returns sum of chi squared values for all fit objects double getChiSquaredValue() const { return m_chi_squared_value; } - //! calculate sum of chi squared values for all fit objects + //! Returns sum of chi squared values for all fit objects double calculateChiSquaredValue(); - //! get residuals for single data element + //! Returns residuals for single data element //! @pars global_index index accross all OutputData defined double getResidualValue(size_t global_index); - //! get simulation + //! Returns simulation const Simulation *getSimulation(size_t i_item = 0) const { return m_fit_objects[check_index(i_item)]->getSimulation(); } Simulation *getSimulation(size_t i_item = 0) { return m_fit_objects[check_index(i_item)]->getSimulation(); } - //! get real data + //! Returns real data const OutputData<double> * getRealData(size_t i_item = 0) const { return m_fit_objects[check_index(i_item)]->getRealData(); } - //! set real data + //! Sets real data void setRealData(const OutputData<double > &real_data, size_t i_item = 0) { m_fit_objects[check_index(i_item)]->setRealData(real_data);} - //! get chi2 module + //! Returns chi2 module // const IChiSquaredModule *getChiSquaredModule(size_t i_item = 0) const { return m_fit_objects[check_index(i_item)]->getChiSquaredModule(); } // IChiSquaredModule *getChiSquaredModule(size_t i_item = 0) { return m_fit_objects[check_index(i_item)]->getChiSquaredModule(); } - //! get simulated data + //! Returns simulated data const OutputData<double> * getSimulationData(size_t i_item = 0) const { return m_fit_objects[check_index(i_item)]->getSimulationData(); } - //! get fit object + //! Returns fit object const FitObject *getObject(size_t i_item = 0) const { return m_fit_objects[check_index(i_item)]; } FitObject *getObject(size_t i_item = 0) { return m_fit_objects[check_index(i_item)]; } - //! add parameters from local pool to external pool and call recursion over direct children + //! Adds parameters from local pool to external pool and call recursion over direct children virtual std::string addParametersToExternalPool(std::string path, ParameterPool *external_pool, int copy_number=-1) const; - //! set simulation normalize flag + //! Sets simulation normalize flag void setSimulationNormalize(bool simulation_normalize) { m_simulation_normalize = simulation_normalize; } void setNfreeParameters(int nfree_parameters ) { m_nfree_parameters = nfree_parameters; } protected: - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); - //! calculate maximum intensity in simulated data + //! Returns maximum intensity in simulated data double getSimulationMaxIntensity(); - //! return object and calculate index of data element for given global data element index + //! Returns object and calculate index of data element for given global data element index const FitObject *getObjectForGlobalDataIndex(size_t global_index, size_t &local_index); private: @@ -102,7 +102,7 @@ class FitSuiteObjects : public IParameterized FitSuiteObjects &operator=(const FitSuiteObjects &); FitSuiteObjects(const FitSuiteObjects &); - //! check if index inside vector bounds + //! Checks if index inside vector bounds inline size_t check_index(size_t index) const { return index < m_fit_objects.size() ? index : throw OutOfBoundsException("FitSuiteKit::check() -> Index outside of range"); } FitObjects_t m_fit_objects; //! set of simulations and corresponding real data diff --git a/Core/Fitting/inc/FitSuiteParameters.h b/Core/Fitting/inc/FitSuiteParameters.h index e21715d6e7e..be6f329932c 100644 --- a/Core/Fitting/inc/FitSuiteParameters.h +++ b/Core/Fitting/inc/FitSuiteParameters.h @@ -38,29 +38,29 @@ class FitSuiteParameters //! clear all defined parameters void clear(); - //! add fit parameter + //! Adds fit parameter void addParameter(const std::string &name, double value, double step, const AttLimits &attlim, double error=0.0); - //! return fit parameter with given name + //! Returns fit parameter with given name const FitParameter *getParameter(const std::string &name) const; FitParameter *getParameter(const std::string &name); - //! set values for all defined parameters + //! Sets values for all defined parameters void setValues(const double *pars_values); void setValues(const std::vector<double > &pars_values); - //! get values of all defined parameters + //! Returns values of all defined parameters std::vector<double > getValues() const; - //! return number of parameters + //! Returns number of parameters size_t size() const { return m_parameters.size(); } void push_back(FitParameter *par) { m_parameters.push_back(par); } - //! return begin of container + //! Returns begin of container iterator begin() { return m_parameters.begin(); } const_iterator begin() const { return m_parameters.begin(); } - //! return end of container + //! Returns end of container iterator end() { return m_parameters.end(); } const_iterator end() const { return m_parameters.end(); } @@ -70,13 +70,13 @@ class FitSuiteParameters const FitParameter *operator[](std::string name) const { return getParameter(name); } FitParameter *operator[](std::string name) { return getParameter(name); } - //! linking fit parameters with pool parameters + //! Links fit parameters with pool parameters. void link_to_pool(const ParameterPool *pool); - //! return number of free parameters + //! Returns number of free parameters size_t getNfreeParameters() const; - //! return true if parameters have already given values + //! Returns true if parameters have already given values bool valuesAreDifferrent(const double *pars_valuers, double tolerance_factor=1.0) const; void printParameters() const; diff --git a/Core/Fitting/inc/IMinimizer.h b/Core/Fitting/inc/IMinimizer.h index c40881d7c61..b777c2eb8ff 100644 --- a/Core/Fitting/inc/IMinimizer.h +++ b/Core/Fitting/inc/IMinimizer.h @@ -40,43 +40,43 @@ class IMinimizer //! run minimization virtual void minimize() = 0; - //! set internal minimizer parameter + //! Sets internal minimizer parameter virtual void setParameter(size_t index, const FitParameter *par); - //! set internal minimizer parameters using external parameter list + //! Sets internal minimizer parameters using external parameter list virtual void setParameters(const FitSuiteParameters ¶meters); - //! set chi squared function to minimize + //! Sets chi squared function to minimize virtual void setChiSquaredFunction(function_chi2_t fun_chi2, size_t nparameters); - //! set gradient function to minimize + //! Sets gradient function to minimize virtual void setGradientFunction(function_gradient_t fun_gradient, size_t nparameters, size_t ndatasize); - //! get number of variables to fit + //! Returns number of variables to fit virtual size_t getNumberOfVariables() const; - //! return minimum function value + //! Returns minimum function value virtual double getMinValue() const; - //! return value of the parameter at the minimum + //! Returns value of the parameter at the minimum virtual double getValueOfVariableAtMinimum(size_t index) const; - //! return values of parameters at the minimum + //! Returns values of parameters at the minimum virtual std::vector<double > getValueOfVariablesAtMinimum() const; - //! return pointer to the parameters values at the minimum + //! Returns pointer to the parameters values at the minimum virtual double getErrorOfVariable(size_t index) const; //! clear resources (parameters) for consecutives minimizations virtual void clear(); - //! print fit results + //! Prints fit results virtual void printResults() const; - //! set minimizer option + //! Sets minimizer option virtual void setOptions(const std::string &option); - //! return number of calls of minimized function + //! Returns number of calls of minimized function virtual size_t getNCalls() const; }; diff --git a/Core/Fitting/src/FitObject.cpp b/Core/Fitting/src/FitObject.cpp index affe2ff0364..ac0084f01f2 100644 --- a/Core/Fitting/src/FitObject.cpp +++ b/Core/Fitting/src/FitObject.cpp @@ -39,7 +39,7 @@ FitObject::~FitObject() delete m_chi2_module; } -//! set real data +//! Sets real data void FitObject::setRealData(const OutputData<double > &real_data) { delete m_real_data; @@ -54,14 +54,14 @@ void FitObject::setRealData(const OutputData<double > &real_data) } } -//! calculate chi squared value +//! Returns chi squared value double FitObject::calculateChiSquared() { m_chi2_module->setRealAndSimulatedData(*m_real_data, *m_simulation->getOutputData()); return m_chi2_module->calculateChiSquared(); } -//! add parameters from local pool to external pool +//! Adds parameters from local pool to external pool std::string FitObject::addParametersToExternalPool(std::string path, ParameterPool* external_pool, int copy_number) const { diff --git a/Core/Fitting/src/FitParameterLinked.cpp b/Core/Fitting/src/FitParameterLinked.cpp index e94f6af2146..e4117cd0936 100644 --- a/Core/Fitting/src/FitParameterLinked.cpp +++ b/Core/Fitting/src/FitParameterLinked.cpp @@ -24,7 +24,7 @@ FitParameterLinked::FitParameterLinked(const std::string &name, double value, do { } -//! add real parameter to the collection +//! Adds real parameter to the collection void FitParameterLinked::addParameter(ParameterPool::parameter_t par) { if( !par.isNull() ) { @@ -34,7 +34,7 @@ void FitParameterLinked::addParameter(ParameterPool::parameter_t par) } } -//! add parameters from pool which match given wildcard +//! Adds parameters from pool which match given wildcard void FitParameterLinked::addMatchedParametersFromPool(const ParameterPool *pool, const std::string &wildcard) { std::string wildcard_to_use = getName(); diff --git a/Core/Fitting/src/FitSuite.cpp b/Core/Fitting/src/FitSuite.cpp index 2f1bce42dc1..f256460b451 100644 --- a/Core/Fitting/src/FitSuite.cpp +++ b/Core/Fitting/src/FitSuite.cpp @@ -43,26 +43,26 @@ void FitSuite::clear() m_is_last_iteration = false; } -//! add pair of (simulation, real data) for consecutive simulation +//! Adds pair of (simulation, real data) for consecutive simulation void FitSuite::addSimulationAndRealData(const Simulation &simulation, const OutputData<double > &real_data, const IChiSquaredModule &chi2_module) { m_fit_objects.add(simulation, real_data, chi2_module); } -//! add fit parameter +//! Adds fit parameter void FitSuite::addFitParameter(const std::string &name, double value, double step, const AttLimits &attlim, double error) { m_fit_parameters.addParameter(name, value, step, attlim, error); } -//! add fit parameter, step is calculated from initial parameter value +//! Adds fit parameter, step is calculated from initial parameter value void FitSuite::addFitParameter(const std::string &name, double value, const AttLimits &attlim, double error) { double step = value * getAttributes().getStepFactor(); m_fit_parameters.addParameter(name, value, step, attlim, error); } -//! add fit strategy +//! Adds fit strategy void FitSuite::addFitStrategy(IFitSuiteStrategy *strategy) { m_fit_strategies.addStrategy(strategy); diff --git a/Core/Fitting/src/FitSuiteObjects.cpp b/Core/Fitting/src/FitSuiteObjects.cpp index a0dd5ac87e5..9146206dc79 100644 --- a/Core/Fitting/src/FitSuiteObjects.cpp +++ b/Core/Fitting/src/FitSuiteObjects.cpp @@ -27,7 +27,7 @@ void FitSuiteObjects::clear() m_fit_objects.clear(); } -//! add to kit pair of (simulation, real data) for consecutive simulation and chi2 module +//! Adds to kit pair of (simulation, real data) for consecutive simulation and chi2 module void FitSuiteObjects::add(const Simulation &simulation, const OutputData<double > &real_data, const IChiSquaredModule &chi2_module, double weight) { m_total_weight += weight; @@ -44,7 +44,7 @@ void FitSuiteObjects::runSimulations() m_chi_squared_value = calculateChiSquaredValue(); } -//! get total number of data points +//! Returns total number of data points size_t FitSuiteObjects::getSizeOfDataSet() const { size_t result(0); @@ -70,7 +70,7 @@ const FitObject *FitSuiteObjects::getObjectForGlobalDataIndex(size_t global_inde throw LogicErrorException(ostr.str()); } -//! get sum of chi squared values for all fit objects +//! Returns sum of chi squared values for all fit objects double FitSuiteObjects::calculateChiSquaredValue() { double result(0); @@ -100,7 +100,7 @@ double FitSuiteObjects::getResidualValue(size_t global_index) return residual; } -//! calculate maximum intensity in simulated data over all fit objects defined +//! Returns maximum intensity in simulated data over all fit objects defined double FitSuiteObjects::getSimulationMaxIntensity() { double result(0); @@ -112,7 +112,7 @@ double FitSuiteObjects::getSimulationMaxIntensity() return result; } -//! add parameters from local pool to external pool +//! Adds parameters from local pool to external pool std::string FitSuiteObjects::addParametersToExternalPool(std::string path, ParameterPool* external_pool, int copy_number) const { diff --git a/Core/Fitting/src/FitSuiteParameters.cpp b/Core/Fitting/src/FitSuiteParameters.cpp index bc0d8671765..e1432af3eb5 100644 --- a/Core/Fitting/src/FitSuiteParameters.cpp +++ b/Core/Fitting/src/FitSuiteParameters.cpp @@ -23,7 +23,7 @@ void FitSuiteParameters::clear() m_parameters.clear(); } -//! add fit parameter +//! Adds fit parameter void FitSuiteParameters::addParameter(const std::string &name, double value, double step, const AttLimits &attlim, double error) { for(parameters_t::const_iterator it = m_parameters.begin(); it!=m_parameters.end(); ++it) { @@ -32,25 +32,17 @@ void FitSuiteParameters::addParameter(const std::string &name, double value, dou m_parameters.push_back(new FitParameterLinked(name, value, step, attlim, error) ); } -//! return const fit parameter with given name -const FitParameter *FitSuiteParameters::getParameter(const std::string &name) const -{ - for(parameters_t::const_iterator it = m_parameters.begin(); it!=m_parameters.end(); ++it) { - if( (*it)->getName() == name ) return (*it); - } - throw LogicErrorException("FitSuiteParameters::getFitParameter() -> Error. No parameter with name '"+name+"'"); -} - -//! return fit parameter with given name +//! Returns fit parameter with given name. FitParameter *FitSuiteParameters::getParameter(const std::string &name) { for(parameters_t::iterator it = m_parameters.begin(); it!=m_parameters.end(); ++it) { if( (*it)->getName() == name ) return (*it); } - throw LogicErrorException("FitSuiteParameters::getFitParameter() -> Error. No parameter with name '"+name+"'"); + throw LogicErrorException("FitSuiteParameters::getFitParameter() -> " + "Error. No parameter with name '"+name+"'"); } -//! set values for all defined parameters +//! Sets values for all defined parameters void FitSuiteParameters::setValues(const double *pars_values) { if( !valuesAreDifferrent(pars_values) ) { diff --git a/Core/Fitting/src/MinimizerTest.cpp b/Core/Fitting/src/MinimizerTest.cpp index dc24fdcba70..2bb3ab0f031 100644 --- a/Core/Fitting/src/MinimizerTest.cpp +++ b/Core/Fitting/src/MinimizerTest.cpp @@ -21,13 +21,13 @@ void MinimizerTest::minimize() m_min_value = m_fcn(&m_parameters.getValues()[0]); } -//! return pointer to the parameters values at the minimum +//! Returns pointer to the parameters values at the minimum double MinimizerTest::getValueOfVariableAtMinimum(size_t index) const { return m_parameters[index]->getValue(); } -//! return value of the parameter at the minimum +//! Returns value of the parameter at the minimum std::vector<double > MinimizerTest::getValueOfVariablesAtMinimum() const { return m_parameters.getValues(); diff --git a/Core/FormFactors/inc/FormFactorBox.h b/Core/FormFactors/inc/FormFactorBox.h index 29f20522e3d..770abe23bd9 100644 --- a/Core/FormFactors/inc/FormFactorBox.h +++ b/Core/FormFactors/inc/FormFactorBox.h @@ -34,10 +34,10 @@ class FormFactorBox : public IFormFactorBorn int getNumberOfStochasticParameters() const { return 2; } - //! return radius of Box + //! Returns radius of Box double getRadius() const { return m_radius; } - //! return width of Box + //! Returns width of Box double getwidth() const { return m_width; } complex_t evaluate_for_q(const cvector_t &q) const; diff --git a/Core/FormFactors/inc/FormFactorDecoratorDebyeWaller.h b/Core/FormFactors/inc/FormFactorDecoratorDebyeWaller.h index f7754e10e64..282dbdc9310 100644 --- a/Core/FormFactors/inc/FormFactorDecoratorDebyeWaller.h +++ b/Core/FormFactors/inc/FormFactorDecoratorDebyeWaller.h @@ -80,7 +80,7 @@ class FormFactorDecoratorDebyeWaller : public IFormFactorDecorator { return mp_form_factor->getNumberOfStochasticParameters(); } protected: - //! register some class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters() { getParameterPool()->clear(); getParameterPool()->registerParameter("hfactor", &m_h_dw_factor); diff --git a/Core/FormFactors/inc/FormFactorEllipsoid.h b/Core/FormFactors/inc/FormFactorEllipsoid.h index 8cdfd8004e4..cf66904a496 100644 --- a/Core/FormFactors/inc/FormFactorEllipsoid.h +++ b/Core/FormFactors/inc/FormFactorEllipsoid.h @@ -31,10 +31,10 @@ class FormFactorEllipsoid : public IFormFactorBorn virtual int getNumberOfStochasticParameters() const { return 2; } - //! return radius of Ellipsoid + //! Returns radius of Ellipsoid double getRadius() const { return m_radius; } - //! return width of Ellipsoid + //! Returns width of Ellipsoid double getWidth() const { return m_width; } virtual double getVolume() const { @@ -46,7 +46,7 @@ class FormFactorEllipsoid : public IFormFactorBorn virtual complex_t evaluate_for_q(const cvector_t &q) const; protected: - //! register some class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); private: diff --git a/Core/FormFactors/inc/FormFactorFullSphere.h b/Core/FormFactors/inc/FormFactorFullSphere.h index 053ca2894a5..7c87b09bf33 100644 --- a/Core/FormFactors/inc/FormFactorFullSphere.h +++ b/Core/FormFactors/inc/FormFactorFullSphere.h @@ -30,10 +30,10 @@ class FormFactorFullSphere : public IFormFactorBorn virtual int getNumberOfStochasticParameters() const { return 1; } - //! return radius of sphere + //! Returns radius of sphere virtual double getRadius() const { return m_radius; } - //! return diameter of sphere + //! Returns diameter of sphere virtual double getHeight() const { return 2.0*m_radius; } virtual complex_t evaluate_for_q(const cvector_t &q) const; diff --git a/Core/FormFactors/inc/FormFactorGauss.h b/Core/FormFactors/inc/FormFactorGauss.h index e52c14164f0..248efca90e0 100644 --- a/Core/FormFactors/inc/FormFactorGauss.h +++ b/Core/FormFactors/inc/FormFactorGauss.h @@ -34,7 +34,7 @@ class FormFactorGauss : public IFormFactorBorn virtual complex_t evaluate_for_q(const cvector_t &q) const; protected: - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); private: diff --git a/Core/FormFactors/inc/FormFactorLorentz.h b/Core/FormFactors/inc/FormFactorLorentz.h index b89f9fe1c70..f62b7cabd8d 100644 --- a/Core/FormFactors/inc/FormFactorLorentz.h +++ b/Core/FormFactors/inc/FormFactorLorentz.h @@ -34,7 +34,7 @@ class FormFactorLorentz : public IFormFactorBorn virtual complex_t evaluate_for_q(const cvector_t &q) const; protected: - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); private: diff --git a/Core/FormFactors/inc/FormFactorParallelepiped.h b/Core/FormFactors/inc/FormFactorParallelepiped.h index b5b237d5156..eb677aabf96 100644 --- a/Core/FormFactors/inc/FormFactorParallelepiped.h +++ b/Core/FormFactors/inc/FormFactorParallelepiped.h @@ -30,7 +30,7 @@ class FormFactorParallelepiped : public IFormFactorBorn virtual int getNumberOfStochasticParameters() const { return 2; } - //! return radius of parallelepiped + //! Returns radius of parallelepiped double getRadius() const { return m_radius; } virtual double getVolume() const diff --git a/Core/FormFactors/inc/IFormFactor.h b/Core/FormFactors/inc/IFormFactor.h index b3995525e13..e3709964099 100644 --- a/Core/FormFactors/inc/IFormFactor.h +++ b/Core/FormFactors/inc/IFormFactor.h @@ -36,7 +36,7 @@ class IFormFactor : public ISample (void)refractive_index; // to prevent unused-variable warning } - //! calculate scattering amplitude for complex wavevector bin + //! Returns scattering amplitude for complex wavevector bin //! @param k_i incoming wavevector //! @param k_f_bin outgoing wavevector bin //! @param alpha_i incident angle wrt scattering surface @@ -45,16 +45,16 @@ class IFormFactor : public ISample const cvector_t &k_i, const Bin1DCVector &k_f_bin, double alpha_i, double alpha_f) const=0; - //! return number of variable/stochastic parameters + //! Returns number of variable/stochastic parameters virtual int getNumberOfStochasticParameters() const { return 0; } - //! get the total volume of the particle to which this formfactor belongs + //! Returns the total volume of the particle to which this formfactor belongs virtual double getVolume() const; - //! get the total height of the particle to which this formfactor belongs + //! Returns the total height of the particle to which this formfactor belongs virtual double getHeight() const; - //! get the total radial size of the particle to which this formfactor belongs + //! Returns the total radial size of the particle to which this formfactor belongs virtual double getRadius() const; //! find out if the formfactor is constructed as an average over multiple simple ones diff --git a/Core/FormFactors/inc/IFormFactorBorn.h b/Core/FormFactors/inc/IFormFactorBorn.h index f36d7c2d3a5..b59045f2cd4 100644 --- a/Core/FormFactors/inc/IFormFactorBorn.h +++ b/Core/FormFactors/inc/IFormFactorBorn.h @@ -35,7 +35,7 @@ class IFormFactorBorn : public IFormFactor //! @param q wavevector transfer \f$q\equiv k_i-k_f\f$ virtual complex_t evaluate_for_q(const cvector_t &q) const=0; - //! Get volume. + //! Returns volume. //! Default implementation: formfactor at q=0. //! Overload this for more efficient implementation @@ -47,10 +47,10 @@ class IFormFactorBorn : public IFormFactor } protected: - //! calculate radial part of scattering amplitude for large bins + //! Returns radial part of scattering amplitude for large bins double bigRadialPart(const Bin1DCVector& q_bin) const; - //! calculate z-part of scattering amplitude for large bins + //! Returns z-part of scattering amplitude for large bins complex_t bigZPart(const Bin1DCVector& q_bin) const; private: diff --git a/Core/FormFactors/src/FormFactorCylinder.cpp b/Core/FormFactors/src/FormFactorCylinder.cpp index f735917c4a4..e7a14ddac1e 100644 --- a/Core/FormFactors/src/FormFactorCylinder.cpp +++ b/Core/FormFactors/src/FormFactorCylinder.cpp @@ -27,7 +27,7 @@ FormFactorCylinder::FormFactorCylinder(double height, double radius) init_parameters(); } -//! register some class members for later access via parameter pool +//! Registers some class members for later access via parameter pool void FormFactorCylinder::init_parameters() { diff --git a/Core/FormFactors/src/FormFactorGauss.cpp b/Core/FormFactors/src/FormFactorGauss.cpp index 08f769fb8da..5547be57823 100644 --- a/Core/FormFactors/src/FormFactorGauss.cpp +++ b/Core/FormFactors/src/FormFactorGauss.cpp @@ -36,7 +36,7 @@ FormFactorGauss::FormFactorGauss(double height, double width) init_parameters(); } -//! initialize pool parameters, i.e. register some of class members for later access via parameter pool +//! Registers some class members for later access via parameter pool void FormFactorGauss::init_parameters() { diff --git a/Core/FormFactors/src/FormFactorHemiSpheroid.cpp b/Core/FormFactors/src/FormFactorHemiSpheroid.cpp index e7543931e74..05f4d349838 100644 --- a/Core/FormFactors/src/FormFactorHemiSpheroid.cpp +++ b/Core/FormFactors/src/FormFactorHemiSpheroid.cpp @@ -32,7 +32,7 @@ FormFactorHemiSpheroid::FormFactorHemiSpheroid( init_parameters(); } -//! Register some class members for later access via parameter pool. +//! Registers some class members for later access via parameter pool. void FormFactorHemiSpheroid::init_parameters() { diff --git a/Core/Geometry/inc/BasicVector3D.h b/Core/Geometry/inc/BasicVector3D.h index f5ea6790263..d55d2431feb 100644 --- a/Core/Geometry/inc/BasicVector3D.h +++ b/Core/Geometry/inc/BasicVector3D.h @@ -89,31 +89,31 @@ template<class T> class BasicVector3D { // Subscripting // ------------ - //! Return components by index. + //! Returns components by index. inline T operator[](int i) const { return v_[i]; } - //! Set components by index. + //! Sets components by index. inline T& operator[](int i) { return v_[i]; } // ------------------------------------ // Cartesian coordinate system: x, y, z // ------------------------------------ - //! Return x-component in cartesian coordinate system. + //! Returns x-component in cartesian coordinate system. inline T x() const { return v_[0]; } - //! Return y-component in cartesian coordinate system. + //! Returns y-component in cartesian coordinate system. inline T y() const { return v_[1]; } - //! Return z-component in cartesian coordinate system. + //! Returns z-component in cartesian coordinate system. inline T z() const { return v_[2]; } - //! Set x-component in cartesian coordinate system. + //! Sets x-component in cartesian coordinate system. inline void setX(const T&a) { v_[0] = a; } - //! Set y-component in cartesian coordinate system. + //! Sets y-component in cartesian coordinate system. inline void setY(const T&a) { v_[1] = a; } - //! Set z-component in cartesian coordinate system. + //! Sets z-component in cartesian coordinate system. inline void setZ(const T&a) { v_[2] = a; } - //! Set components in cartesian coordinate system. + //! Sets components in cartesian coordinate system. inline void setXYZ(const T&x1, const T&y1, const T&z1) { v_[0] = x1; v_[1] = y1; v_[2] = z1; } @@ -121,29 +121,29 @@ template<class T> class BasicVector3D { // Norm // ---- - //! Return squared magnitude squared of the vector. + //! Returns squared magnitude squared of the vector. T mag2() const; //!< @TODO: return type always double - //! Return magnitude of the vector. + //! Returns magnitude of the vector. T mag() const; //!< @TODO: return type always double // -------------------------------------------- // Cylindrical and spherical coordinate systems // -------------------------------------------- - //! Return squared distance from z axis. + //! Returns squared distance from z axis. T magxy2() const; //!< @TODO: return type always double - //! Return distance from z axis. + //! Returns distance from z axis. T magxy() const; //!< @TODO: return type always double - //! Return azimuth angle. + //! Returns azimuth angle. double phi() const; - //! Return polar angle. + //! Returns polar angle. double theta() const; - //! Return cosine of polar angle. + //! Returns cosine of polar angle. T cosTheta() const; //!< @TODO: return type always double //! Scale to given magnitude. @@ -166,14 +166,14 @@ template<class T> class BasicVector3D { x()*v.y() - y()*v.x() ); } - //! Return square of transverse component with respect to given axis. + //! Returns square of transverse component with respect to given axis. double perp2(const BasicVector3D<T>& v) const; - //! Return transverse component with respect to given axis. + //! Returns transverse component with respect to given axis. inline T perp(const BasicVector3D<T>& v) const { return std::sqrt(perp2(v)); } - //! Return angle with respect to another vector. + //! Returns angle with respect to another vector. T angle(const BasicVector3D<T>& v) const; // --------- @@ -193,7 +193,7 @@ template<class T> class BasicVector3D { // Related vectors // --------------- - //! Return unit vector in direction of this (or null vector). + //! Returns unit vector in direction of this (or null vector). inline BasicVector3D<T> unit() const { T len = mag(); return (len > 0.0) ? @@ -201,7 +201,7 @@ template<class T> class BasicVector3D { BasicVector3D<T>(); } - //! Return somewhat arbitrarily chosen orthogonal vector. + //! Returns somewhat arbitrarily chosen orthogonal vector. BasicVector3D<T> orthogonal() const { T dx = x() < 0.0 ? -x() : x(); T dy = y() < 0.0 ? -y() : y(); @@ -221,7 +221,7 @@ template<class T> class BasicVector3D { // Specifically for grazing-incidence scattering // --------------------------------------------- - //! Set wave vector for given wavelength and angles/ + //! Sets wave vector for given wavelength and angles/ inline void setLambdaAlphaPhi( const T&_lambda, const T&_alpha, const T&_phi) { diff --git a/Core/Geometry/inc/Transform3D.h b/Core/Geometry/inc/Transform3D.h index 243dc91984c..6b7fc2ab272 100644 --- a/Core/Geometry/inc/Transform3D.h +++ b/Core/Geometry/inc/Transform3D.h @@ -148,23 +148,23 @@ class Transform3D { //! Fortran-style subscripting: returns (i,j) element of the matrix. double operator () (int, int) const; - //! Gets xx-element of the transformation matrix. + //! Returns xx-element of the transformation matrix. double xx() const { return xx_; } - //! Gets xy-element of the transformation matrix. + //! Returns xy-element of the transformation matrix. double xy() const { return xy_; } - //! Gets xz-element of the transformation matrix. + //! Returns xz-element of the transformation matrix. double xz() const { return xz_; } - //! Gets yx-element of the transformation matrix. + //! Returns yx-element of the transformation matrix. double yx() const { return yx_; } - //! Gets yy-element of the transformation matrix. + //! Returns yy-element of the transformation matrix. double yy() const { return yy_; } - //! Gets yz-element of the transformation matrix. + //! Returns yz-element of the transformation matrix. double yz() const { return yz_; } - //! Gets zx-element of the transformation matrix. + //! Returns zx-element of the transformation matrix. double zx() const { return zx_; } - //! Gets zy-element of the transformation matrix. + //! Returns zy-element of the transformation matrix. double zy() const { return zy_; } - //! Gets zz-element of the transformation matrix. + //! Returns zz-element of the transformation matrix. double zz() const { return zz_; } //! Assignment. diff --git a/Core/Geometry/src/BasicVector3D.cpp b/Core/Geometry/src/BasicVector3D.cpp index 647b6deb669..8e11453dcad 100644 --- a/Core/Geometry/src/BasicVector3D.cpp +++ b/Core/Geometry/src/BasicVector3D.cpp @@ -37,7 +37,7 @@ namespace Geometry { // Norm // ----------------------------------------------------------------------------- -//! Return squared magnitude of the vector. +//! Returns squared magnitude of the vector. template<> double BasicVector3D<double>::mag2() const { @@ -51,7 +51,7 @@ complex_t BasicVector3D<complex_t>::mag2() const return x()*x()+y()*y()+z()*z(); } -//! Return magnitude of the vector. +//! Returns magnitude of the vector. template<> double BasicVector3D<double>::mag() const { @@ -69,7 +69,7 @@ complex_t BasicVector3D<complex_t>::mag() const // Cylindrical and spherical coordinate systems // ----------------------------------------------------------------------------- -//! Return squared distance from z axis. +//! Returns squared distance from z axis. template<> double BasicVector3D<double>::magxy2() const { @@ -83,7 +83,7 @@ complex_t BasicVector3D<complex_t>::magxy2() const return x()*x()+y()*y(); } -//! Return distance from z axis. +//! Returns distance from z axis. template<> double BasicVector3D<double>::magxy() const { @@ -97,14 +97,14 @@ complex_t BasicVector3D<complex_t>::magxy() const return std::sqrt(magxy2()); } -//! Return azimuth angle. +//! Returns azimuth angle. template<> double BasicVector3D<double>::phi() const { return x() == 0.0&& y() == 0.0 ? 0.0 : std::atan2(y(),x()); } -//! Return polar angle. +//! Returns polar angle. template<> double BasicVector3D<double>::theta() const { @@ -112,7 +112,7 @@ double BasicVector3D<double>::theta() const 0.0 : std::atan2(magxy(),z()); } -//! Return cosine of polar angle. +//! Returns cosine of polar angle. template<> double BasicVector3D<double>::cosTheta() const { @@ -153,7 +153,7 @@ BasicVector3D<complex_t> BasicVector3D<complex_t>::cross( x()*v.y()-v.x()*y()); } -//! Return square of transverse component with respect to given axis. +//! Returns square of transverse component with respect to given axis. template<> double BasicVector3D<double>::perp2(const BasicVector3D<double>& v) const { @@ -161,7 +161,7 @@ double BasicVector3D<double>::perp2(const BasicVector3D<double>& v) const return tot > 0.0 ? mag2()-s*s/tot : mag2(); } -//! Return angle with respect to another vector. +//! Returns angle with respect to another vector. template<> double BasicVector3D<double>::angle(const BasicVector3D<double>& v) const { diff --git a/Core/PythonAPI/inc/PythonOutputData.h b/Core/PythonAPI/inc/PythonOutputData.h index ac7ad2c3cdc..a3673e7b384 100644 --- a/Core/PythonAPI/inc/PythonOutputData.h +++ b/Core/PythonAPI/inc/PythonOutputData.h @@ -22,14 +22,13 @@ #include <string> -//! return number of dimensions in output data of simulation +//! Returns number of dimensions in output data of simulation. int GetOutputDataNdimensions(const Simulation &simulation); -//! export output data array of simulation to python-numpy array object +//! Exports output data array of simulation to python-numpy array object. PyObject *GetOutputData(const Simulation &simulation); -//! return one dimensional python-numpy array representing binning of the axis -//! with given index of simulation output data +//! Returns one dimensional python-numpy array representing binning of the axis with given index of simulation output data PyObject *GetOutputDataAxis(const Simulation &simulation, int naxis); #endif // PYTHONOUTPUTDATA_H diff --git a/Core/PythonAPI/src/PythonOutputData.cpp b/Core/PythonAPI/src/PythonOutputData.cpp index d83f6eae850..228922a34c4 100644 --- a/Core/PythonAPI/src/PythonOutputData.cpp +++ b/Core/PythonAPI/src/PythonOutputData.cpp @@ -33,7 +33,7 @@ PyObject *ExportOutputData(const OutputData<double > &output); // export axis of output data array as python-numpy array object PyObject *ExportOutputDataAxis(const OutputData<double > &output, int naxis); -//! return number of dimensions in output data of simulation +//! Returns number of dimensions in output data of simulation int GetOutputDataNdimensions(const Simulation &simulation) { @@ -51,7 +51,7 @@ PyObject *GetOutputData(const Simulation &simulation) return obj; } -//! return one-dim numpy array representing binning of the axis with given index of simulation's output data +//! Returns one-dim numpy array representing binning of the axis with given index of simulation's output data PyObject *GetOutputDataAxis(const Simulation &simulation, int naxis) { @@ -100,7 +100,7 @@ PyObject *ExportOutputData(const OutputData<double > &output_data) return pyarray; } -//! return one dimensional python-numpy array representing binning of given axis of oputput data object +//! Returns one dimensional python-numpy array representing binning of given axis of oputput data object PyObject *ExportOutputDataAxis(const OutputData<double > &output_data, int naxis) { diff --git a/Core/Samples/inc/DiffuseParticleInfo.h b/Core/Samples/inc/DiffuseParticleInfo.h index 9d95e236a74..957ae3c8a23 100644 --- a/Core/Samples/inc/DiffuseParticleInfo.h +++ b/Core/Samples/inc/DiffuseParticleInfo.h @@ -34,10 +34,10 @@ class DiffuseParticleInfo: public ParticleInfo //! scale number of particles per containing mesocrystal void scaleNumberPerMeso(double factor) { m_number_per_meso *= factor; } - //! set number of particles per containing mesocrystal + //! Sets number of particles per containing mesocrystal void setNumberPerMeso(double n) { m_number_per_meso = n; } - //! get number of particles per containing mesocrystal + //! Returns number of particles per containing mesocrystal double getNumberPerMeso() const { return m_number_per_meso; } DiffuseParticleInfo *clone() const @@ -45,10 +45,10 @@ class DiffuseParticleInfo: public ParticleInfo "DiffuseParticleInfo::clone() -> Error: not implemented"); } - //! set the range of height + //! Sets the range of height void setHeightRange(double height_range) { m_height_range = height_range; } - //! get the range of height + //! Returns the range of height double getHeightRange() const { return m_height_range; } protected: double m_number_per_meso; diff --git a/Core/Samples/inc/HomogeneousMaterial.h b/Core/Samples/inc/HomogeneousMaterial.h index dd315acc1d2..52b1a5debc0 100644 --- a/Core/Samples/inc/HomogeneousMaterial.h +++ b/Core/Samples/inc/HomogeneousMaterial.h @@ -41,15 +41,15 @@ class HomogeneousMaterial : public IMaterial : IMaterial(other), m_refractive_index(other.m_refractive_index) {} virtual ~HomogeneousMaterial() {} - //! Return refractive index. + //! Returns refractive index. complex_t getRefractiveIndex() const { return m_refractive_index; } - //! Set refractive index. + //! Sets refractive index. void setRefractiveIndex(complex_t refractive_index) { m_refractive_index = refractive_index; } protected: - //! Dump contents to stream. + //! Dumps contents to stream. virtual void print(std::ostream &ostr) const { ostr << " " << getName() << " " << this << diff --git a/Core/Samples/inc/ICompositeIterator.h b/Core/Samples/inc/ICompositeIterator.h index ec88a60f192..7eee1b87959 100644 --- a/Core/Samples/inc/ICompositeIterator.h +++ b/Core/Samples/inc/ICompositeIterator.h @@ -80,7 +80,7 @@ class MementoIterator std::stack<MementoState > m_state_stack; }; -//! Walk through ISample tree of objects inside ICompositeSample object. +//! Walks through ISample tree of objects inside ICompositeSample object. //! Usage example: //! ICompositeIterator it = sample->createIterator(); diff --git a/Core/Samples/inc/ICompositeSample.h b/Core/Samples/inc/ICompositeSample.h index f9a72259265..f2c3c0d9c0e 100644 --- a/Core/Samples/inc/ICompositeSample.h +++ b/Core/Samples/inc/ICompositeSample.h @@ -40,7 +40,7 @@ class ICompositeSample : public ISample virtual ICompositeSample *getCompositeSample() { return this; } virtual const ICompositeSample *getCompositeSample() const { return this; } - //! register child in the container + //! Registers child in the container virtual void registerChild(ISample *sample); //! remove registered child from the container @@ -55,13 +55,13 @@ class ICompositeSample : public ISample //! size of children virtual size_t size() const { return m_samples.size(); } - //! create general iterator to walk through the tree of registered composite children + //! Creates general iterator to walk through the tree of registered composite children ICompositeIterator createIterator(); private: // ICompositeSample &operator=(const ICompositeSample &other); - //! check index of child + //! Checks index of child //inline size_t check_index(size_t index) const { return index < m_samples.size() ? index : throw OutOfBoundsException("ICompositeSample::check_index() -> Error! Index is out of bounds"); } samples_t m_samples; //! list of registered children diff --git a/Core/Samples/inc/IDecoration.h b/Core/Samples/inc/IDecoration.h index 21a7489a1d0..56499d81db7 100644 --- a/Core/Samples/inc/IDecoration.h +++ b/Core/Samples/inc/IDecoration.h @@ -34,27 +34,27 @@ class IDecoration : public ICompositeSample virtual IDecoration *clone() const=0; - //! Get number of particles + //! Returns number of particles virtual size_t getNumberOfParticles() const=0; - //! get information about particle with index + //! Returns information about particle with index virtual const ParticleInfo *getParticleInfo(size_t index) const=0; /// Get abundance fraction of particle with index virtual double getAbundanceFractionOfParticle(size_t index) const=0; - //! get number of interference functions + //! Returns number of interference functions virtual size_t getNumberOfInterferenceFunctions() const { return 0; } - //! get interference functions + //! Returns interference functions virtual SafePointerVector<IInterferenceFunction> getInterferenceFunctions() const=0; - //! get surface density of all particles + //! Returns surface density of all particles double getTotalParticleSurfaceDensity() const { return m_total_particle_surface_density; } - //! set surface density of all particles + //! Sets surface density of all particles void setTotalParticleSurfaceDensity(double surface_density) { m_total_particle_surface_density = surface_density; } diff --git a/Core/Samples/inc/ISample.h b/Core/Samples/inc/ISample.h index 583f88714c0..c5cc62c4fa4 100644 --- a/Core/Samples/inc/ISample.h +++ b/Core/Samples/inc/ISample.h @@ -30,22 +30,22 @@ class ISample : public IParameterized, public ICloneable ISample() { } virtual ~ISample() { } - //! return pointer to "this", if it is composite sample (to overload) + //! Returns pointer to "this", if it is composite sample (to overload). virtual ICompositeSample *getCompositeSample() { return 0; } virtual const ICompositeSample *getCompositeSample() const { return 0; } virtual ISample *clone() const; - //! check if this sample (or one of its subsamples) contains elements requiring DWBA corrections and return an ISimulation to calculate this + //! Checks if this sample (or one of its subsamples) contains elements requiring DWBA corrections and return an ISimulation to calculate this virtual DWBASimulation *createDWBASimulation() const { return 0; } friend std::ostream &operator<<(std::ostream &ostr, const ISample &m) { m.print(ostr); return ostr; } - //! walk through composite sample and print content + //! Walks through composite sample and print content virtual void print_structure(); - //! add parameters from local pool to external pool and call recursion over direct children + //! Adds parameters from local pool to external pool and call recursion over direct children virtual std::string addParametersToExternalPool( std::string path, ParameterPool *external_pool, diff --git a/Core/Samples/inc/InterferenceFunction1DParaCrystal.h b/Core/Samples/inc/InterferenceFunction1DParaCrystal.h index be15bdd713d..714c79d27e6 100644 --- a/Core/Samples/inc/InterferenceFunction1DParaCrystal.h +++ b/Core/Samples/inc/InterferenceFunction1DParaCrystal.h @@ -41,7 +41,7 @@ class InterferenceFunction1DParaCrystal : public IInterferenceFunction bool m_use_corr_length; double m_kappa; private: - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); }; diff --git a/Core/Samples/inc/InterferenceFunction2DLattice.h b/Core/Samples/inc/InterferenceFunction2DLattice.h index 0290d78641a..31836850d67 100644 --- a/Core/Samples/inc/InterferenceFunction2DLattice.h +++ b/Core/Samples/inc/InterferenceFunction2DLattice.h @@ -38,14 +38,14 @@ class InterferenceFunction2DLattice : public IInterferenceFunction virtual double evaluate(const cvector_t &q) const; protected: - //! get interference from a single reciprocal lattice vector + //! Returns interference from a single reciprocal lattice vector double interferenceAtOneRecLatticePoint(double qx, double qy) const; - //! calculate reciprocal coordinates in the principal axis system + //! Returns reciprocal coordinates in the principal axis system void transformToPrincipalAxes(double qx, double qy, double gamma, double delta, double &q_pa_1, double &q_pa_2) const; - //! calculate qx,qy coordinates of q - qint, where qint is a reciprocal lattice vector + //! Returns qx,qy coordinates of q - qint, where qint is a reciprocal lattice vector //! bounding the reciprocal unit cell to which q belongs void calculateReciprocalVectorFraction(double qx, double qy, double &qx_frac, double &qy_frac) const; @@ -54,13 +54,13 @@ class InterferenceFunction2DLattice : public IInterferenceFunction IFTDistribution2D *mp_pdf; static const int nmax = 20; //!< maximum value for qx*Lambdax and qy*lambday private: - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); - //! initialize the x,y coordinates of the a*,b* reciprocal bases + //! Initializes the x,y coordinates of the a*,b* reciprocal bases void initialize_rec_vectors(); - //! initialize factors needed in each calculation + //! Initializes factors needed in each calculation void initialize_calc_factors(); double m_asx, m_asy; //!< x,y coordinates of a* diff --git a/Core/Samples/inc/InterferenceFunction2DParaCrystal.h b/Core/Samples/inc/InterferenceFunction2DParaCrystal.h index dd87a865975..71bfe278b67 100644 --- a/Core/Samples/inc/InterferenceFunction2DParaCrystal.h +++ b/Core/Samples/inc/InterferenceFunction2DParaCrystal.h @@ -49,10 +49,10 @@ class InterferenceFunction2DParaCrystal : public IInterferenceFunction virtual double evaluate(const cvector_t &q) const; - //! add parameters from local pool to external pool and call recursion over direct children + //! Adds parameters from local pool to external pool and call recursion over direct children virtual std::string addParametersToExternalPool(std::string path, ParameterPool *external_pool, int copy_number=-1) const; protected: - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); void transformToPrincipalAxes(double qx, double qy, double gamma, double delta, double &q_pa_1, double &q_pa_2) const; @@ -66,10 +66,10 @@ class InterferenceFunction2DParaCrystal : public IInterferenceFunction double m_domain_sizes[2]; private: - //! Calculate interference function for fixed rotation xi + //! Returns interference function for fixed rotation xi double interferenceForXi(double xi, void *params) const; - //! calculate interference function for fixed xi in 1d + //! Returns interference function for fixed xi in 1d double interference1D(double qx, double qy, double xi, size_t index) const; complex_t FTPDF(double qx, double qy, double xi, size_t index) const; diff --git a/Core/Samples/inc/Lattice.h b/Core/Samples/inc/Lattice.h index 7fe920e4a7e..1cd65bad955 100644 --- a/Core/Samples/inc/Lattice.h +++ b/Core/Samples/inc/Lattice.h @@ -33,46 +33,46 @@ class Lattice Lattice(const Lattice &lattice); ~Lattice(); - //! initialize cached data + //! Initializes cached data void initialize() const; - //! get basis vector a + //! Returns basis vector a kvector_t getBasisVectorA() const { return m_a1; } - //! get basis vector b + //! Returns basis vector b kvector_t getBasisVectorB() const { return m_a2; } - //! get basis vector c + //! Returns basis vector c kvector_t getBasisVectorC() const { return m_a3; } - //! get the volume of the unit cell + //! Returns the volume of the unit cell double getVolume() const; - //! get the reciprocal basis vectors + //! Returns the reciprocal basis vectors void getReciprocalLatticeBasis(kvector_t &b1, kvector_t &b2, kvector_t &b3) const; - //! get the nearest lattice point from a given vector + //! Returns the nearest lattice point from a given vector IndexVector3D getNearestLatticeVectorCoordinates(const kvector_t &vector_in) const; - //! get the nearest reciprocal lattice point from a given vector + //! Returns the nearest reciprocal lattice point from a given vector IndexVector3D getNearestReciprocalLatticeVectorCoordinates(const kvector_t &vector_in) const; - //! get a list of lattice vectors within a specified distance of a given vector + //! Returns a list of lattice vectors within a specified distance of a given vector // std::vector<kvector_t> getLatticeVectorsWithinRadius( // const kvector_t &input_vector, double radius) const; - //! get a list of reciprocal lattice vectors within a specified distance of a given vector + //! Returns a list of reciprocal lattice vectors within a specified distance of a given vector // std::vector<kvector_t> getReciprocalLatticeVectorsWithinRadius( // const kvector_t &input_vector, double radius) const; void computeReciprocalLatticeVectorsWithinRadius( const kvector_t &input_vector, double radius) const; - //! get a list of rotation angles within a specified range that hit a maximal set of small Bragg peaks + //! Returns a list of rotation angles within a specified range that hit a maximal set of small Bragg peaks //std::vector<double> collectBraggAngles(size_t size, double max_radius, const TRange<double> &phi_range, const TRange<double> &z_range) const; std::vector<double> collectBraggAngles(size_t size, double max_radius, const TRange<double> &phi_range, const TRange<double> &z_range) const; - //! set a selection rule for the reciprocal vectors + //! Sets a selection rule for the reciprocal vectors // void setSelectionRule(ISelectionRule *p_selection_rule) { // if (mp_selection_rule != p_selection_rule) { // delete mp_selection_rule; diff --git a/Core/Samples/inc/LatticeBasis.h b/Core/Samples/inc/LatticeBasis.h index 30b5ba5b7ed..e0366efab51 100644 --- a/Core/Samples/inc/LatticeBasis.h +++ b/Core/Samples/inc/LatticeBasis.h @@ -35,25 +35,27 @@ class LatticeBasis : public Particle virtual IFormFactor* createFormFactor() const; - //! return number of different particles + //! Returns number of different particles size_t getNbrParticles() const {return m_particles.size(); } - //! return number of positions for particle with index - size_t getNbrPositionsForParticle(size_t index) const { return m_positions_vector[check_index(index)].size(); } + //! Returns number of positions for particle with index + size_t getNbrPositionsForParticle(size_t index) const + { return m_positions_vector[check_index(index)].size(); } - //! return position of element with given index + //! Returns position of element with given index // kvector_t getPosition(size_t index) const { return m_positions[check_index(index)]; } - //! return particle with given index + //! Returns particle with given index const Particle *getParticle(size_t index) const { return m_particles[check_index(index)]; } - std::vector<kvector_t> getParticlePositions(size_t index) const { return m_positions_vector[check_index(index)]; } + std::vector<kvector_t> getParticlePositions(size_t index) const + { return m_positions_vector[check_index(index)]; } - //! create vector of size/shape distributed particles corresponding to the particle with index i + //! Creates vector of size/shape distributed particles corresponding to the particle with index i std::vector<DiffuseParticleInfo *> createDiffuseParticleInfos() const; private: - //! check index + //! Checks index inline size_t check_index(size_t index) const { return index < m_positions_vector.size() ? index : throw OutOfBoundsException("LatticeBasis::check_index() -> Index is out of bounds"); } std::vector<Particle *> m_particles; diff --git a/Core/Samples/inc/Layer.h b/Core/Samples/inc/Layer.h index 0d531779fe5..f3ccf1c125b 100644 --- a/Core/Samples/inc/Layer.h +++ b/Core/Samples/inc/Layer.h @@ -30,16 +30,16 @@ class Layer : public ICompositeSample Layer(const IMaterial* p_material, double thickness=0); virtual ~Layer() { } - //! make layer's clone + //! Clones this. virtual Layer *clone() const; - //! set layer thickness in _angstrom_ + //! Sets layer thickness in _angstrom_ virtual void setThickness(double thickness); - //! return layer thickness in _angstrom_ + //! Returns layer thickness in _angstrom_ virtual double getThickness() const { return m_thickness; } - //! set material of the layer + //! Sets material of the layer virtual void setMaterial(const IMaterial* p_material) { p_material ? @@ -52,30 +52,30 @@ class Layer : public ICompositeSample //! @param thickness thickness of the material in angstrom virtual void setMaterial(const IMaterial* p_material, double thickness); - //! return layer's material + //! Returns layer's material. virtual const IMaterial* getMaterial() const { return mp_material; } - //! return refractive index of the layer's material + //! Returns refractive index of the layer's material. virtual complex_t getRefractiveIndex() const { return (dynamic_cast<const HomogeneousMaterial *>(mp_material))-> getRefractiveIndex(); } - //! return false (override is important for polymorphism of LayerDecorator) + //! Returns false (override is important for polymorphism of LayerDecorator). virtual bool hasDWBASimulation() const { return false; } - //! return zero pointer (override is important for polymorphism of LayerDecorator) + //! Returns zero pointer (override is important for polymorphism of LayerDecorator). virtual LayerDWBASimulation *createDWBASimulation() const { return 0; } protected: Layer(const Layer &other); - //! register some class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); private: - //! print class + //! Prints class void print(std::ostream &ostr) const; const IMaterial* mp_material; //!< pointer to the material diff --git a/Core/Samples/inc/LayerDecorator.h b/Core/Samples/inc/LayerDecorator.h index 1a50c04b78a..4795f6dde32 100644 --- a/Core/Samples/inc/LayerDecorator.h +++ b/Core/Samples/inc/LayerDecorator.h @@ -29,10 +29,10 @@ class LayerDecorator : public Layer /// make layer's clone virtual LayerDecorator *clone() const; - //! set layer thickness in _angstrom_ + //! Sets layer thickness in _angstrom_ virtual void setThickness(double thickness) { mp_decorated_layer->setThickness(thickness); } - //! return layer thickness in _angstrom_ + //! Returns layer thickness in _angstrom_ virtual double getThickness() const { return mp_decorated_layer->getThickness(); } //! @brief set material to the layer @@ -46,19 +46,19 @@ class LayerDecorator : public Layer mp_decorated_layer->setMaterial(p_material, thickness); } - //! return layer's material + //! Returns layer's material const virtual IMaterial* getMaterial() const { return mp_decorated_layer->getMaterial(); } - //! return refractive index of the layer's material + //! Returns refractive index of the layer's material virtual complex_t getRefractiveIndex() const { return mp_decorated_layer->getRefractiveIndex(); } - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); const Layer* getDecoratedLayer() const { return mp_decorated_layer; } @@ -86,7 +86,7 @@ class LayerDecorator : public Layer IDecoration *mp_decoration; private: - //! print class + //! Prints class void print(std::ostream &ostr) const; }; diff --git a/Core/Samples/inc/LayerInterface.h b/Core/Samples/inc/LayerInterface.h index e5240492b36..6d09acb7ab0 100644 --- a/Core/Samples/inc/LayerInterface.h +++ b/Core/Samples/inc/LayerInterface.h @@ -32,9 +32,9 @@ class LayerInterface : public ICompositeSample { public: virtual ~LayerInterface(); - //! create smooth interface between two layers + //! Creates smooth interface between two layers static LayerInterface* createSmoothInterface(const Layer *p_layer_top, const Layer *p_layer_bottom); - //! create rough interface between two layers + //! Creates rough interface between two layers static LayerInterface* createRoughInterface(const Layer *p_layer_top, const Layer *p_layer_bottom, const LayerRoughness &roughness); //! link to the top layer @@ -46,23 +46,23 @@ class LayerInterface : public ICompositeSample //! link between layers above and below the interface inline void setLayersTopBottom(const Layer* p_layer_top, const Layer* p_layer_bottom) { setLayerTop(p_layer_top); setLayerBottom(p_layer_bottom); } - //! set roughness of the interface + //! Sets roughness of the interface inline void setRoughness(const LayerRoughness &roughness); - //! get roughness of the interface + //! Returns roughness of the interface inline const LayerRoughness *getRoughness() const { return m_roughness; } - //! get top layer + //! Returns top layer inline const Layer *getLayerTop() const { return m_LayerTop; } - //! get bottom layer + //! Returns bottom layer inline const Layer *getLayerBottom() const { return m_LayerBottom; } - //! print class + //! Prints class friend std::ostream &operator<<(std::ostream &ostr, const LayerInterface &m) { m.print(ostr); return ostr; } protected: - //! print class + //! Prints class void print(std::ostream &ostr) const; private: diff --git a/Core/Samples/inc/LayerRoughness.h b/Core/Samples/inc/LayerRoughness.h index 1740049321c..c16a735d72c 100644 --- a/Core/Samples/inc/LayerRoughness.h +++ b/Core/Samples/inc/LayerRoughness.h @@ -35,34 +35,34 @@ class LayerRoughness : public IRoughness LayerRoughness *clone() const; - //! return power spectral density of the surface roughness + //! Returns power spectral density of the surface roughness double getSpectralFun(const kvector_t &kvec) const; double getCorrFun(const kvector_t &k) const; - //! set rms value of roughness + //! Sets rms of roughness inline void setSigma(double sigma) { m_sigma = sigma; } - //! return rms value of roughness + //! Returns rms of roughness inline double getSigma() const { return m_sigma; } - //! Set hurst parameter. It describes how jagged the surface is. + //! Sets hurst parameter. It describes how jagged the surface is. inline void setHurstParameter(double hurstParameter) { m_hurstParameter = hurstParameter; } - //! return hurst parameter + //! Returns hurst parameter inline double getHurstParameter() const { return m_hurstParameter; } - //! set lateral correlation length + //! Sets lateral correlation length inline void setLatteralCorrLength(double latteralCorrLength) { m_latteralCorrLength = latteralCorrLength; } - //! return latteral correlation length + //! Returns latteral correlation length inline double getLatteralCorrLength() const { return m_latteralCorrLength; } - //! print class + //! Prints class friend std::ostream &operator<<(std::ostream &ostr, const LayerRoughness &m) { m.print(ostr); return ostr; } protected: - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); - //! print class + //! Prints class void print(std::ostream &ostr) const; double m_sigma; //!< rms of roughness diff --git a/Core/Samples/inc/MaterialManager.h b/Core/Samples/inc/MaterialManager.h index 6e4ad75cfcc..9502af94100 100644 --- a/Core/Samples/inc/MaterialManager.h +++ b/Core/Samples/inc/MaterialManager.h @@ -33,16 +33,16 @@ class MaterialManager: public ISingleton<MaterialManager> public: virtual ~MaterialManager() { clear(); } - //! Return material from database. + //! Returns material from database. static const IMaterial *getMaterial(const std::string &name) { return instance().this_getMaterial(name); } - //! Add material to database. + //! Adds material to database. static const IMaterial *getHomogeneousMaterial( const std::string &name, const complex_t &refractive_index) { return instance().this_getHomogeneousMaterial(name, refractive_index); } - //! Add material to database. + //! Adds material to database. static const IMaterial *getHomogeneousMaterial( const std::string &name, double refractive_index_real, @@ -50,7 +50,7 @@ class MaterialManager: public ISingleton<MaterialManager> { return instance().this_getHomogeneousMaterial( name, refractive_index_real, refractive_index_imag); } - //! Wrap print. + //! Sends class description to stream. friend std::ostream &operator<<( std::ostream &ostr, const MaterialManager &m) { m.print(ostr); return ostr; } diff --git a/Core/Samples/inc/MultiLayer.h b/Core/Samples/inc/MultiLayer.h index 4661f45079b..46e0e1db700 100644 --- a/Core/Samples/inc/MultiLayer.h +++ b/Core/Samples/inc/MultiLayer.h @@ -41,46 +41,46 @@ class MultiLayer : public ICompositeSample MultiLayer(); ~MultiLayer(); - //! return number of layers in multilayer + //! Returns number of layers in multilayer inline size_t getNumberOfLayers() const { return m_layers.size(); } - //! return number of interfaces in multilayer + //! Returns number of interfaces in multilayer inline size_t getNumberOfInterfaces() const { return m_interfaces.size(); } - //! add object to multilayer, overrides from ISample + //! Adds object to multilayer, overrides from ISample void addLayer(const Layer &p_child); - //! add layer with top roughness + //! Adds layer with top roughness void addLayerWithTopRoughness(const Layer &layer, const LayerRoughness &roughness); - //! return layer with given index + //! Returns layer with given index inline const Layer *getLayer(size_t i_layer) const { return m_layers[ check_layer_index(i_layer) ]; } - //! return layer with given index + //! Returns layer with given index inline const LayerInterface *getLayerInterface(size_t i_interface) const { return m_interfaces[ check_interface_index(i_interface) ]; } - //! return z-coordinate of the layer's bottom + //! Returns z-coordinate of the layer's bottom inline double getLayerBottomZ(size_t i_layer) const { return m_layers_z[ check_layer_index(i_layer) ]; } - //! return thickness of layer + //! Returns thickness of layer inline double getLayerThickness(size_t i_layer) const { return m_layers[ check_layer_index(i_layer) ]->getThickness(); } - //! return top interface of layer + //! Returns top interface of layer const LayerInterface *getLayerTopInterface(size_t i_layer) const; - //! return bottom interface of layer + //! Returns bottom interface of layer const LayerInterface *getLayerBottomInterface(size_t i_layer) const; - //! destruct allocated objects + //! Destructs allocated objects void clear(); - //! return clone of multilayer with clones of all layers and recreated interfaces between layers + //! Returns alone of multilayer with clones of all layers and recreated interfaces between layers virtual MultiLayer *clone() const; - //! set cross correlation length of roughnesses between interfaces + //! Sets cross correlation length of roughnesses between interfaces inline void setCrossCorrLength(double crossCorrLength) { crossCorrLength!=0 ? m_crossCorrLength = crossCorrLength : throw LogicErrorException("Attempt to set crossCorrLength to zero"); } - //! return cross correlation length of roughnesses between interfaces + //! Returns cross correlation length of roughnesses between interfaces inline double getCrossCorrLength() const { return m_crossCorrLength; } ///! correlation function of roughnesses between the interfaces @@ -89,41 +89,41 @@ class MultiLayer : public ICompositeSample //! Fourier transform of the correlation function of roughnesses between the interfaces double getCrossCorrSpectralFun(const kvector_t &kvec, size_t j, size_t k) const; - //! change thickness of layer + //! Sets thickness of layer. void setLayerThickness(size_t i_layer, double thickness); - //! print class + //! Prints class friend std::ostream &operator<<(std::ostream &ostr, const MultiLayer &m) { m.print(ostr); return ostr; } //! look for the presence of DWBA terms (e.g. included particles) and return ISimulation if needed virtual MultiLayerDWBASimulation *createDWBASimulation() const; protected: - //! initialize pool parameters, i.e. register some of class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); - //! print class + //! Prints class void print(std::ostream &ostr) const; private: - //! adding the layer with simultaneous registration in parent class + //! Adds the layer with simultaneous registration in parent class void addAndRegisterLayer(Layer *child) { m_layers.push_back(child); registerChild(child); } - //! adding the interface with simultaneous registration in parent class + //! Adds the interface with simultaneous registration in parent class void addAndRegisterInterface(LayerInterface *child) { m_interfaces.push_back(child); registerChild(child); } - //! check index of layer w.r.t. vector length + //! Checks index of layer w.r.t. vector length inline size_t check_layer_index(size_t i_layer) const { return i_layer < m_layers.size() ? i_layer : throw OutOfBoundsException("Layer index is out of bounds"); } - //! check index of interface w.r.t. vector length + //! Checks index of interface w.r.t. vector length inline size_t check_interface_index(size_t i_interface) const { return i_interface < m_interfaces.size() ? i_interface : throw OutOfBoundsException("Interface index is out of bounds"); } diff --git a/Core/Samples/inc/Particle.h b/Core/Samples/inc/Particle.h index da91eed9e90..569bfa3c72e 100644 --- a/Core/Samples/inc/Particle.h +++ b/Core/Samples/inc/Particle.h @@ -33,7 +33,7 @@ class Particle : public ICompositeSample virtual ~Particle(); virtual Particle *clone() const; - //! Set the refractive index of the ambient material (which influences its scattering power) + //! Sets the refractive index of the ambient material (which influences its scattering power) virtual void setAmbientRefractiveIndex(complex_t refractive_index) { m_ambient_refractive_index = refractive_index; @@ -47,7 +47,7 @@ class Particle : public ICompositeSample return p_ff; } - //! set the form factor of the particle (not including scattering factor from refractive index) + //! Sets the form factor of the particle (not including scattering factor from refractive index) virtual void setSimpleFormFactor(IFormFactor* p_form_factor) { if (p_form_factor != mp_form_factor) { @@ -58,15 +58,15 @@ class Particle : public ICompositeSample } } - //! return refractive index of the particle + //! Returns refractive index of the particle virtual const complex_t getRefractiveIndex() const { return m_refractive_index; } - //! return form factor of the particle (not including scattering factor from refractive index) + //! Returns formfactor of the particle (not including scattering factor from refractive index) virtual const IFormFactor *getSimpleFormFactor() const { return mp_form_factor;} - //! create list of contained particles for diffuse calculations + //! Creates list of contained particles for diffuse calculations virtual std::vector<DiffuseParticleInfo *> *createDiffuseParticleInfo(const ParticleInfo &parent_info) const { (void)parent_info; return 0; diff --git a/Core/Samples/inc/ParticleBuilder.h b/Core/Samples/inc/ParticleBuilder.h index 754322943eb..7335dd1adc4 100644 --- a/Core/Samples/inc/ParticleBuilder.h +++ b/Core/Samples/inc/ParticleBuilder.h @@ -32,7 +32,7 @@ class ParticleBuilder ParticleBuilder(); virtual ~ParticleBuilder(); - //! set prototype for particle production + //! Sets prototype for particle production //! @param particle prototype of particle //! @param name parameter name in the parameter pool of given prototype //! @param parameter variation type diff --git a/Core/Samples/inc/ParticleCoreShell.h b/Core/Samples/inc/ParticleCoreShell.h index 8c530a24516..60fa15b1632 100644 --- a/Core/Samples/inc/ParticleCoreShell.h +++ b/Core/Samples/inc/ParticleCoreShell.h @@ -27,7 +27,7 @@ class ParticleCoreShell : public Particle virtual ~ParticleCoreShell(); virtual ParticleCoreShell *clone() const; - //! Set the refractive index of the ambient material (which influences its scattering power) + //! Sets the refractive index of the ambient material (which influences its scattering power) virtual void setAmbientRefractiveIndex(complex_t refractive_index) { m_ambient_refractive_index = refractive_index; @@ -37,7 +37,7 @@ class ParticleCoreShell : public Particle virtual IFormFactor* createFormFactor() const; - //! set the form factor of the particle (not including scattering factor from refractive index) + //! Sets the formfactor of the particle (not including scattering factor from refractive index) virtual void setSimpleFormFactor(IFormFactor* p_form_factor) { if (p_form_factor != mp_form_factor) { @@ -48,10 +48,10 @@ class ParticleCoreShell : public Particle } } - //! return form factor of the particle (not including scattering factor from refractive index) + //! Returns formfactor of the particle (not including scattering factor from refractive index) virtual const IFormFactor *getSimpleFormFactor() const { return mp_form_factor;} - //! create list of contained particles for diffuse calculations + //! Creates list of contained particles for diffuse calculations virtual std::vector<DiffuseParticleInfo *> *createDiffuseParticleInfo(const ParticleInfo &parent_info) const { (void)parent_info; return 0; diff --git a/Core/Samples/inc/ParticleDecoration.h b/Core/Samples/inc/ParticleDecoration.h index d15f5040707..b0f50b650d8 100644 --- a/Core/Samples/inc/ParticleDecoration.h +++ b/Core/Samples/inc/ParticleDecoration.h @@ -35,7 +35,7 @@ class ParticleDecoration : public IDecoration virtual ParticleDecoration *clone() const; - //! add particle giving depth and transformation + //! Adds particle giving depth and transformation void addParticle( Particle *p_particle, Geometry::Transform3D *p_transform=0, double depth=0, double abundance=1.0); @@ -43,16 +43,16 @@ class ParticleDecoration : public IDecoration const Particle &particle, const Geometry::Transform3D &transform, double depth=0, double abundance=1.0); - //! add particle giving depth + //! Adds particle giving depth void addParticle( const Particle &particle, double depth=0.0, double abundance=1.0); void addParticle( Particle *p_particle, double depth=0.0, double abundance=1.0); - //! Add particle info + //! Adds particle info void addParticleInfo(const ParticleInfo &info); - //! Get number of particles + //! Returns number of particles virtual size_t getNumberOfParticles() const { return m_particles.size(); } /// get information about particle with index @@ -61,27 +61,27 @@ class ParticleDecoration : public IDecoration /// Get abundance fraction of particle with index double getAbundanceFractionOfParticle(size_t index) const; - //! get number of interference functions + //! Returns number of interference functions virtual size_t getNumberOfInterferenceFunctions() const { return m_interference_functions.size(); } - //! get interference functions + //! Returns interference functions virtual SafePointerVector<IInterferenceFunction> getInterferenceFunctions() const { return m_interference_functions; } - //! Add interference function + //! Adds interference function void addInterferenceFunction( IInterferenceFunction* p_interference_function); void addInterferenceFunction( const IInterferenceFunction &interference_function); - //! Get interference function with index + //! Returns interference function with index const IInterferenceFunction* getInterferenceFunction(size_t index) const; private: - //! Add particle information with simultaneous registration in parent class. + //! Adds particle information with simultaneous registration in parent class. void addAndRegisterParticleInfo(ParticleInfo *child) { m_total_abundance += child->getAbundance(); @@ -89,7 +89,7 @@ class ParticleDecoration : public IDecoration registerChild(child); } - //! Add interference function with simultaneous registration in parent class + //! Adds interference function with simultaneous registration in parent class void addAndRegisterInterferenceFunction(IInterferenceFunction *child) { m_interference_functions.push_back(child); diff --git a/Core/Samples/inc/ParticleInfo.h b/Core/Samples/inc/ParticleInfo.h index 38c40c071e7..b772a6b4618 100644 --- a/Core/Samples/inc/ParticleInfo.h +++ b/Core/Samples/inc/ParticleInfo.h @@ -35,28 +35,28 @@ class ParticleInfo : public ICompositeSample virtual ParticleInfo *clone() const; - //! Return particle. + //! Returns particle. const Particle *getParticle() const { return mp_particle; } - //! Return transformation. + //! Returns transformation. const Geometry::Transform3D *getTransform3D() const { return mp_transform; } - //! Set transformation. + //! Sets transformation. void setTransform(const Geometry::Transform3D &transform) { delete mp_transform; mp_transform = new Geometry::Transform3D(transform); } - //! Return depth. + //! Returns depth. double getDepth() const { return m_depth; } - //! Set depth. + //! Sets depth. void setDepth(double depth) { m_depth = depth; } - //! Return abundance. + //! Returns abundance. double getAbundance() const { return m_abundance; } - //! Set abundance. + //! Sets abundance. void setAbundance(double abundance) { m_abundance = abundance; } protected: diff --git a/Core/Samples/inc/PositionParticleInfo.h b/Core/Samples/inc/PositionParticleInfo.h index f2b10b6aede..e473bbd74c3 100644 --- a/Core/Samples/inc/PositionParticleInfo.h +++ b/Core/Samples/inc/PositionParticleInfo.h @@ -44,21 +44,21 @@ class PositionParticleInfo : public ParticleInfo virtual PositionParticleInfo *clone() const; - //! Return particle. + //! Returns particle. const Particle *getParticle() const { return mp_particle; } - //! Return particle position, including depth. + //! Returns particle position, including depth. kvector_t getPosition() const { return kvector_t(m_pos_x, m_pos_y, -m_depth); } - //! Set particle position, including depth. + //! Sets particle position, including depth. void setPosition(kvector_t position); protected: PositionParticleInfo &operator=(const PositionParticleInfo &right); PositionParticleInfo(const PositionParticleInfo &source); - //! register some class members for later access via parameter pool + //! Registers some class members for later access via parameter pool virtual void init_parameters(); double m_pos_x; diff --git a/Core/Samples/src/ICompositeSample.cpp b/Core/Samples/src/ICompositeSample.cpp index 598f98312dc..a6115a7e006 100644 --- a/Core/Samples/src/ICompositeSample.cpp +++ b/Core/Samples/src/ICompositeSample.cpp @@ -27,7 +27,7 @@ ICompositeSample *ICompositeSample::clone() const } -//! register child in the container +//! Registers child in the container void ICompositeSample::registerChild(ISample *sample) { @@ -45,7 +45,7 @@ void ICompositeSample::deregisterChild(ISample *sample) m_samples.remove(sample); } -//! create general iterator to walk through the tree of registered composite children +//! Creates general iterator to walk through the tree of registered composite children ICompositeIterator ICompositeSample::createIterator() { diff --git a/Core/Samples/src/ISample.cpp b/Core/Samples/src/ISample.cpp index 1c700c15b39..1a9fc1e6fbe 100644 --- a/Core/Samples/src/ISample.cpp +++ b/Core/Samples/src/ISample.cpp @@ -44,7 +44,7 @@ void ISample::print_structure() } } -//! add parameters from local pool to external pool and call recursion over direct children +//! Adds parameters from local pool to external pool and call recursion over direct children std::string ISample::addParametersToExternalPool(std::string path, ParameterPool *external_pool, int copy_number) const { diff --git a/Core/Samples/src/Layer.cpp b/Core/Samples/src/Layer.cpp index ae1e5f81463..8647107c2fa 100644 --- a/Core/Samples/src/Layer.cpp +++ b/Core/Samples/src/Layer.cpp @@ -43,7 +43,7 @@ Layer::Layer(const Layer &other) : ICompositeSample() } -//! initialize pool parameters, i.e. register some of class members for later access via parameter pool +//! Registers some class members for later access via parameter pool void Layer::init_parameters() { @@ -72,7 +72,7 @@ void Layer::setMaterial(const IMaterial* p_material, double thickness) setThickness(thickness); } -//! print content of multilayer +//! Prints content of multilayer void Layer::print(std::ostream &ostr) const { diff --git a/Core/Samples/src/MaterialManager.cpp b/Core/Samples/src/MaterialManager.cpp index 3f2a100db9e..4004d2f97aa 100644 --- a/Core/Samples/src/MaterialManager.cpp +++ b/Core/Samples/src/MaterialManager.cpp @@ -35,7 +35,7 @@ void MaterialManager::clear() { m_materials.clear(); } -//! Get material. +//! Returns material. const IMaterial *MaterialManager::this_getMaterial(const std::string &name) { @@ -49,7 +49,7 @@ const IMaterial *MaterialManager::this_getMaterial(const std::string &name) } } -//! Create material, and add into database using name of material as identifier. +//! Creates material, and add into database using name of material as identifier. const IMaterial *MaterialManager::this_getHomogeneousMaterial( const std::string &name, const complex_t &refractive_index) @@ -77,7 +77,7 @@ const IMaterial *MaterialManager::this_getHomogeneousMaterial( } } -//! Create material, and add into database using name of material as identifier. +//! Creates material, and add into database using name of material as identifier. const IMaterial *MaterialManager::this_getHomogeneousMaterial( const std::string &name, diff --git a/Core/Samples/src/MultiLayer.cpp b/Core/Samples/src/MultiLayer.cpp index 8fac7ad662d..d643f06ff64 100644 --- a/Core/Samples/src/MultiLayer.cpp +++ b/Core/Samples/src/MultiLayer.cpp @@ -112,7 +112,7 @@ const LayerInterface *MultiLayer::getLayerBottomInterface(size_t i_layer) const return i_layer<m_interfaces.size() ? m_interfaces[ check_interface_index(i_layer) ] : 0; } -//! add layer with top roughness +//! Adds layer with top roughness void MultiLayer::addLayerWithTopRoughness(const Layer &layer, const LayerRoughness &roughness) { @@ -130,7 +130,7 @@ void MultiLayer::addLayerWithTopRoughness(const Layer &layer, const LayerRoughne m_layers_z.push_back(0.0); } -//! add layer with default (zero) roughness +//! Adds layer with default (zero) roughness void MultiLayer::addLayer(const Layer &layer) { diff --git a/Core/Samples/src/ParticleBuilder.cpp b/Core/Samples/src/ParticleBuilder.cpp index 5f93f320f21..4a1f7689783 100644 --- a/Core/Samples/src/ParticleBuilder.cpp +++ b/Core/Samples/src/ParticleBuilder.cpp @@ -32,7 +32,7 @@ ParticleBuilder::~ParticleBuilder() delete m_parameter; } -//! set prototype for particle production +//! Sets prototype for particle production void ParticleBuilder::setPrototype(const Particle &particle, std::string name, const StochasticParameter<double> ¶m, double scale) { diff --git a/Core/Samples/src/ParticleDecoration.cpp b/Core/Samples/src/ParticleDecoration.cpp index 0f9341bf886..1dbd0a8a0e0 100644 --- a/Core/Samples/src/ParticleDecoration.cpp +++ b/Core/Samples/src/ParticleDecoration.cpp @@ -67,7 +67,7 @@ ParticleDecoration* ParticleDecoration::clone() const return p_new; } -//! add particle +//! Adds particle void ParticleDecoration::addParticle(Particle* p_particle, double depth, double abundance) @@ -94,14 +94,14 @@ void ParticleDecoration::addParticle(Particle* p_particle, addAndRegisterParticleInfo( new ParticleInfo(p_particle, transform, depth, abundance) ); } -//! add particle info +//! Adds particle info void ParticleDecoration::addParticleInfo(const ParticleInfo &info) { addAndRegisterParticleInfo( info.clone() ); } -//! get particle info +//! Returns particle info const ParticleInfo* ParticleDecoration::getParticleInfo(size_t index) const { @@ -116,7 +116,7 @@ double ParticleDecoration::getAbundanceFractionOfParticle(size_t index) const return getParticleInfo(index)->getAbundance()/m_total_abundance; } -//! add interference functions +//! Adds interference functions void ParticleDecoration::addInterferenceFunction(IInterferenceFunction* p_interference_function) { diff --git a/Core/Samples/src/ParticleInfo.cpp b/Core/Samples/src/ParticleInfo.cpp index e8d62492ff0..1938f4527cc 100644 --- a/Core/Samples/src/ParticleInfo.cpp +++ b/Core/Samples/src/ParticleInfo.cpp @@ -43,7 +43,7 @@ ParticleInfo::~ParticleInfo() delete mp_transform; } -//! initialize pool parameters, i.e. register some of class members for later access via parameter pool +//! Registers some class members for later access via parameter pool void ParticleInfo::init_parameters() { getParameterPool()->clear(); diff --git a/Core/Tools/inc/AxisBin.h b/Core/Tools/inc/AxisBin.h index cde72fb2911..6c5dd64de3e 100644 --- a/Core/Tools/inc/AxisBin.h +++ b/Core/Tools/inc/AxisBin.h @@ -30,13 +30,13 @@ class AxisBin : public IAxis //! clone function virtual AxisBin *clone() const; - //! create a new axis with half the number of bins + //! Creates a new axis with half the number of bins virtual AxisBin *createDoubleBinSize() const; //! destructor virtual ~AxisBin() {} - //! add new bin limit to the end + //! Adds new bin limit to the end void push_back(double limit) { m_value_vector.push_back(limit); } virtual size_t getSize() const; @@ -50,7 +50,7 @@ class AxisBin : public IAxis virtual double getMax() const { return m_value_vector.back(); } - //! initialize axis bins + //! Initializes axis bins void initBins(size_t nbr_bins, double start, double end); virtual size_t findClosestIndex(double value) const; diff --git a/Core/Tools/inc/AxisDouble.h b/Core/Tools/inc/AxisDouble.h index 60bdeb2ff37..7acf482cc2b 100644 --- a/Core/Tools/inc/AxisDouble.h +++ b/Core/Tools/inc/AxisDouble.h @@ -42,20 +42,20 @@ class AxisDouble : public IAxis virtual size_t getSize() const { return m_sample_vector.size(); } - //! add point to the end of the axis + //! Adds point to the end of the axis void push_back(double element) { m_sample_vector.push_back(element); } virtual double operator[](size_t index) const { return m_sample_vector[index]; } virtual Bin1D getBin(size_t index) const; - //! get value of first point of axis + //! Returns value of first point of axis virtual double getMin() const { return m_sample_vector.front(); } - //! get value of last point of axis + //! Returns value of last point of axis virtual double getMax() const { return m_sample_vector.back(); } - //! initialize axis points + //! Initializes axis points void initElements(size_t size, double start, double end); //! find number of bin which is closest to given value diff --git a/Core/Tools/inc/Convolve.h b/Core/Tools/inc/Convolve.h index 5be566ef724..196b7736a60 100644 --- a/Core/Tools/inc/Convolve.h +++ b/Core/Tools/inc/Convolve.h @@ -60,7 +60,7 @@ class Convolve //! prepare arrays for 2D convolution of given vectors void init(int h_src, int w_src, int h_kernel, int w_kernel); - //! set convolution mode + //! Sets convolution mode void setMode(Mode mode) { m_mode = mode; } private: diff --git a/Core/Tools/inc/IAxis.h b/Core/Tools/inc/IAxis.h index 0b1621ba1e7..b8d278e1a1b 100644 --- a/Core/Tools/inc/IAxis.h +++ b/Core/Tools/inc/IAxis.h @@ -29,7 +29,7 @@ class IAxis //! clone function virtual IAxis *clone() const=0; - //! create a new axis with half the number of bins + //! Creates a new axis with half the number of bins virtual IAxis *createDoubleBinSize() const=0; //! destructor @@ -41,7 +41,7 @@ class IAxis //! retrieve the label of the axis std::string getName() const { return m_name; } - //! set the axis label + //! Sets the axis label void setName(std::string name) { m_name = name; } //! indexed accessor retrieves a sample @@ -50,10 +50,10 @@ class IAxis //! retrieve a 1d bin for the given index virtual Bin1D getBin(size_t index) const=0; - //! get value of first point of axis + //! Returns value of first point of axis virtual double getMin() const=0; - //! get value of last point of axis + //! Returns value of last point of axis virtual double getMax() const=0; //! find bin index which is best match for given value diff --git a/Core/Tools/inc/IFactory.h b/Core/Tools/inc/IFactory.h index a19f21f9e01..9f0b5a9453d 100644 --- a/Core/Tools/inc/IFactory.h +++ b/Core/Tools/inc/IFactory.h @@ -40,7 +40,7 @@ class IFactory IFactory() : m_own_objects(false) { } - //! create object by calling creation function corresponded to given identifier + //! Creates object by calling creation function corresponded to given identifier AbstractProduct *createItem(const IdentifierType &itemId) { typename CallbackMap_t::const_iterator it = m_callbacks.find(itemId); @@ -54,7 +54,7 @@ class IFactory return x; } - //! register object's creation function + //! Registers object's creation function bool registerItem(const IdentifierType &itemId, CreateItemCallback CreateFn) { typename CallbackMap_t::const_iterator it = m_callbacks.find(itemId); @@ -65,7 +65,7 @@ class IFactory return m_callbacks.insert( typename CallbackMap_t::value_type(itemId, CreateFn)).second; } - //! register object's creation function and store object description + //! Registers object's creation function and store object description bool registerItem(const IdentifierType &itemId, CreateItemCallback CreateFn, const IdentifierType &itemDescription) { typename CallbackMap_t::const_iterator it = m_callbacks.find(itemId); @@ -95,10 +95,10 @@ class IFactory m_objects.clear(); } - //! set flag to delete objects on descruction + //! Sets flag to delete objects on descruction void setOwnObjects(bool own_objects) { m_own_objects = own_objects; } - //! return number of registered objects + //! Returns number of registered objects size_t getNumberOfRegistered() const { return m_callbacks.size(); } protected: diff --git a/Core/Tools/inc/INamed.h b/Core/Tools/inc/INamed.h index 98e6bd64e4a..45fa59a5cc8 100644 --- a/Core/Tools/inc/INamed.h +++ b/Core/Tools/inc/INamed.h @@ -3,7 +3,7 @@ // BornAgain: simulate and fit scattering at grazing incidence // //! @file Tools/inc/INamed.h -//! @brief Defines the standard mix-in INamed. +//! @brief Defines and implements the standard mix-in INamed. //! //! @homepage http://apps.jcns.fz-juelich.de/BornAgain //! @license GNU General Public License v3 or higher (see COPYING) @@ -23,12 +23,16 @@ class INamed { public: - INamed() : m_name(), m_title() {} - INamed(const std::string &name) : m_name(name), m_title() { } - INamed(const std::string &name, const std::string &title) : m_name(name), m_title(title) { } + INamed() + : m_name(), m_title() {} + INamed(const std::string &name) + : m_name(name), m_title() {} + INamed(const std::string &name, const std::string &title) + : m_name(name), m_title(title) {} virtual ~INamed(){} - void setName(std::string name) { m_name = name; } + void setName(std::string name) + { m_name = name; } std::string getName() const { return m_name; } std::string getTitle() const { return m_title; } diff --git a/Core/Tools/inc/IObserver.h b/Core/Tools/inc/IObserver.h index a887c4a2f70..9ccd04d9231 100644 --- a/Core/Tools/inc/IObserver.h +++ b/Core/Tools/inc/IObserver.h @@ -32,7 +32,7 @@ class IObserver { //! method which is used by observable subject to notify change in status virtual void update (IObservable *subject) = 0; -// //! set pointer to observed subject +// //! Sets pointer to observed subject // virtual void setObservedSubject(IObservable *subject); //private: // IObservable *m_observed_subject; diff --git a/Core/Tools/inc/IParameterized.h b/Core/Tools/inc/IParameterized.h index 39fd2900b5d..b4056debbc4 100644 --- a/Core/Tools/inc/IParameterized.h +++ b/Core/Tools/inc/IParameterized.h @@ -34,13 +34,13 @@ class IParameterized : public INamed IParameterized& operator=(const IParameterized& other); virtual ~IParameterized() {} - //! Return pointer to the parameter pool. + //! Returns pointer to the parameter pool. ParameterPool* getParameterPool() { return &m_parameters; } - //! Create new parameter pool, with all local parameter and parameters of children + //! Creates new parameter pool, with all local parameter and parameters of children virtual ParameterPool* createParameterTree() const; - //! Add parameters from local pool to external pool and call recursion over direct children. + //! Adds parameters from local pool to external pool and call recursion over direct children. virtual std::string addParametersToExternalPool( std::string path, ParameterPool* external_pool, diff --git a/Core/Tools/inc/MemberFunctionIntegrator.h b/Core/Tools/inc/MemberFunctionIntegrator.h index 57954573d1f..4b58c4e1965 100644 --- a/Core/Tools/inc/MemberFunctionIntegrator.h +++ b/Core/Tools/inc/MemberFunctionIntegrator.h @@ -43,7 +43,7 @@ template <class C> class MemberFunctionIntegrator //! perform the actual integration over the range [lmin, lmax] double integrate(double lmin, double lmax, void *params); - //! set integrand + //! Sets integrand void setIntegrand(mem_function member_function) { m_member_function = member_function; } void setIntegrand(mem_function member_function, const C *const p_object) diff --git a/Core/Tools/inc/MessageService.h b/Core/Tools/inc/MessageService.h index 06f91580823..2dbaf9f7328 100644 --- a/Core/Tools/inc/MessageService.h +++ b/Core/Tools/inc/MessageService.h @@ -9,7 +9,7 @@ //#include <boost/thread.hpp> -//! Set of logging utilities +//! Sets of logging utilities namespace MSG { diff --git a/Core/Tools/inc/OutputData.h b/Core/Tools/inc/OutputData.h index e7a4558c853..27614deb944 100644 --- a/Core/Tools/inc/OutputData.h +++ b/Core/Tools/inc/OutputData.h @@ -46,25 +46,25 @@ template <class T> class OutputData // retrieve basic info // --------------------------------- - //! Return number of dimensions. + //! Returns number of dimensions. size_t getRank() const { return m_value_axes.size(); } - //! Return total size of data buffer (product of bin number in every dimension). + //! Returns total size of data buffer (product of bin number in every dimension). size_t getAllocatedSize() const { if (mp_ll_data) return mp_ll_data->getTotalSize(); return 0; } - //! Return all sizes of its axes + //! Returns all sizes of its axes std::vector<size_t> getAllSizes() const; - //! Return copy of raw data vector + //! Returns copy of raw data vector std::vector<T> getRawDataVector() const; //! fill raw array with data void fillRawDataArray(T *destination) const; - //! get sum of all values in the data structure + //! Returns sum of all values in the data structure T totalSum() const; // --------------------------------- @@ -80,25 +80,25 @@ template <class T> class OutputData //! Read-only iterator type typedef OutputDataIterator<const T, const OutputData<T> > const_iterator; - //! Return a read/write iterator that points to the first element + //! Returns read/write iterator that points to the first element iterator begin(); - //! Return a read-only iterator that points to the first element + //! Returns read-only iterator that points to the first element const_iterator begin() const; - //! Return a read/write iterator that points to the one past last element + //! Returns read/write iterator that points to the one past last element iterator end() { return iterator(this, getAllocatedSize()); } - //! Return a read-only iterator that points to the one past last element + //! Returns read-only iterator that points to the one past last element const_iterator end() const { return const_iterator(this, getAllocatedSize()); } - //! get mask that will be used by iterators + //! Returns mask that will be used by iterators Mask *getMask() const { return mp_mask; } - //! set mask (or a stack of masks) + //! Sets mask (or a stack of masks) void setMask(const Mask &mask); - //! add mask that will be used by iterators + //! Adds mask that will be used by iterators void addMask(const Mask &mask); //! Remove all masks @@ -108,44 +108,44 @@ template <class T> class OutputData // coordinate and index functions // --------------------------------- - //! Return vector of coordinates for given index + //! Returns vector of coordinates for given index std::vector<int> toCoordinates(size_t index) const; - //! Return coordinate for given index and axis number + //! Returns coordinate for given index and axis number int toCoordinate(size_t index, size_t i_selected_axis) const; - //! Return index for specified coordinates + //! Returns index for specified coordinates size_t toIndex(std::vector<int> coordinates) const; - //! Return index of axis with given name for given total index + //! Returns index of axis with given name for given total index size_t getIndexOfAxis(const std::string &axis_name, size_t total_index) const; - //! Return value of axis with given name at given index + //! Returns value of axis with given name at given index double getValueOfAxis(const std::string &axis_name, size_t index) const; - //! Return bin of axis with given name and index + //! Returns bin of axis with given name and index Bin1D getBinOfAxis(const std::string &axis_name, size_t index) const; // --------- // modifiers // --------- - //! set object into initial state (no dimensions, data) + //! Sets object into initial state (no dimensions, data) void clear(); - //! set content of output data to specific value + //! Sets content of output data to specific value void setAllTo(const T& value); //! multiply every item of this output data by value void scaleAll(const T& factor); - //! add <rank> axes with indicated sizes + //! Adds <rank> axes with indicated sizes void setAxisSizes(size_t rank, int *n_dims); - //! set new values to raw data vector + //! Sets new values to raw data vector void setRawDataVector(const std::vector<T> &data_vector); - //! set new values to raw data array + //! Sets new values to raw data array void setRawDataArray(const T *source); //! addition-assignment operator for two output data @@ -176,10 +176,10 @@ template <class T> class OutputData // helpers // -------- - //! Return true if object have same dimensions + //! Returns true if object have same dimensions bool hasSameDimensions(const OutputData<T> &right) const; - //! Return true if object have same dimensions and shape of axises + //! Returns true if object have same dimensions and shape of axises bool hasSameShape(const OutputData<T> &right) const; private: //! disabled copy constructor and assignment operators @@ -194,7 +194,6 @@ template <class T> class OutputData Mask *mp_mask; }; - /* ***************************************************************************/ // definitions /* ***************************************************************************/ @@ -541,8 +540,7 @@ template<class T> inline void OutputData<T>::setRawDataArray(const T *source) } } - -//! Return true if object have same dimensions +//! Returns true if object have same dimensions template<class T> inline bool OutputData<T>::hasSameDimensions( const OutputData<T> &right) const { @@ -550,7 +548,7 @@ template<class T> inline bool OutputData<T>::hasSameDimensions( return HaveSameDimensions(*mp_ll_data, *right.mp_ll_data); } -//! Return true if object have same dimensions and shape of axis +//! Returns true if object have same dimensions and shape of axis template<class T> bool OutputData<T>::hasSameShape(const OutputData<T> &right) const { diff --git a/Core/Tools/inc/OutputDataFunctions.h b/Core/Tools/inc/OutputDataFunctions.h index 04d297291a4..99dc6a85dcb 100644 --- a/Core/Tools/inc/OutputDataFunctions.h +++ b/Core/Tools/inc/OutputDataFunctions.h @@ -48,11 +48,11 @@ namespace OutputDataFunctions //! apply intensity function to values stored in output data void applyFunction(OutputData<double> &data, const IIntensityFunction *func); - //! create a rectangular mask based on the given OutputData object and limits + //! Creates a rectangular mask based on the given OutputData object and limits Mask *CreateRectangularMask(const OutputData<double> &data, const double *minima, const double *maxima); Mask *CreateRectangularMask(const OutputData<double> &data, double x1, double y1, double x2, double y2); - //! create a elliptic mask based on the given OutputData object and limits + //! Creates a elliptic mask based on the given OutputData object and limits Mask *CreateEllipticMask(const OutputData<double> &data, const double *center, const double *radii); Mask *CreateEllipticMask(const OutputData<double> &data, double xc, double yc, double rx, double ry); } diff --git a/Core/Tools/inc/OutputDataIterator.h b/Core/Tools/inc/OutputDataIterator.h index 66fe55e104a..518e81da2a1 100644 --- a/Core/Tools/inc/OutputDataIterator.h +++ b/Core/Tools/inc/OutputDataIterator.h @@ -59,19 +59,19 @@ template <class TValue, class TContainer> class OutputDataIterator //! pointer access virtual TValue* operator->() const; - //! get current index + //! Returns current index size_t getIndex() const { return m_current_index; } - //! get container pointer + //! Returns container pointer TContainer *getContainer() const { return mp_output_data; } - //! get mask + //! Returns mask Mask *getMask() const { return mp_mask; } - //! set mask (or a stack of masks) + //! Sets mask (or a stack of masks) void setMask(const Mask &mask); - //! add mask (also resets index to first available element) + //! Adds mask (also resets index to first available element) void addMask(const Mask &mask); // typedefs for std::iterator_traits diff --git a/Core/Tools/inc/OutputDataReader.h b/Core/Tools/inc/OutputDataReader.h index 1c7566b2b6b..e18e8f58ac3 100644 --- a/Core/Tools/inc/OutputDataReader.h +++ b/Core/Tools/inc/OutputDataReader.h @@ -33,7 +33,7 @@ class OutputDataReader // OutputData<double > *getOutputData() { return getOutputData(m_file_name); } OutputData<double > *getOutputData(); - //! set concrete reading strategy + //! Sets concrete reading strategy void setStrategy(IOutputDataReadStrategy *read_strategy) { delete m_read_strategy; m_read_strategy = read_strategy; } private: diff --git a/Core/Tools/inc/OutputDataWriter.h b/Core/Tools/inc/OutputDataWriter.h index 050b26fa04c..f80dfe51074 100644 --- a/Core/Tools/inc/OutputDataWriter.h +++ b/Core/Tools/inc/OutputDataWriter.h @@ -32,7 +32,7 @@ class OutputDataWriter //! write output data to file void writeOutputData(const OutputData<double > &data); - //! set concrete writing strategy + //! Sets concrete writing strategy void setStrategy(IOutputDataWriteStrategy *write_strategy) { delete m_write_strategy; m_write_strategy = write_strategy; } private: diff --git a/Core/Tools/inc/ParameterPool.h b/Core/Tools/inc/ParameterPool.h index e67eab544f3..b6730e1da3d 100644 --- a/Core/Tools/inc/ParameterPool.h +++ b/Core/Tools/inc/ParameterPool.h @@ -45,25 +45,25 @@ class ParameterPool : public ICloneable //! clear and delete parameter map void clear(); - //! return size of parameter container + //! Returns size of parameter container size_t size() const { return m_map.size(); } //! main method to register data address in the pool void registerParameter(const std::string &name, double *parpointer); - //! add parameter to the pool + //! Adds parameter to the pool bool addParameter(const std::string &name, parameter_t par); - //! return parameter with given name + //! Returns parameter with given name parameter_t getParameter(const std::string &name) const; - //! return vector of parameters which fit pattern + //! Returns vector of parameters which fit pattern std::vector<parameter_t > getMatchedParameters(const std::string &wildcards) const; - //! set parameter value, return true in the case of success + //! Sets parameter value, return true in the case of success bool setParameterValue(const std::string &name, double value); - //! set parameter value, return number of changed parameters + //! Sets parameter value, return number of changed parameters int setMatchedParametersValue(const std::string &wildcards, double value); //! link first parameter to second parameter times a scale factor and return number of changed parameters @@ -71,7 +71,7 @@ class ParameterPool : public ICloneable //! prefix/to_change --> prefix/source int fixRatioBetweenParameters(const std::string &to_change, const std::string &source, double ratio); - //! print parameter pool + //! Prints parameter pool friend std::ostream &operator<<(std::ostream &ostr, const ParameterPool &obj) { obj.print(ostr); return ostr; } protected: @@ -79,7 +79,7 @@ class ParameterPool : public ICloneable // ParameterPool(const ParameterPool &other); // ParameterPool &operator=(const ParameterPool &); - //! print parameter pool content + //! Prints parameter pool content virtual void print(std::ostream &ostr) const; parametermap_t m_map; //! map of parameters diff --git a/Core/Tools/inc/ProgramOptions.h b/Core/Tools/inc/ProgramOptions.h index 717a4db4c41..eb8034460b7 100644 --- a/Core/Tools/inc/ProgramOptions.h +++ b/Core/Tools/inc/ProgramOptions.h @@ -40,34 +40,34 @@ class ProgramOptions ProgramOptions(); - //! adding options to the global options list (object is passed by value, so no dependency from object life) + //! Adds options to the global options list (object is passed by value, so no dependency from object life) ProgramOptions &add(bpo::options_description opt) { m_options.add(opt); return *this;} - //! adding positional options + //! Adds positional options ProgramOptions &addPositional(std::string option_name, int num_occurencies) { m_positional_options.add(option_name.c_str(), num_occurencies); return *this;} //! access to variable with given name defined in variables container const bpo::variable_value& operator[] (const std::string &s) const; - //! return true if option with given name has been set + //! Returns true if option with given name has been set bool find(std::string name) const { return (m_variables_map.count(name.c_str()) ? true : false); } - //! return true if options are consistent (no conflicting options, no --help request, config file is parsed) + //! Returns true if options are consistent (no conflicting options, no --help request, config file is parsed) bool isConsistent() const { return m_options_is_consistent; } - //! parsing command line arguments + //! Parses command line arguments void parseCommandLine(int argc, char **argv); - //! parse config file for arguments + //! Parses config file for arguments void parseConfigFile(); - // return reference to the variables container + //! Returns reference to the variables container bpo::variables_map &getVariables() { return m_variables_map; } - // return reference to the options description + //! Returns reference to the options description bpo::options_description &getOptions() { return m_options; } - // return reference to the positional options description + //! Returns reference to the positional options description bpo::positional_options_description &getPositionalOptions() { return m_positional_options; } private: diff --git a/Core/Tools/inc/RealParameterWrapper.h b/Core/Tools/inc/RealParameterWrapper.h index be0198ed118..15cd21df893 100644 --- a/Core/Tools/inc/RealParameterWrapper.h +++ b/Core/Tools/inc/RealParameterWrapper.h @@ -30,7 +30,7 @@ class RealParameterWrapper { RealParameterWrapper &operator=(const RealParameterWrapper &other); ~RealParameterWrapper(){} - //! set value of wrapped parameter and emmit signal + //! Sets value of wrapped parameter and emmit signal void setValue(double value) { checkNull(); @@ -40,16 +40,16 @@ class RealParameterWrapper { } } - //! get value of wrapped parameter + //! Returns value of wrapped parameter double getValue() const { checkNull(); return *m_data; } - //! return true if wrapped parameter was not initialized with proper real value + //! Returns true if wrapped parameter was not initialized with proper real value bool isNull() const { return (m_data ? false : true); } //! throw exception if parameter was not initialized with proper value void checkNull() const { if(isNull()) throw NullPointerException("RealParameterWrapper::getValue() -> Attempt to access uninitialised pointer."); } - //! print the parameter's address to an output stream + //! Prints the parameter's address to an output stream friend std::ostream &operator<<(std::ostream &ostr, const RealParameterWrapper &p) { ostr << p.m_data; return ostr; } private: //! swap function diff --git a/Core/Tools/inc/StochasticSampledParameter.h b/Core/Tools/inc/StochasticSampledParameter.h index 052ab041011..7fc3bd10b20 100644 --- a/Core/Tools/inc/StochasticSampledParameter.h +++ b/Core/Tools/inc/StochasticSampledParameter.h @@ -30,13 +30,13 @@ class StochasticSampledParameter : public StochasticParameter<double> StochasticSampledParameter(const StochasticParameter<double> &par, size_t nbins, int nfwhm=3); virtual ~StochasticSampledParameter(); - //! return radom value of stochastic parameter + //! Returns random value of stochastic parameter virtual void setToRandom() { m_stochastic_parameter->setToRandom(); } - //! return probability density + //! Returns probability density virtual double probabilityDensity(double value) const { return m_stochastic_parameter->probabilityDensity(value); } - //! return x-value for given bin + //! Returns ??-value for given bin double getBinValue(size_t ibin) const { if(ibin < m_nbins ) { @@ -46,12 +46,12 @@ class StochasticSampledParameter : public StochasticParameter<double> } } - //! return probability value for given bin + //! Returns probability value for given bin double probabilityBinDensity(size_t ibin) const { return m_stochastic_parameter->probabilityDensity(getBinValue(ibin)); } - //! get the normalized probability for the given bin + //! Returns the normalized probability for the given bin double getNormalizedProbability(size_t ibin) const; - //! return number of bins + //! Returns number of bins size_t getNbins() const { return m_nbins; } //! clone method diff --git a/Core/Tools/inc/Utils.h b/Core/Tools/inc/Utils.h index 775144ead6b..52697a02b58 100644 --- a/Core/Tools/inc/Utils.h +++ b/Core/Tools/inc/Utils.h @@ -33,7 +33,7 @@ class String //! assuming that string consist of doubles return new string where doubles are rounded according to the precision static std::string round_doubles(const std::string &str, int precision); - //! Return true if text matches pattern with wildcards '*' and '?'. + //! Returns true if text matches pattern with wildcards '*' and '?'. static bool MatchPattern(const std::string &text, std::string wildcardPattern); @@ -53,7 +53,7 @@ class StringUsageMap StringUsageMap(){} ~StringUsageMap(){} - //! add string to the map to count number of times it was used + //! Adds string to the map to count number of times it was used void add(std::string name) { m_current_string = name; @@ -72,7 +72,7 @@ class StringUsageMap iterator_t end() { return m_nstringmap.end(); } int &operator[](std::string name) { return m_nstringmap[name]; } - //! get current string + //! Returns current string std::string get_current() const { return m_current_string; } private: @@ -85,22 +85,22 @@ class StringUsageMap class FileSystem { public: - //! return path to the current (working) directory + //! Returns path to the current (working) directory static std::string GetWorkingPath(); - //! return path to BornAgain home directory + //! Returns path to BornAgain home directory static std::string GetHomePath(); - //! set relative path, which is the path from working directory to executable module. The value is known only from argv[0] and should be set from outside + //! Sets relative path, which is the path from working directory to executable module. The value is known only from argv[0] and should be set from outside static void SetRelativePath(const std::string &path) { m_relative_path = path; } - //! return file extension + //! Returns file extension static std::string GetFileExtension(const std::string &name); - //! return true if name contains *.gz extension + //! Returns true if name contains *.gz extension static bool isGZipped(const std::string &name); - //! return file extension after stripping '.gz' if any + //! Returns file extension after stripping '.gz' if any static std::string GetFileMainExtension(const std::string &name); private: static std::string m_relative_path; //!< it's value of argv[0], i.e. the path from working directory to executable module diff --git a/Core/Tools/src/CoreOptionsDescription.cpp b/Core/Tools/src/CoreOptionsDescription.cpp index fb6c4d47e16..de4c8d16366 100644 --- a/Core/Tools/src/CoreOptionsDescription.cpp +++ b/Core/Tools/src/CoreOptionsDescription.cpp @@ -20,7 +20,7 @@ namespace bpo = boost::program_options; -//! add command line and config file options +//! Adds command line and config file options void AddCoreOptions(ProgramOptions *p_options) { diff --git a/Core/Tools/src/IParameterized.cpp b/Core/Tools/src/IParameterized.cpp index b2bdf2a68bc..6dcb73cf56c 100644 --- a/Core/Tools/src/IParameterized.cpp +++ b/Core/Tools/src/IParameterized.cpp @@ -27,7 +27,7 @@ IParameterized &IParameterized::operator=(const IParameterized &other) return *this; } -//! Create new parameter pool, with all local parameter and parameters of children +//! Creates new parameter pool, with all local parameter and parameters of children //! User has to delete it. //! @@ -39,7 +39,7 @@ ParameterPool *IParameterized::createParameterTree() const return newpool; } -//! Add parameters from local pool to external pool and call recursion over direct children. +//! Adds parameters from local pool to external pool and call recursion over direct children. std::string IParameterized::addParametersToExternalPool( std::string path, ParameterPool *external_pool, int copy_number) const diff --git a/Core/Tools/src/ParameterPool.cpp b/Core/Tools/src/ParameterPool.cpp index 486db5bcfe7..ebe6dd38d22 100644 --- a/Core/Tools/src/ParameterPool.cpp +++ b/Core/Tools/src/ParameterPool.cpp @@ -48,7 +48,7 @@ void ParameterPool::clear() m_map.clear(); } -//! Register parameter with given name. +//! Registers parameter with given name. void ParameterPool::registerParameter(const std::string &name, double *parameter_address) { @@ -79,7 +79,7 @@ void ParameterPool::copyToExternalPool(const std::string &prefix, ParameterPool } } -//! Return parameter with given name. +//! Returns parameter with given name. ParameterPool::parameter_t ParameterPool::getParameter(const std::string &name) const { @@ -91,7 +91,7 @@ ParameterPool::parameter_t ParameterPool::getParameter(const std::string &name) } } -//! Return vector of parameters which fit pattern. +//! Returns vector of parameters which fit pattern. std::vector<ParameterPool::parameter_t > ParameterPool::getMatchedParameters(const std::string &wildcards) const { @@ -113,7 +113,7 @@ std::vector<ParameterPool::parameter_t > ParameterPool::getMatchedParameters(co return selected_parameters; } -//! Set parameter value. +//! Sets parameter value. bool ParameterPool::setParameterValue(const std::string &name, double value) { @@ -127,7 +127,7 @@ bool ParameterPool::setParameterValue(const std::string &name, double value) return true; } -//! Set parameter value. +//! Sets parameter value. int ParameterPool::setMatchedParametersValue(const std::string &wildcards, double value) { @@ -160,7 +160,7 @@ int ParameterPool::fixRatioBetweenParameters(const std::string& to_change, return npars; } -//! Print content on the screen. +//! Prints content on the screen. void ParameterPool::print(std::ostream &ostr) const { diff --git a/Core/Tools/src/Utils.cpp b/Core/Tools/src/Utils.cpp index 18da7182231..8a7aed65472 100644 --- a/Core/Tools/src/Utils.cpp +++ b/Core/Tools/src/Utils.cpp @@ -57,7 +57,7 @@ std::string Utils::String::round_doubles(const std::string &str, int precision) return newline; } -//! Return true if text matches pattern with wildcards '*' and '?'. +//! Returns true if text matches pattern with wildcards '*' and '?'. bool Utils::String::MatchPattern( const std::string &text, std::string wildcardPattern) @@ -99,14 +99,14 @@ std::vector<std::string> Utils::String::Split( return tokens; } -//! Return path to the current (working) directory. +//! Returns path to the current (working) directory. std::string Utils::FileSystem::GetWorkingPath() { return boost::filesystem::current_path().string(); } -//! Return path to BornAgain home directory. +//! Returns path to BornAgain home directory. std::string Utils::FileSystem::GetHomePath() { @@ -141,7 +141,7 @@ std::string Utils::FileSystem::GetHomePath() return path; } -//! Return file extension. +//! Returns file extension. std::string Utils::FileSystem::GetFileExtension(const std::string &name) { @@ -158,7 +158,7 @@ bool Utils::FileSystem::isGZipped(const std::string &name) return false; } -//! Return file main extension (without .gz). +//! Returns file main extension (without .gz). std::string Utils::FileSystem::GetFileMainExtension(const std::string &name) { diff --git a/Fit/Factory/inc/ROOTMinimizer.h b/Fit/Factory/inc/ROOTMinimizer.h index 7f59575b9e7..ede0d0c98c2 100644 --- a/Fit/Factory/inc/ROOTMinimizer.h +++ b/Fit/Factory/inc/ROOTMinimizer.h @@ -65,10 +65,10 @@ class ROOTMinimizer : public IMinimizer virtual size_t getNCalls() const; - //! return created minimizer + //! Returns created minimizer ROOT::Math::Minimizer *getROOTMinimizer() { return m_root_minimizer; } - //! check if type of algorithm is Levenberg-Marquardt or similar + //! Checks if type of algorithm is Levenberg-Marquardt or similar bool isGradientBasedAgorithm(); private: diff --git a/Fit/Factory/inc/ROOTMinimizerHelper.h b/Fit/Factory/inc/ROOTMinimizerHelper.h index a7d4f0b88cf..07463a18b19 100644 --- a/Fit/Factory/inc/ROOTMinimizerHelper.h +++ b/Fit/Factory/inc/ROOTMinimizerHelper.h @@ -31,7 +31,7 @@ class ROOTMinimizerHelper //! translate text with options into appropriate calls of minimizer's set method static void setOptions(ROOT::Math::Minimizer *minimizer, const std::string &options); - //! print results of minimization + //! Prints results of minimization static void printResults(ROOT::Math::Minimizer *minimizer, const std::string &minimizer_name, const std::string &algo_type); @@ -45,13 +45,13 @@ class ROOTMinimizerHelper //! process single command specific for GSL simulated annealing minimizer static bool processCommandGSLSimAn(ROOT::Patch::GSLSimAnMinimizer *, const std::string &command); - //! print minimizer options + //! Prints minimizer options static void printOptions(ROOT::Math::Minimizer *minimizer); - //! print minimizer status + //! Prints minimizer status static void printStatus(ROOT::Math::Minimizer *minimizer); - //! print variables + //! Prints variables static void printVariables(ROOT::Math::Minimizer *minimizer); }; diff --git a/pub/core/Doxyfile b/pub/core/Doxyfile index cddf1fdca5f..a1dd1356e5d 100644 --- a/pub/core/Doxyfile +++ b/pub/core/Doxyfile @@ -482,7 +482,7 @@ SORT_BRIEF_DOCS = YES # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. -SORT_MEMBERS_CTORS_1ST = NO +SORT_MEMBERS_CTORS_1ST = YES # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) @@ -926,7 +926,7 @@ HTML_EXTRA_FILES = # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. -HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_HUE = 270 # default 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use -- GitLab