Construct version 5.4.4
An agent based modeling framework
|
Implements the default_media_user that handles both followers and emotions. More...
Public Member Functions | |
void | parse (media_event *_event) override |
void | reply (media_event *_event) override |
void | quote (media_event *_event) override |
void | repost (media_event *_event) override |
void | enrich_event (media_event *_event) override |
void | generate_post_events () override |
unsigned int | get_read_count () override |
unsigned int | get_knowledge_selection () override |
void | add_mentions (media_event *_event) override |
bool | follow_user (unsigned int alter_agent_index) override |
bool | unfollow_user (unsigned int alter_agent_index) override |
bool | respond_to_follow (unsigned int alter_agent_index) override |
unsigned int | consider_recommendations () override |
float | get_charisma () override |
default_media_user (Social_Media_no_followers *media, const Node &node) | |
Public Member Functions inherited from Social_Media_with_followers::default_media_user | |
default_media_user (Social_Media_no_followers *media, const Node &node) | |
Constructor that takes the media pointer this user is apart of and the iterator containing all the required node attributes. More... | |
Social_Media_with_followers & | media () |
void | enrich_event (media_event *_event) override |
Uses default_media_user::add_mentions to add mentions to all non-reposts and calls the base function. More... | |
virtual void | add_mentions (media_event *post) |
Mentions are added to the event by randomly selecting a followee. More... | |
bool | follow_user (unsigned int alter_agent_index) override |
Returns true if this user decides to follow an agent when called. More... | |
bool | unfollow_user (unsigned int alter_agent_index) override |
Returns true if this user decides to unfollow an agent when called. More... | |
bool | respond_to_follow (unsigned int alter_agent_index) override |
Returns the value of default_media_user::auto_follow. More... | |
unsigned int | consider_recommendations (void) override |
Draws a poisson number with mean value of default_media_user::pdaf. More... | |
float | get_charisma () override |
Returns default_media_user::charisma. More... | |
Public Member Functions inherited from Social_Media_no_followers::default_media_user | |
default_media_user (Social_Media_no_followers *reddit, const Node &node) | |
Constructor that takes the media pointer this user is apart of and the iterator containing all the required node attributes. More... | |
Social_Media_no_followers & | media () |
void | parse (media_event *_event) |
The parsed event is checked to ensure it contains knowledge More... | |
void | reply (media_event *_event) |
With proabability default_media_user::pr creates a reply to the event. More... | |
void | quote (media_event *_event) |
With proabability default_media_user::pqu creates a quote to the event. More... | |
void | repost (media_event *_event) |
With proabability default_media_user::prp creates a quote to the event. More... | |
void | generate_post_events (void) |
The user adds a number of post events based on default_media_user::pdp. More... | |
unsigned int | get_read_count (void) |
The user reads a number of events based on default_media_user::pdread. More... | |
virtual void | enrich_event (media_event *_event) |
Enirches the event with information. More... | |
virtual unsigned int | get_knowledge_selection (void) |
Called during media_user::generate_post_events to choose which piece of knowledge to add to a media_event. More... | |
std::set< media_event * > | read (media_event *read_event) |
Collects all events an agent will parse when reading an event. More... | |
Public Member Functions inherited from Social_Media_no_followers::media_user | |
Random & | random () |
media_user (Social_Media_no_followers *media) | |
virtual | ~media_user () |
virtual void | parse (media_event *read_event)=0 |
Called during Social_Media_no_followers::communicate when an agent parses an event. This function is called once for every message. More... | |
virtual void | reply (media_event *read_event)=0 |
Called after media_user::parse only if this agent posseses the knowledge in the read event. This function should create a reply based on the implementation's conditions. More... | |
virtual void | quote (media_event *read_event)=0 |
Called after media_user::parse only if this agent posseses the knowledge in the read event. This function should create a quote based on the implementation's conditions. More... | |
virtual void | repost (media_event *read_event)=0 |
Called after media_user::parse only if this agent posseses the knowledge in the read event and read_event::type equals media_event::event_types::post. This function should create a repost based on the implementation's conditions. More... | |
virtual void | generate_post_events (void)=0 |
Called during Social_Media_no_followers::think. Function should generate post events using Social_Media_no_followers::create_post. More... | |
virtual unsigned int | get_read_count (void)=0 |
Called during Social_Media_no_followers::think to determine how many events to read in a user's feed. More... | |
virtual std::set< media_event * > | read (media_event *read_event)=0 |
Called during Social_Media_no_followers::think to determine which other events should be added to an InteractionMessage in addition to the read event. More... | |
virtual bool | follow_user (unsigned int alter_agent_index)=0 |
Returns true if this user decides to follow an agent More... | |
virtual bool | unfollow_user (unsigned int alter_agent_index)=0 |
Returns true if this user decides to unfollow an agent More... | |
virtual bool | respond_to_follow (unsigned int alter_agent_index)=0 |
An alter has decided to follow this user and can decide to reciprocate that following. More... | |
virtual unsigned int | consider_recommendations (void)=0 |
Returns how many agents should be considered to be followed in Social_Media_with_followers::add_followees More... | |
virtual float | get_charisma ()=0 |
Returns the user's charisma or how likable the user is independent of other user attributes. More... | |
Additional Inherited Members | |
Public Attributes inherited from Social_Media_with_followers::default_media_user | |
float | pdaf |
The probability density for how many agents will be recommended to an agent to follow each time step. More... | |
float | rf |
The scale factor to determine number of removed followees. | |
float | charisma |
This determines how likable someone's event is going to be. | |
bool | auto_follow |
If true, this user, when added as a followee by another user, will automatically reciprocate followings | |
Public Attributes inherited from Social_Media_no_followers::default_media_user | |
unsigned int | id |
This user's agent index. | |
float | pdp |
The probability density to post pdtw * dt = average number of events in a time period. | |
float | pr |
The probability to reply when an event is read. | |
float | prp |
The probability to repost when a post is read. | |
float | pqu |
The probability to quote when an event is read. | |
float | pdread |
The probability density to read events (time in hours) pdread * dt = average number of read messages in a time period. | |
Public Attributes inherited from Social_Media_no_followers::media_user | |
Social_Media_no_followers * | media_ptr |
Implements the default_media_user that handles both followers and emotions.
Various function call different inherieted functions where appropriate. No functions contain new code.
|
inlineoverridevirtual |
summary>
Reimplemented from Social_Media_with_followers::default_media_user.
|
inlineoverridevirtual |
summary>
Implements Social_Media_with_followers::media_user.
|
overridevirtual |
summary>
Reimplemented from Social_Media_no_followers::default_media_user.
|
inlineoverridevirtual |
summary>
Implements Social_Media_with_followers::media_user.
|
inlineoverridevirtual |
summary>
Implements Social_Media_no_followers::media_user.
|
inlineoverridevirtual |
summary>
Implements Social_Media_with_followers::media_user.
|
inlineoverridevirtual |
summary>
Reimplemented from Social_Media_no_followers::default_media_user.
|
inlineoverridevirtual |
summary>
Implements Social_Media_no_followers::media_user.
|
inlineoverridevirtual |
summary>
Implements Social_Media_no_followers::media_user.
|
inlineoverridevirtual |
summary>
Implements Social_Media_no_followers::media_user.
|
inlineoverridevirtual |
summary>
Implements Social_Media_no_followers::media_user.
|
inlineoverridevirtual |
summary>
Implements Social_Media_no_followers::media_user.
|
inlineoverridevirtual |
summary>
Implements Social_Media_with_followers::media_user.
|
inlineoverridevirtual |
summary>
Implements Social_Media_with_followers::media_user.