RandomVector.hpp
Go to the documentation of this file.
1/*
2 Copyright 2016 SINTEF ICT, Applied Mathematics.
3 Copyright 2016 Statoil ASA.
4
5 This file is part of the Open Porous Media Project (OPM).
6
7 OPM is free software: you can redistribute it and/or modify
8 it under the terms of the GNU 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 OPM 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 General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with OPM. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef OPM_RANDOMVECTOR_HEADER_INCLUDED
22#define OPM_RANDOMVECTOR_HEADER_INCLUDED
23
24#include <memory>
25#include <vector>
26
27namespace Opm
28{
30 {
31 public:
32 using Sample = std::vector<double>;
33 using Size = Sample::size_type;
34
37
38 RandomVector(const RandomVector& rhs) = delete;
39 RandomVector(RandomVector&& rhs) = delete;
40
41 RandomVector& operator=(const RandomVector& rhs) = delete;
43
45 const double mean = 0.0,
46 const double stdev = 1.0);
47
48 std::vector<int> index(const Size n,
49 const int maxIdx);
50
51 private:
52 class Impl;
53
54 std::unique_ptr<Impl> pImpl_;
55 };
56
57} // namespace Opm
58
59#endif // OPM_RANDOMVECTOR_HEADER_INCLUDED
Definition: RandomVector.hpp:30
Sample::size_type Size
Definition: RandomVector.hpp:33
std::vector< int > index(const Size n, const int maxIdx)
std::vector< double > Sample
Definition: RandomVector.hpp:32
RandomVector & operator=(RandomVector &&rhs)=delete
RandomVector & operator=(const RandomVector &rhs)=delete
Sample normal(const Size n, const double mean=0.0, const double stdev=1.0)
RandomVector(RandomVector &&rhs)=delete
RandomVector(const RandomVector &rhs)=delete
Definition: A.hpp:4