Mantid
Loading...
Searching...
No Matches
Power.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
13
14namespace Mantid {
15namespace Algorithms {
16
32class MANTID_ALGORITHMS_DLL Power : public UnaryOperation {
33public:
35 Power();
37 const std::string name() const override { return "Power"; }
39 const std::string summary() const override {
40 return "The Power algorithm will raise the base workspace to a particular "
41 "power. Corresponding error values will be created.";
42 }
43
45 int version() const override { return 1; }
46 const std::vector<std::string> seeAlso() const override { return {"Exponential", "Logarithm"}; }
48 const std::string category() const override { return "Arithmetic"; }
49
50private:
51 // Overridden UnaryOperation methods
52 void defineProperties() override;
53 void retrieveProperties() override;
54 void performUnaryOperation(const double XIn, const double YIn, const double EIn, double &YOut, double &EOut) override;
56 inline double calculatePower(const double base, const double exponent);
58 double m_exponent;
59};
60} // namespace Algorithms
61} // namespace Mantid
Provides the ability to raise the values in the workspace to a specified power.
Definition: Power.h:32
const std::string summary() const override
Summary of algorithms purpose.
Definition: Power.h:39
int version() const override
Algorithm's version for identification.
Definition: Power.h:45
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
Definition: Power.h:46
double m_exponent
Exponent to raise the base workspace to.
Definition: Power.h:58
const std::string name() const override
Algorithm's name for identification.
Definition: Power.h:37
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
Definition: Power.h:48
UnaryOperation supports the implementation of a Unary operation on an input workspace.
Helper class which provides the Collimation Length for SANS instruments.