Mantid
Loading...
Searching...
No Matches
InterpolationOption.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2016 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#include "MantidAlgorithms/DllConfig.h"
10#include <memory>
11#include <string>
12
13namespace Mantid {
14namespace HistogramData {
15class Histogram;
16}
17namespace Kernel {
18class Property;
19}
20namespace Algorithms {
21
26class MANTID_ALGORITHMS_DLL InterpolationOption {
27public:
28 // Indices must match the order in static string array
29 enum class Value : uint8_t { Linear, CSpline };
30
31 void set(const Value &kind, const bool calculateErrors, const bool independentErrors);
32 void set(const std::string &kind, const bool calculateErrors, const bool independentErrors);
33
34 std::unique_ptr<Kernel::Property> property() const;
35 std::string propertyDoc() const;
36 std::string validateInputSize(const size_t size) const;
37
38 void applyInplace(HistogramData::Histogram &inOut, size_t stepSize) const;
39 void applyInPlace(const HistogramData::Histogram &in, HistogramData::Histogram &out) const;
40
41private:
42 Value m_value = Value::Linear;
45};
46
47} // namespace Algorithms
48} // namespace Mantid
const std::string & m_value
Definition: Algorithm.cpp:71
Kind kind
The kind of the point: either openning or closing the range.
Definition: FitMW.cpp:49
Class to provide a consistent interface to an interpolation option on algorithms.
Helper class which provides the Collimation Length for SANS instruments.