IODA Bundle
Variables/Transforms/OffsetTransform.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020 NOAA/NWS/NCEP/EMC
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
8 #pragma once
9 
10 #include "Transform.h"
11 
12 
13 namespace Ingester
14 {
15  /// \brief Transforms data by adding an offset to it.
16  class OffsetTransform : public Transform
17  {
18  public:
19  /// \brief Constructor
20  /// \param offset The value to add.
21  explicit OffsetTransform(const double offset);
22  ~OffsetTransform() = default;
23 
24  /// \brief Modify data according to the rules of the transform.
25  /// \param array Array of data to modify.
26  void apply(IngesterArray& array) override;
27 
28  private:
29  const double offset_;
30  };
31 } // namespace Ingester
void apply(IngesterArray &array) override
Modify data according to the rules of the transform.
OffsetTransform(const double offset)
Constructor.
Eigen::Array< FloatType, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > IngesterArray
Definition: IngesterTypes.h:19