|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.micropsi.nodenet.Slot
Slots are the endpoints of links. During activation propagation, slots
collect the activation of the incoming links.
There isn't much
magic to slots - they are basically a varible with the incoming activation
and a list of incoming links to allow an entity to unlink itself.
| Field Summary | |
protected double |
activation
The slot's activation. |
| Constructor Summary | |
protected |
Slot(int type,
NetEntity center,
NetEntityManager manager)
Creates a new Slot. |
| Method Summary | |
protected java.util.ArrayList |
accessIncomingLinks()
Provides direct access to the list of incoming links. |
protected void |
attachIncomingLink(Link link)
Attaches an incoming link. |
protected void |
destroy()
Frees as many references as possible to avoid too much gc activity |
protected void |
detachIncomingLink(Link link)
Detaches an incoming link. |
double |
getIncomingActivation()
Returns the slot's activation. |
Link |
getIncomingLinkAt(int n)
Returns the n-th link attached to the slot. |
java.util.Iterator |
getIncomingLinks()
Retuns the instances of all incoming links. |
NetEntity |
getNetEntity()
Returns the entity the slot belongs to. |
int |
getNumberOfIncomingLinks()
Returns the number of links incoming at that gate. |
int |
getType()
Returns the type of the slot. |
boolean |
hasIncomingLinks()
Checks if this slot has incoming links |
protected void |
killActivation()
Sets the slot's activation to zero. |
protected void |
putActivation(double act)
Puts activation into the slot. |
protected void |
takeActivationGreaterThanZero(double act)
Takes activation from the slot. |
java.lang.String |
toString()
|
protected void |
unlinkCompletely()
Unlinks the slot completely, that is: Kills all links that end at the slot. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected double activation
| Constructor Detail |
protected Slot(int type,
NetEntity center,
NetEntityManager manager)
type - the type of the new slotcenter - the NetEntity the Slot belongs tomanager - the entity manager| Method Detail |
public int getType()
SlotTypesIFpublic NetEntity getNetEntity()
protected void putActivation(double act)
act - the value to be added to the slot's activationprotected void takeActivationGreaterThanZero(double act)
act - the value to be substracted from the slot's activationprotected void killActivation()
public double getIncomingActivation()
protected void attachIncomingLink(Link link)
link - the link to be added to the list of incoming links.protected void detachIncomingLink(Link link)
link - the link to be deleted from the list of incoming links.public java.util.Iterator getIncomingLinks()
public Link getIncomingLinkAt(int n)
n - the index of the link
public boolean hasIncomingLinks()
public int getNumberOfIncomingLinks()
protected java.util.ArrayList accessIncomingLinks()
protected void unlinkCompletely()
public java.lang.String toString()
Object.toString()protected void destroy()
|
(c) by Micropsi Project: http://www.cognitive-agents.org | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||