VPTissue Reference Manual
Main Page
Namespaces
Classes
Files
File List
RandomEngineType.h
Go to the documentation of this file.
1
#ifndef RANDOM_ENGINE_TYPE_H_INCLUDED
2
#define RANDOM_ENGINE_TYPE_H_INCLUDED
3
/*
4
* Copyright 2011-2016 Universiteit Antwerpen
5
*
6
* Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7
* the European Commission - subsequent versions of the EUPL (the "Licence");
8
* You may not use this work except in compliance with the Licence.
9
* You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the Licence is distributed on an "AS IS" basis,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the Licence for the specific language governing
15
* permissions and limitations under the Licence.
16
*/
22
#include <string>
23
24
namespace
SimPT_Sim
{
25
namespace
RandomEngineType {
26
28
struct
Info
29
{
30
Info
() : seed(0), state(
""
), type(
""
) {};
31
unsigned
int
seed;
32
std::string state;
33
std::string type;
34
35
};
36
38
enum class
TypeId
{
39
// We are using a sensible subset of engines provided by the trng library
40
lcg64, lcg64_shift, mrg2, mrg3, yarn2, yarn3
41
42
// Before using Tina's RNG std C++ random engines were used. They are
43
// listed here in comment as a reference:
44
// minstd_rand0, minstd_rand, mt19937, mt19937_64, ranlux24_base,
45
// ranlux48_base, knuth_b
46
};
47
49
bool
IsExisting
(std::string s);
50
52
bool
IsExisting
(
TypeId
b);
53
55
std::string
ToString
(
TypeId
b);
56
58
TypeId
FromString
(std::string s);
59
60
}
// namespace
61
}
// namespace
62
63
#endif // end-of-include-guard
SimPT_Sim::RandomEngineType::ToString
string ToString(TypeId b)
Convert a type id to corresponding name.
Definition:
RandomEngineType.cpp:62
SimPT_Sim::RandomEngineType::FromString
TypeId FromString(string s)
Convert a string with name to type id.
Definition:
RandomEngineType.cpp:71
SimPT_Sim
Namespace for the core simulator.
Definition:
CellDivider.cpp:183
SimPT_Sim::RandomEngineType::TypeId
TypeId
Enumerates type ids.
Definition:
RandomEngineType.h:38
SimPT_Sim::RandomEngineType::Info
Info.
Definition:
RandomEngineType.h:28
SimPT_Sim::RandomEngineType::IsExisting
bool IsExisting(std::string s)
Check whether type with name s exists.
Definition:
RandomEngineType.cpp:52
src
main
cpp_sim
math
RandomEngineType.h
Generated on Thu Apr 20 2017 14:51:27 for VPTissue Reference Manual by
1.8.10