Utopia
2
Framework for studying models of complex & adaptive systems.
|
Classes | |
struct | TestNetworkD |
struct | TestNetworkU |
Functions | |
template<typename NWType , typename VertexDescType > | |
void | update_opinion_HK (const VertexDescType v, NWType &nw, const double susceptibility, const double tolerance, const Opinion_space_type opinion_space) |
Hegselmann-Krause opinion update function. More... | |
template<typename NWType , typename RNGType , typename VertexDescType > | |
void | update_opinion_Deffuant (const VertexDescType v, NWType &nw, const double susceptibility, const double tolerance, const Opinion_space_type opinion_space, std::uniform_real_distribution< double > &prob_distr, RNGType &rng) |
Deffuant opinion update function. More... | |
template<typename NWType , typename RNGType > | |
void | rewire_random_edge (NWType &nw, const double tolerance, const double weighting, RNGType &rng) |
template<typename NWType , typename RNGType > | |
void | revision (NWType &nw, const double susceptibility, const double tolerance, const double weighting, const Interaction_type interaction, const Opinion_space_type opinion_space, const Rewiring rewire, std::uniform_real_distribution< double > &prob_distr, RNGType &rng) |
Performs an opinion update and edge rewiring (if enabled). More... | |
BOOST_FIXTURE_TEST_CASE (test_opinion_update_HK_u, TestNetworkU) | |
BOOST_FIXTURE_TEST_CASE (test_opinion_update_HK_d, TestNetworkD, *boost::unit_test::tolerance(0.0001)) | |
BOOST_FIXTURE_TEST_CASE (test_rewiring_u, TestNetworkU) | |
BOOST_FIXTURE_TEST_CASE (test_rewiring_d, TestNetworkD) | |
BOOST_FIXTURE_TEST_CASE (test_opinion_update_D_c, TestNetworkD, *boost::unit_test::tolerance(0.05)) | |
BOOST_FIXTURE_TEST_CASE (test_opinion_update_D_d, TestNetworkU, *boost::unit_test::tolerance(0.05)) | |
Variables | |
std::mt19937 | rng {} |
– Type definitions ----------------------------------------------------— More... | |
std::uniform_real_distribution< double > | prob_distr |
Utopia::Models::Opinionet::Revision::BOOST_FIXTURE_TEST_CASE | ( | test_opinion_update_D_c | , |
TestNetworkD | , | ||
* | boost::unit_test::tolerance0.05 | ||
) |
Utopia::Models::Opinionet::Revision::BOOST_FIXTURE_TEST_CASE | ( | test_opinion_update_D_d | , |
TestNetworkU | , | ||
* | boost::unit_test::tolerance0.05 | ||
) |
Utopia::Models::Opinionet::Revision::BOOST_FIXTURE_TEST_CASE | ( | test_opinion_update_HK_d | , |
TestNetworkD | , | ||
* | boost::unit_test::tolerance0.0001 | ||
) |
Utopia::Models::Opinionet::Revision::BOOST_FIXTURE_TEST_CASE | ( | test_opinion_update_HK_u | , |
TestNetworkU | |||
) |
Utopia::Models::Opinionet::Revision::BOOST_FIXTURE_TEST_CASE | ( | test_rewiring_d | , |
TestNetworkD | |||
) |
Utopia::Models::Opinionet::Revision::BOOST_FIXTURE_TEST_CASE | ( | test_rewiring_u | , |
TestNetworkU | |||
) |
void Utopia::Models::Opinionet::Revision::revision | ( | NWType & | nw, |
const double | susceptibility, | ||
const double | tolerance, | ||
const double | weighting, | ||
const Interaction_type | interaction, | ||
const Opinion_space_type | opinion_space, | ||
const Rewiring | rewire, | ||
std::uniform_real_distribution< double > & | prob_distr, | ||
RNGType & | rng | ||
) |
Performs an opinion update and edge rewiring (if enabled).
void Utopia::Models::Opinionet::Revision::rewire_random_edge | ( | NWType & | nw, |
const double | tolerance, | ||
const double | weighting, | ||
RNGType & | rng | ||
) |
Selects a random edge. If the opinion distance of the source and target exceeds the tolerance, the edge is rewired to a random target.
void Utopia::Models::Opinionet::Revision::update_opinion_Deffuant | ( | const VertexDescType | v, |
NWType & | nw, | ||
const double | susceptibility, | ||
const double | tolerance, | ||
const Opinion_space_type | opinion_space, | ||
std::uniform_real_distribution< double > & | prob_distr, | ||
RNGType & | rng | ||
) |
Deffuant opinion update function.
void Utopia::Models::Opinionet::Revision::update_opinion_HK | ( | const VertexDescType | v, |
NWType & | nw, | ||
const double | susceptibility, | ||
const double | tolerance, | ||
const Opinion_space_type | opinion_space | ||
) |
Hegselmann-Krause opinion update function.
std::uniform_real_distribution<double> Utopia::Models::Opinionet::Revision::prob_distr |
std::mt19937 Utopia::Models::Opinionet::Revision::rng {} |
– Type definitions ----------------------------------------------------—