1 //                                               -*- C++ -*-
2 /**
3  *  @brief This an abstract class for 1D function factories
4  *
5  *  Copyright 2005-2021 Airbus-EDF-IMACS-ONERA-Phimeca
6  *
7  *  This library is free software: you can redistribute it and/or modify
8  *  it under the terms of the GNU Lesser General Public License as published by
9  *  the Free Software Foundation, either version 3 of the License, or
10  *  (at your option) any later version.
11  *
12  *  This library is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU Lesser General Public License for more details.
16  *
17  *  You should have received a copy of the GNU Lesser General Public License
18  *  along with this library.  If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 #ifndef OPENTURNS_ORTHOGONALUNIVARIATEFUNCTIONFACTORY
22 #define OPENTURNS_ORTHOGONALUNIVARIATEFUNCTIONFACTORY
23 
24 #include "openturns/UniVariateFunctionFactory.hxx"
25 #include "openturns/Distribution.hxx"
26 
27 BEGIN_NAMESPACE_OPENTURNS
28 
29 
30 
31 /**
32  * @class OrthogonalUniVariateFunctionFactory
33  *
34  * This an abstract class for 1D function factories
35  */
36 
37 class OT_API OrthogonalUniVariateFunctionFactory
38   : public UniVariateFunctionFactory
39 {
40   CLASSNAME
41 
42 public:
43 
44   enum ParameterSet { ANALYSIS, PROBABILITY };
45 
46   /** Constructor */
47   explicit OrthogonalUniVariateFunctionFactory(const Distribution & measure);
48 
49   /** Virtual constructor */
50   OrthogonalUniVariateFunctionFactory * clone() const override;
51 
52   /** String converter */
53   String __repr__() const override;
54 
55   /** Measure accessor */
56   Distribution getMeasure() const;
57 
58   /** Method save() stores the object through the StorageManager */
59   void save(Advocate & adv) const override;
60 
61   /** Method load() reloads the object from the StorageManager */
62   void load(Advocate & adv) override;
63 
64 protected:
65 
66   friend class Factory<OrthogonalUniVariateFunctionFactory>;
67 
68   /** Default constructor */
69   OrthogonalUniVariateFunctionFactory();
70 
71   /** The distribution of the particular Orthonormal polynomial */
72   Distribution measure_;
73 
74 } ; /* class OrthogonalUniVariateFunctionFactory */
75 
76 
77 END_NAMESPACE_OPENTURNS
78 
79 #endif /* OPENTURNS_ORTHOGONALUNIVARIATEFUNCTIONFACTORY */
80