MaMiCo 1.2
Loading...
Searching...
No Matches
RandomNumberService.h
1// Copyright (C) 2015 Technische Universitaet Muenchen
2// This file is part of the Mamico project. For conditions of distribution
3// and use, please see the copyright notice in Mamico's main folder, or at
4// www5.in.tum.de/mamico
5#ifndef _MOLECULARDYNAMICS_SERVICES_RANDOMNUMBERSERVICE_H_
6#define _MOLECULARDYNAMICS_SERVICES_RANDOMNUMBERSERVICE_H_
7
8#include "tarch/TarchDefinitions.h"
9#include "tarch/la/Vector.h"
10#include <cmath>
11#include <cstdlib>
12#include <iostream>
13
14namespace tarch {
15namespace utils {
17}
18} // namespace tarch
19
24public:
25 static RandomNumberService& getInstance();
26
27 void init(bool fixSeed = false);
28
29 void shutdown();
30
32 double getUniformRandomNumber() const;
33
36
37private:
38 RandomNumberService() {}
40
41 tarch::la::Vector<2, double> _randomNumbers;
42
43 bool _isFirstRandomNumber;
44 bool _isInitialized{false};
45};
46#endif // _MOLECULARDYNAMICS_SERVICES_RANDOMNUMBERSERVICE_H_
Definition Vector.h:24
Definition RandomNumberService.h:23
Definition Configuration.h:11