Utopia  2
Framework for studying models of complex & adaptive systems.
types.hh
Go to the documentation of this file.
1 #ifndef UTOPIA_CORE_TYPES_HH
2 #define UTOPIA_CORE_TYPES_HH
3 
4 #include <cstdint>
5 #include <vector>
6 #include <memory>
7 #include <random>
8 #include <array>
9 
10 #include <armadillo>
11 #include <yaml-cpp/yaml.h>
12 
13 
14 namespace Utopia {
15 
17 using DefaultRNG = std::mt19937;
18 
19 
21 template<typename EntityType>
22 using EntityContainer = std::vector<std::shared_ptr<EntityType>>;
23 
25 template<typename CellType>
27 
29 template<typename AgentType>
31 
32 
34 using DimType = unsigned short;
35 
37 using DistType = unsigned int;
38 
40 using IndexType = std::size_t;
41 
43 using IndexContainer = std::vector<IndexType>;
44 
46 
52 template<DimType dim>
53 using MultiIndexType = arma::Col<IndexType>::fixed<dim>;
54 
56 
60 template<DimType dim>
61 using SpaceVecType = arma::Col<double>::fixed<dim>;
62 
63 // .. DataIO types that are needed throughout Core ............................
64 namespace DataIO {
71 using Config = YAML::Node;
72 
73 // end group ConfigUtilities
77 } // namespace DataIO
78 
81 
82 
83 } // namespace Utopia
84 
85 #endif // UTOPIA_CORE_TYPES_HH
YAML::Node Config
Type of a variadic dictionary-like data structure used throughout Utopia.
Definition: types.hh:71
Definition: agent.hh:11
DataIO::Config Config
Type of a variadic dictionary-like data structure used throughout Utopia.
Definition: types.hh:80
std::mt19937 DefaultRNG
Type of default random number generator.
Definition: types.hh:17
EntityContainer< AgentType > AgentContainer
Type of the variably sized container for agents.
Definition: types.hh:30
arma::Col< double >::fixed< dim > SpaceVecType
Type for vector-like data that is associated with a physical space.
Definition: types.hh:61
arma::Col< IndexType >::fixed< dim > MultiIndexType
Type for index type vectors that are associated with a physical space.
Definition: types.hh:53
std::vector< std::shared_ptr< EntityType > > EntityContainer
Type of the variably sized container for entities.
Definition: types.hh:22
std::vector< IndexType > IndexContainer
Type for container of indices.
Definition: types.hh:43
unsigned short DimType
Type for dimensions, i.e. very small unsigned integers.
Definition: types.hh:34
unsigned int DistType
Type for distancens, i.e. intermediately long unsigned integers.
Definition: types.hh:37
EntityContainer< CellType > CellContainer
Type of the variably sized container for cells.
Definition: types.hh:26
std::size_t IndexType
Type for indices, i.e. values used for container indexing, agent IDs, ...
Definition: types.hh:40