1+ /*
2+ * This file is part of the GreasePad distribution (https://github.com/FraunhoferIOSB/GreasePad).
3+ * Copyright (c) 2022-2026 Jochen Meidow, Fraunhofer IOSB
4+ *
5+ * This program is free software: you can redistribute it and/or modify
6+ * it under the terms of the GNU General Public License as published by
7+ * the Free Software Foundation, either version 3 of the License, or
8+ * (at your option) any later version.
9+ *
10+ * This program is distributed in the hope that it will be useful,
11+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+ * GNU General Public License for more details.
14+ *
15+ * You should have received a copy of the GNU General Public License
16+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17+ */
18+
119#ifndef PROB_H
220#define PROB_H
321
@@ -9,15 +27,15 @@ namespace Stats {
927class Prob
1028{
1129public:
12- explicit Prob ( const double P) : P (P) {
30+ explicit Prob ( const double P) : m_P (P) {
1331 assert ( P>=0 );
1432 assert ( P<=1 );
1533 }
16- double operator ()() const { return P ; } // !< get value
17- [[nodiscard]] Prob complement () const { return Prob (1 -P ); } // !< 1-P
34+ double operator ()() const { return m_P ; } // !< get value
35+ [[nodiscard]] Prob complement () const { return Prob (1 -m_P ); } // !< 1-P
1836
1937private:
20- double P ; // probability [0,1]
38+ double m_P ; // probability [0,1]
2139};
2240
2341} // namespace Stats
0 commit comments