Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
Public Member Functions | Public Attributes | List of all members
Evolife.Social.Alliances.Friend Class Reference

class Friend: defines an individual's acqaintances More...

Inheritance diagram for Evolife.Social.Alliances.Friend:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, MaxFriends=1)
 Defines Friend as a club. More...
 
def accepts (self, F_perf)
 asymmetrical links # More...
 
def affiliable (self, F_perf, conservative=True)
 Checks whether affiliation is possible. More...
 
def follow (self, F, F_perf, conservative=True, Quit=None)
 the individual wants to be F's disciple due to F's performance More...
 
def follows (self, Friend)
 checks whether Friend belongs to actual friends More...
 
def quit_ (self, Friend=None)
 the individual no longer follows its friend More...
 
def best_friend (self)
 
def Max (self)
 
def Friends (self, ordered=True)
 returns a list of friend names (possibly ordered by decreasing performance) More...
 
def names (self)
 returns the list of friends' names More...
 
def rank (self, Friend)
 returns the rank of Friend in the list of decreasing performances More...
 
def nbFriends (self)
 Number of friends. More...
 
def size (self)
 Number of friends. More...
 
def sizeMax (self)
 
def lessening_friendship (self, Factor=0.9)
 all performances are reduced (represents temporal erosion) More...
 
def checkNetwork (self, membershipFunction=None)
 updates links by forgetting friends that are gone More...
 
def detach (self)
 The individual quits all its friends
More...
 
def acquaintable (self, Offer, Partner, PartnerOffer)
 symmetrical links # More...
 
def get_friend (self, Offer, Partner, PartnerOffer)
 Checks mutual acceptance and then establishes friendship. More...
 
def acquainted (self, Partner)
 same as get_friend/3 with no performance More...
 
def end_friendship (self, Partner)
 Partners remove each other from their address book. More...
 
def forgetAll (self)
 The individual quits its friends
More...
 
def __iter__ (self)
 
def __len__ (self)
 
def social_signature (self)
 returns the ordered list of friends More...
 
def signature (self)
 same as social_signature More...
 

Public Attributes

 friends
 

Detailed Description

class Friend: defines an individual's acqaintances

Definition at line 166 of file Alliances.py.

Constructor & Destructor Documentation

◆ __init__()

def Evolife.Social.Alliances.Friend.__init__ (   self,
  MaxFriends = 1 
)

Member Function Documentation

◆ __iter__()

def Evolife.Social.Alliances.Friend.__iter__ (   self)

Definition at line 302 of file Alliances.py.

◆ __len__()

def Evolife.Social.Alliances.Friend.__len__ (   self)

Definition at line 304 of file Alliances.py.

◆ accepts()

def Evolife.Social.Alliances.Friend.accepts (   self,
  F_perf 
)

asymmetrical links #

Checks whether an individual with 'performance' can be accepted as a friend. Returns admission rank

Definition at line 178 of file Alliances.py.

◆ acquaintable()

def Evolife.Social.Alliances.Friend.acquaintable (   self,
  Offer,
  Partner,
  PartnerOffer 
)

symmetrical links #

Checks that self and Partner would accept each other as friend, based on their performance

Definition at line 269 of file Alliances.py.

◆ acquainted()

def Evolife.Social.Alliances.Friend.acquainted (   self,
  Partner 
)

same as get_friend/3 with no performance

Definition at line 285 of file Alliances.py.

◆ affiliable()

def Evolife.Social.Alliances.Friend.affiliable (   self,
  F_perf,
  conservative = True 
)

Checks whether affiliation is possible.

Definition at line 184 of file Alliances.py.

◆ best_friend()

def Evolife.Social.Alliances.Friend.best_friend (   self)

Definition at line 219 of file Alliances.py.

◆ checkNetwork()

def Evolife.Social.Alliances.Friend.checkNetwork (   self,
  membershipFunction = None 
)

updates links by forgetting friends that are gone

Definition at line 255 of file Alliances.py.

◆ detach()

def Evolife.Social.Alliances.Friend.detach (   self)

The individual quits all its friends

Reimplemented in Evolife.Social.Alliances.Follower.

Definition at line 261 of file Alliances.py.

◆ end_friendship()

def Evolife.Social.Alliances.Friend.end_friendship (   self,
  Partner 
)

Partners remove each other from their address book.

Reimplemented in Evolife.Social.Alliances.Follower.

Definition at line 290 of file Alliances.py.

◆ follow()

def Evolife.Social.Alliances.Friend.follow (   self,
  F,
  F_perf,
  conservative = True,
  Quit = None 
)

the individual wants to be F's disciple due to F's performance

Definition at line 189 of file Alliances.py.

◆ follows()

def Evolife.Social.Alliances.Friend.follows (   self,
  Friend 
)

checks whether Friend belongs to actual friends

Definition at line 204 of file Alliances.py.

◆ forgetAll()

def Evolife.Social.Alliances.Friend.forgetAll (   self)

The individual quits its friends

Reimplemented in Evolife.Social.Alliances.Follower.

Definition at line 297 of file Alliances.py.

◆ Friends()

def Evolife.Social.Alliances.Friend.Friends (   self,
  ordered = True 
)

returns a list of friend names (possibly ordered by decreasing performance)

Definition at line 223 of file Alliances.py.

◆ get_friend()

def Evolife.Social.Alliances.Friend.get_friend (   self,
  Offer,
  Partner,
  PartnerOffer 
)

Checks mutual acceptance and then establishes friendship.

Reimplemented in Evolife.Social.Alliances.Follower.

Definition at line 274 of file Alliances.py.

◆ lessening_friendship()

def Evolife.Social.Alliances.Friend.lessening_friendship (   self,
  Factor = 0.9 
)

all performances are reduced (represents temporal erosion)

Definition at line 250 of file Alliances.py.

◆ Max()

def Evolife.Social.Alliances.Friend.Max (   self)

Definition at line 221 of file Alliances.py.

◆ names()

def Evolife.Social.Alliances.Friend.names (   self)

returns the list of friends' names

Definition at line 228 of file Alliances.py.

◆ nbFriends()

def Evolife.Social.Alliances.Friend.nbFriends (   self)

Number of friends.

Definition at line 238 of file Alliances.py.

◆ quit_()

def Evolife.Social.Alliances.Friend.quit_ (   self,
  Friend = None 
)

the individual no longer follows its friend

Definition at line 211 of file Alliances.py.

◆ rank()

def Evolife.Social.Alliances.Friend.rank (   self,
  Friend 
)

returns the rank of Friend in the list of decreasing performances

Definition at line 233 of file Alliances.py.

◆ signature()

def Evolife.Social.Alliances.Friend.signature (   self)

same as social_signature

Definition at line 312 of file Alliances.py.

◆ size()

def Evolife.Social.Alliances.Friend.size (   self)

Number of friends.

Definition at line 243 of file Alliances.py.

◆ sizeMax()

def Evolife.Social.Alliances.Friend.sizeMax (   self)

Definition at line 248 of file Alliances.py.

◆ social_signature()

def Evolife.Social.Alliances.Friend.social_signature (   self)

returns the ordered list of friends

Definition at line 306 of file Alliances.py.

Member Data Documentation

◆ friends

Evolife.Social.Alliances.Friend.friends

Definition at line 173 of file Alliances.py.


The documentation for this class was generated from the following file: