Stride Reference Manual  - generated for commit 9643b11
RnInfo.h
Go to the documentation of this file.
1 /*
2  * This is free software: you can redistribute it and/or modify it
3  * under the terms of the GNU General Public License as published by
4  * the Free Software Foundation, either version 3 of the License, or
5  * any later version.
6  * The software is distributed in the hope that it will be useful,
7  * but WITHOUT ANY WARRANTY; without even the implied warranty of
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  * GNU General Public License for more details.
10  * You should have received a copy of the GNU General Public License
11  * along with the software. If not, see <http://www.gnu.org/licenses/>.
12  *
13  * Copyright 2018, Kuylen E, Willem L, Broeckhove J
14  */
15 
21 #pragma once
22 
23 #include <iostream>
24 #include <string>
25 
26 namespace stride {
27 namespace util {
28 
32 struct RnInfo
33 {
34  explicit RnInfo(std::string seed_seq_init = "1,2,3,4", std::string state = "", unsigned int stream_count = 1U)
35  : m_seed_seq_init(std::move(seed_seq_init)), m_state(std::move(state)), m_stream_count(stream_count){};
36 
37  std::string m_seed_seq_init;
38  std::string m_state;
39  unsigned int m_stream_count;
40 };
41 
42 inline std::ostream& operator<<(std::ostream& os, const RnInfo& info)
43 {
44  os << "Seed sequence: " << info.m_seed_seq_init << "\n"
45  << "Number of streams: " << info.m_stream_count << "\n"
46  << "State: " << info.m_state;
47  return os;
48 }
49 
50 } // namespace util
51 } // namespace stride
std::string m_seed_seq_init
Seed for the engine.
Definition: RnInfo.h:35
std::ofstream & operator<<(std::ofstream &ofs, const CSV &csv)
Definition: CSV.h:134
STL namespace.
unsigned int m_stream_count
Number of streams set up with the engine.
Definition: RnInfo.h:39
RnInfo(std::string seed_seq_init="1,2,3,4", std::string state="", unsigned int stream_count=1U)
Definition: RnInfo.h:34
Namespace for the simulator and related classes.
Definition: Calendar.cpp:28
std::string m_state
Long string representing current state.
Definition: RnInfo.h:38
Information on random number management state.
Definition: RnInfo.h:32