edu.memphis.ccrg.lida.globalworkspace
Class CoalitionImpl

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
      extended by edu.memphis.ccrg.lida.framework.shared.activation.ActivatibleImpl
          extended by edu.memphis.ccrg.lida.globalworkspace.CoalitionImpl
All Implemented Interfaces:
Initializable, Activatible, Coalition

public class CoalitionImpl
extends ActivatibleImpl
implements Coalition

The default implementation of Coalition. Wraps content entering the GlobalWorkspace to compete for consciousness. Extends ActivatibleImpl. Contains reference to the AttentionCodelet that created it.

Author:
Ryan J. McCall
See Also:
AttentionCodeletImpl

Field Summary
protected  BroadcastContent broadcastContent
          the BroadcastContent of the coalition
protected  AttentionCodelet creatingAttentionCodelet
          the AttentionCodelet that created the coalition
 
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible
DEFAULT_ACTIVATIBLE_REMOVAL_THRESHOLD, DEFAULT_ACTIVATION
 
Constructor Summary
CoalitionImpl()
          Default constructor
CoalitionImpl(NodeStructure ns, AttentionCodelet c)
          Constructs a CoalitionImpl with specified content that is being created by specified AttentionCodelet
 
Method Summary
 boolean equals(java.lang.Object o)
           
 BroadcastContent getContent()
          Returns an UnmodifiableNodeStructureImpl containing the broadcast content.
 AttentionCodelet getCreatingAttentionCodelet()
          Returns the creating AttentionCodelet that created this coalition
 int getId()
          Returns the id
 int hashCode()
           
protected  void updateActivation()
          Calculates the coalition's activation.
 
Methods inherited from class edu.memphis.ccrg.lida.framework.shared.activation.ActivatibleImpl
decay, excite, getActivatibleRemovalThreshold, getActivation, getDecayStrategy, getExciteStrategy, getTotalActivation, isRemovable, setActivatibleRemovalThreshold, setActivation, setDecayStrategy, setExciteStrategy
 
Methods inherited from class edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
containsParameter, getParam, getParameters, init, init
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible
decay, excite, getActivatibleRemovalThreshold, getActivation, getDecayStrategy, getExciteStrategy, getTotalActivation, isRemovable, setActivatibleRemovalThreshold, setActivation, setDecayStrategy, setExciteStrategy
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable
containsParameter, getParam, getParameters, init, init
 

Field Detail

broadcastContent

protected BroadcastContent broadcastContent
the BroadcastContent of the coalition


creatingAttentionCodelet

protected AttentionCodelet creatingAttentionCodelet
the AttentionCodelet that created the coalition

Constructor Detail

CoalitionImpl

public CoalitionImpl()
Default constructor


CoalitionImpl

public CoalitionImpl(NodeStructure ns,
                     AttentionCodelet c)
Constructs a CoalitionImpl with specified content that is being created by specified AttentionCodelet

Parameters:
ns - the BroadcastContent
c - The AttentionCodelet that created this Coalition
See Also:
AttentionCodeletImpl
Method Detail

updateActivation

protected void updateActivation()
Calculates the coalition's activation. This implementation uses the average activation of the broadcast content multiplied by the attention codelet's base-level activation.


getContent

public BroadcastContent getContent()
Returns an UnmodifiableNodeStructureImpl containing the broadcast content. Note that UnmodifiableNodeStructureImpl cannot be modified.

Specified by:
getContent in interface Coalition
Returns:
The BroadcastContent of the coalition

getCreatingAttentionCodelet

public AttentionCodelet getCreatingAttentionCodelet()
Description copied from interface: Coalition
Returns the creating AttentionCodelet that created this coalition

Specified by:
getCreatingAttentionCodelet in interface Coalition
Returns:
The AttentionCodelet that help form this coalition

getId

public int getId()
Description copied from interface: Coalition
Returns the id

Specified by:
getId in interface Coalition
Returns:
the unique id of the Coalition

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object