Utopia 2
Framework for studying models of complex & adaptive systems.
Loading...
Searching...
No Matches
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
14namespace Utopia {
15
17using DefaultRNG = std::mt19937;
18
19
21template<typename EntityType>
22using EntityContainer = std::vector<std::shared_ptr<EntityType>>;
23
25template<typename CellType>
27
29template<typename AgentType>
31
32
34using DimType = unsigned short;
35
37using DistType = unsigned int;
38
40using IndexType = std::size_t;
41
43using IndexContainer = std::vector<IndexType>;
44
46
52template<DimType dim>
53using MultiIndexType = arma::Col<IndexType>::fixed<dim>;
54
56
60template<DimType dim>
61using SpaceVecType = arma::Col<double>::fixed<dim>;
62
63// .. DataIO types that are needed throughout Core ............................
64namespace DataIO {
71using 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
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
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