Construct version 5.4.3
An agent based modeling framework
SM_wf_emotions::default_media_user Struct Reference

Implements the default_media_user that handles both followers and emotions. More...

Inheritance diagram for SM_wf_emotions::default_media_user:
Collaboration diagram for SM_wf_emotions::default_media_user:

Public Member Functions

void read (media_event *_event) override
 
void reply (media_event *_event) override
 
void quote (media_event *_event) override
 
void repost (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 (SM_wf_emotions *reddit, const Node &node)
 
- Public Member Functions inherited from Social_Media_with_followers::default_media_user
 default_media_user (Social_Media_with_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_with_followersmedia ()
 
virtual void add_mentions (media_event *post) override
 Mentions are added to the event if the event is a post 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
 An alter has decided to follow this user and can decide to reciprocate that following. More...
 
unsigned int consider_recommendations (void) override
 The number of recommendations the user should view in Social_Media_with_followers::add_followees based on 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_followersmedia ()
 
void read (media_event *_event) override
 The read event is checked to ensure it contains knowledge More...
 
void reply (media_event *_event) override
 With proabability default_media_user::pr creates a reply to the event. More...
 
void quote (media_event *_event) override
 With proabability default_media_user::pqu creates a quote to the event. More...
 
void repost (media_event *_event) override
 With proabability default_media_user::prp creates a quote to the event. More...
 
void generate_post_events (void) override
 The user adds a number of post events based on default_media_user::pdp. More...
 
unsigned int get_read_count (void) override
 The user reads a number of events based on default_media_user::pdread. More...
 
virtual void add_mentions (media_event *post)
 Allows derived classes to mention users when creating an event. More...
 
virtual void add_trust (media_event *post)
 If the trust model is present, this users trust is added to a post using Social_Media_no_followers::default_media_user::get_trust.
 
virtual float get_trust (unsigned int knowledge_index)
 Returns the trust the user has in the knowledge index. Returns -1 if the Trust Model is not loaded. 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...
 
- Public Member Functions inherited from Social_Media_no_followers::media_user
 media_user (Social_Media_no_followers *media)
 
virtual ~media_user ()
 
virtual void read (media_event *read_event)=0
 Called during Social_Media_no_followers::communicate when an agent is to read and parse an event. This function is called once for every message. More...
 
virtual void reply (media_event *read_event)=0
 Called after read 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 read 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 read 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 reply 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 that are added to Social_Media_no_followers::list_of_events. 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 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...
 
- Public Member Functions inherited from SM_nf_emotions::default_media_user
 default_media_user (SM_nf_emotions *media, const Node &node)
 
SM_nf_emotionsmedia ()
 
void reply (media_event *_event) override
 Modifies Social_Media_no_followers::default_media_user::reply to use emotions. More...
 
void quote (media_event *_event) override
 Modifies Social_Media_no_followers::default_media_user::quote to use emotions. More...
 
void repost (media_event *_event) override
 Modifies Social_Media_no_followers::default_media_user::repost to use emotions. More...
 
void generate_post_events (void) override
 Modifies Social_Media_no_followers::default_media_user::generate_post_events to use emotions. More...
 
unsigned int get_read_count (void) override
 Modifies Social_Media_no_followers::default_media_user::get_read_count to use emotions. More...
 
virtual unsigned int get_knowledge_selection (void)
 Modifies Social_Media_no_followers::default_media_user::get_knowledge_selection to use emotions. More...
 
virtual void add_emotions (media_event *_event)
 Adds emotions to an event. 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_followersmedia_ptr
 

Detailed Description

Implements the default_media_user that handles both followers and emotions.

Various function call different inherieted functions where appropriate. No functions contain new code.

Member Function Documentation

◆ add_mentions()

void SM_wf_emotions::default_media_user::add_mentions ( media_event _event)
inlineoverridevirtual

summary>

Reimplemented from Social_Media_with_followers::default_media_user.

Here is the call graph for this function:

◆ consider_recommendations()

unsigned int SM_wf_emotions::default_media_user::consider_recommendations ( void  )
inlineoverridevirtual

summary>

Implements Social_Media_with_followers::media_user.

Here is the call graph for this function:

◆ follow_user()

bool SM_wf_emotions::default_media_user::follow_user ( unsigned int  alter_agent_index)
inlineoverridevirtual

summary>

Implements Social_Media_with_followers::media_user.

Here is the call graph for this function:

◆ generate_post_events()

void SM_wf_emotions::default_media_user::generate_post_events ( void  )
inlineoverridevirtual

summary>

Reimplemented from SM_nf_emotions::default_media_user.

Here is the call graph for this function:

◆ get_charisma()

float SM_wf_emotions::default_media_user::get_charisma ( )
inlineoverridevirtual

summary>

Implements Social_Media_with_followers::media_user.

Here is the call graph for this function:

◆ get_knowledge_selection()

unsigned int SM_wf_emotions::default_media_user::get_knowledge_selection ( void  )
inlineoverridevirtual

summary>

Reimplemented from SM_nf_emotions::default_media_user.

Here is the call graph for this function:

◆ get_read_count()

unsigned int SM_wf_emotions::default_media_user::get_read_count ( void  )
inlineoverridevirtual

summary>

Reimplemented from SM_nf_emotions::default_media_user.

Here is the call graph for this function:

◆ quote()

void SM_wf_emotions::default_media_user::quote ( media_event _event)
inlineoverridevirtual

summary>

Reimplemented from SM_nf_emotions::default_media_user.

Here is the call graph for this function:

◆ read()

void SM_wf_emotions::default_media_user::read ( media_event _event)
inlineoverridevirtual

summary>

Implements Social_Media_no_followers::media_user.

Here is the call graph for this function:

◆ reply()

void SM_wf_emotions::default_media_user::reply ( media_event _event)
inlineoverridevirtual

summary>

Reimplemented from SM_nf_emotions::default_media_user.

Here is the call graph for this function:

◆ repost()

void SM_wf_emotions::default_media_user::repost ( media_event _event)
inlineoverridevirtual

summary>

Reimplemented from SM_nf_emotions::default_media_user.

Here is the call graph for this function:

◆ respond_to_follow()

bool SM_wf_emotions::default_media_user::respond_to_follow ( unsigned int  alter_agent_index)
inlineoverridevirtual

summary>

Implements Social_Media_with_followers::media_user.

Here is the call graph for this function:

◆ unfollow_user()

bool SM_wf_emotions::default_media_user::unfollow_user ( unsigned int  alter_agent_index)
inlineoverridevirtual

summary>

Implements Social_Media_with_followers::media_user.

Here is the call graph for this function: