- Declared in:
- Attribute.h
When agents meet new contacts, they create "Attribute" objects in which to store records. They record information about the identity of the other agent--such as its id number and a pointer to its address, and also they keep a snapshot of its culture at the time they met, a pointer to the other's culture (to reflect its state at any given instant, and also it keeps a summary measure of the similarity of the other agent with self.
Method summaryReduce by one the similarity variable
Return a pointer to the agent that this attribute record describes
Check the issue/culture pointer of the other agent and return the i'th opinion
Return the f'th issue/culture value stored in this attribute
Return id number of agent that this attribute record describes
Return the number of interactions
Returns the memory of similarity, allowing agents to wander about and look at each other and find out 'how similar was that other to me when we last met.'
Increment by one the similarity variable
Increment by one the interactions counter
Initialize the culure array in which a snapshot of the other's features is to be stored. Its storage is dynamically allocated.
Diagnostic method that prints values of variables to the screen
Set a pointer to the agent that this attribute describes
Set this pointer to the culture array of the agent that is represented by this attribute object. Note that the instance variable culture records the culture that was observed at the last interaction, but this pointer always shows the current value.
Set teh f'th issue/culture value to v
Set the id number of the agent about whom these attributes are being saved
The Attribute is told to remember the similarity value for the agent that it represents