1 // -*- C++ -*- 2 /** 3 * @brief LogNormal distribution with mu and sigma as parameters 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_LOGNORMALMUSIGMA_HXX 22 #define OPENTURNS_LOGNORMALMUSIGMA_HXX 23 24 #include "openturns/DistributionParametersImplementation.hxx" 25 26 BEGIN_NAMESPACE_OPENTURNS 27 28 /** 29 * @class LogNormalMuSigma 30 * 31 */ 32 class OT_API LogNormalMuSigma 33 : public DistributionParametersImplementation 34 { 35 36 CLASSNAME 37 public: 38 39 /** Default constructor */ 40 LogNormalMuSigma(); 41 42 /** Constructor with parameters */ 43 LogNormalMuSigma(const Scalar mu, const Scalar sigma, const Scalar gamma = 0.); 44 45 /** Virtual constructor */ 46 LogNormalMuSigma * clone() const override; 47 48 /** Comparison operator */ 49 Bool operator ==(const LogNormalMuSigma & other) const; 50 51 /** Build a distribution based on a set of native parameters */ 52 Distribution getDistribution() const override; 53 54 /** Compute jacobian / native parameters */ 55 Matrix gradient() const override; 56 57 /** Conversion operator */ 58 Point operator () (const Point & inP) const override; 59 60 Point inverse(const Point & inP) const override; 61 62 /** Parameters value and description accessor */ 63 void setValues(const Point & values) override; 64 Point getValues() const override; 65 Description getDescription() const override; 66 67 /** String converter */ 68 String __repr__() const override; 69 String __str__(const String & offset = "") const override; 70 71 /** Method save() stores the object through the StorageManager */ 72 void save(Advocate & adv) const override; 73 74 /** Method load() reloads the object from the StorageManager */ 75 void load(Advocate & adv) override; 76 77 private: 78 /** The main parameter set of the distribution */ 79 Scalar mu_; 80 Scalar sigma_; 81 Scalar gamma_; 82 }; /* class LogNormalMuSigma */ 83 84 85 END_NAMESPACE_OPENTURNS 86 87 #endif /* OPENTURNS_LOGNORMALMUSIGMA_HXX */ 88