Utopia 2
Framework for studying models of complex & adaptive systems.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
Utopia::Models::Opinionet::Utils::TestNetworkD Struct Reference
Inheritance diagram for Utopia::Models::Opinionet::Utils::TestNetworkD:
Inheritance graph
[legend]
Collaboration diagram for Utopia::Models::Opinionet::Utils::TestNetworkD:
Collaboration graph
[legend]

Public Types

using vertex = boost::graph_traits< NetworkDirected >::vertex_descriptor
 
- Public Types inherited from Utopia::TestTools::BaseInfrastructure< RNGType >
using RNG = RNGType
 The random number generator type to use.
 
using Config = DataIO::Config
 Make the config type more easily available.
 

Public Member Functions

 TestNetworkD ()
 
- Public Member Functions inherited from Utopia::Models::Opinionet::Utils::Infrastructure
 Infrastructure ()
 
- Public Member Functions inherited from Utopia::TestTools::BaseInfrastructure< RNGType >
 BaseInfrastructure (const std::string &config_file_path="")
 Construct the BaseInfrastructure fixture.
 
 ~BaseInfrastructure ()
 Destruct the BaseInfrastructure fixture, tearing down the test logger.
 

Public Attributes

NetworkDirected nw
 
- Public Attributes inherited from Utopia::TestTools::BaseInfrastructure< RNGType >
const Config cfg
 The test configuration.
 
std::shared_ptr< spdlog::logger > log
 A logger to use during the test or to pass to entities that need it.
 
std::shared_ptr< RNGrng
 The shared random number generator instance, randomly seeded.
 

Member Typedef Documentation

◆ vertex

Constructor & Destructor Documentation

◆ TestNetworkD()

Utopia::Models::Opinionet::Utils::TestNetworkD::TestNetworkD ( )
inline
47 :
48 nw{}
49 {
50 const unsigned num_vertices = get_as<int>(
51 "num_vertices", cfg["nw_params"]
52 );
53 const unsigned num_edges = get_as<int>("num_edges", cfg["nw_params"]);
54 boost::generate_random_graph(
55 nw, num_vertices, num_edges, *rng, false, false
56 );
57 }
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
NetworkDirected nw
Definition test_utils.cc:45
const Config cfg
The test configuration.
Definition fixtures.hh:40
std::shared_ptr< RNG > rng
The shared random number generator instance, randomly seeded.
Definition fixtures.hh:46

Member Data Documentation

◆ nw

NetworkDirected Utopia::Models::Opinionet::Utils::TestNetworkD::nw

The documentation for this struct was generated from the following file: