Leviathan_no_group
|
#include <Leviathan.h>
Public Member Functions | |
Agent (Leviathan *father, IdAgent agent_) | |
void | init (unsigned int nbAgents) |
IdAgent | gossipToWho () |
void | updateOpinions () |
float | getOpinion (IdAgent other) |
Public Attributes | |
Leviathan * | dady |
IdAgent | id |
std::vector< float > | opinions |
std::vector< float > | deltaOpinions |
std::vector< IdAgent > | listGossip |
IdAgent | directInteraction |
float | influenceOther |
std::vector< IdAgent > | gossipAbout |
unsigned int | countGossipAbout |
An agent contain the opinions all the opinions of the agent
|
inline |
|
inline |
return the opinion of the agent about other
other | the id of the other agent |
IdAgent Agent::gossipToWho | ( | ) |
Choose and return one agent to gossip about
void Agent::init | ( | unsigned int | nbAgents | ) |
Must be call after the construction of all agents in dady
nbAgents | the number of agent in dady |
void Agent::updateOpinions | ( | ) |
Update all the opinions (with deltaOpinions)
unsigned int Agent::countGossipAbout |
just a counter to speed up the choice of the agent to gossip about
std::vector<float> Agent::deltaOpinions |
change of opinion about the agents (for the current step)
IdAgent Agent::directInteraction |
agent of the direct interaction (for the current step)
std::vector<IdAgent> Agent::gossipAbout |
just a vector to speed up the choice of the agent to gossip about
IdAgent Agent::id |
id of the agent
float Agent::influenceOther |
influence (p) of the other agent in the direct interaction (for the current step)
std::vector<IdAgent> Agent::listGossip |
agents the gossip (for the current step)
std::vector<float> Agent::opinions |
opinions about the agent