Debian Codegraph @

src/atlas/interpolation/nonlinear/Missing.h

raw
1 /*
2 * (C) Copyright 1996- ECMWF.
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 * In applying this licence, ECMWF does not waive the privileges and immunities
8 * granted to it by virtue of its status as an intergovernmental organisation nor
9 * does it submit to any jurisdiction.
10 */
11
12
13 #pragma once
14
15 #include "atlas/interpolation/nonlinear/NonLinear.h"
16
17
18 namespace atlas {
19 namespace interpolation {
20 namespace nonlinear {
21
22
23 struct Missing : NonLinear {
24 private:
25 bool applicable(const Field& f) const override;
26 };
27
28
29 struct MissingIfAllMissing : Missing {
30 bool execute(NonLinear::Matrix& W, const Field& field) const override;
31
32 bool execute(NonLinear::Matrix& W, const array::Array&, const Config&) const override;
33
34 template<typename T>
35 bool executeT(NonLinear::Matrix& W, const array::Array&, const Config&) const;
36
37 static std::string static_type() { return "missing-if-all-missing"; }
38 };
39
40
41 struct MissingIfAnyMissing : Missing {
42 bool execute(NonLinear::Matrix& W, const Field& field) const override;
43
44 bool execute(NonLinear::Matrix& W, const array::Array&, const Config&) const override;
45
46 template<typename T>
47 bool executeT(NonLinear::Matrix& W, const array::Array&, const Config&) const;
48
49 static std::string static_type() { return "missing-if-any-missing"; }
50 };
51
52
53 struct MissingIfHeaviestMissing : Missing {
54 bool execute(NonLinear::Matrix& W, const Field& field) const override;
55
56 bool execute(NonLinear::Matrix& W, const array::Array&, const Config&) const override;
57
58 template<typename T>
59 bool executeT(NonLinear::Matrix& W, const array::Array&, const Config&) const;
60
61 static std::string static_type() { return "missing-if-heaviest-missing"; }
62 };
63
64 } // namespace nonlinear
65 } // namespace interpolation
66 } // namespace atlas