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::Revision::TestNetworkD Struct Reference

Public Types

using vertex = boost::graph_traits< NetworkDirected >::vertex_descriptor
 

Public Member Functions

 TestNetworkD ()
 

Public Attributes

NetworkDirected nw
 
vertex v1 = boost::add_vertex(nw)
 
vertex v2 = boost::add_vertex(nw)
 
vertex v3 = boost::add_vertex(nw)
 
vertex v4 = boost::add_vertex(nw)
 
vertex v5 = boost::add_vertex(nw)
 
vertex v6 = boost::add_vertex(nw)
 
const double weighting = 1.5
 

Member Typedef Documentation

◆ vertex

Constructor & Destructor Documentation

◆ TestNetworkD()

Utopia::Models::Opinionet::Revision::TestNetworkD::TestNetworkD ( )
inline
33 {
34 boost::add_edge(v1, v2, nw);
35 boost::add_edge(v1, v3, nw);
36 boost::add_edge(v1, v4, nw);
37 boost::add_edge(v1, v6, nw);
38 int i = 2;
39 for (const auto v : range<IterateOver::vertices>(nw)) {
40 nw[v].opinion = i;
41 ++i;
42 }
43 for (const auto v : range<IterateOver::vertices>(nw)) {
45 }
46 }
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
IterateOver
Over which graph entity to iterate.
Definition iterator.hh:19
decltype(auto) range(const Graph &g)
Get the iterator range over selected graph entities.
Definition iterator.hh:149
@ vertices
Iterate over vertices.
void set_and_normalize_weights(const VertexDescType v, NWType &nw, const double weighting)
Set and normalize weights according to opinion difference.
Definition utils.hh:102
vertex v2
Definition test_revision.cc:25
vertex v4
Definition test_revision.cc:27
const double weighting
Definition test_revision.cc:31
vertex v6
Definition test_revision.cc:29
NetworkDirected nw
Definition test_revision.cc:23
vertex v3
Definition test_revision.cc:26
vertex v1
Definition test_revision.cc:24

Member Data Documentation

◆ nw

NetworkDirected Utopia::Models::Opinionet::Revision::TestNetworkD::nw

◆ v1

vertex Utopia::Models::Opinionet::Revision::TestNetworkD::v1 = boost::add_vertex(nw)

◆ v2

vertex Utopia::Models::Opinionet::Revision::TestNetworkD::v2 = boost::add_vertex(nw)

◆ v3

vertex Utopia::Models::Opinionet::Revision::TestNetworkD::v3 = boost::add_vertex(nw)

◆ v4

vertex Utopia::Models::Opinionet::Revision::TestNetworkD::v4 = boost::add_vertex(nw)

◆ v5

vertex Utopia::Models::Opinionet::Revision::TestNetworkD::v5 = boost::add_vertex(nw)

◆ v6

vertex Utopia::Models::Opinionet::Revision::TestNetworkD::v6 = boost::add_vertex(nw)

◆ weighting

const double Utopia::Models::Opinionet::Revision::TestNetworkD::weighting = 1.5

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