edu.memphis.ccrg.lida.pam
Interface PerceptualAssociativeMemory

All Superinterfaces:
FrameworkModule, FullyInitializable, Initializable
All Known Implementing Classes:
PerceptualAssociativeMemoryImpl

public interface PerceptualAssociativeMemory
extends FrameworkModule

A main module which contains feature detectors, nodes, and links.

Author:
Ryan J. McCall

Method Summary
 PamLink addDefaultLink(Link link)
          Deprecated. Use either addLink(String, Node, Linkable, LinkCategory) or addDefaultLink(Node, Linkable, LinkCategory) instead.
 PamLink addDefaultLink(Node src, Linkable snk, LinkCategory cat)
          Adds a new PamLink of default type to PAM.
 java.util.Set<PamLink> addDefaultLinks(java.util.Set<? extends Link> links)
          Deprecated. Use either addLink(String, Node, Linkable, LinkCategory) or addDefaultLink(Node, Linkable, LinkCategory) instead.
 PamNode addDefaultNode(Node node)
          Deprecated. Use either addNode(String, String) or addDefaultNode(String) instead.
 PamNode addDefaultNode(java.lang.String label)
          Adds a new PamNode of default type to PAM with specified label.
 java.util.Set<PamNode> addDefaultNodes(java.util.Set<? extends Node> nodes)
          Deprecated. Use either addNode(String, String) or addDefaultNode(String) instead.
 void addDetectionAlgorithm(DetectionAlgorithm fd)
          Adds specified DetectionAlgorithm to be run.
 PamLink addLink(java.lang.String type, Node src, Linkable snk, LinkCategory cat)
          Adds a new PamLink of specified type to PAM.
 LinkCategory addLinkCategory(LinkCategory cat)
          Adds a COPY of specified LinkCategory to this PerceptualAssociativeMemory.
 PamNode addNode(java.lang.String type, java.lang.String label)
          Adds a new PamNode of specified type to PAM with specified label.
 void addPamListener(PamListener pl)
          Adds PamListener.
 void addToPercept(Link l)
          Adds Link to the percept.
 void addToPercept(Node n)
          Adds Node to the percept.
 void addToPercept(NodeStructure ns)
          Adds a NodeStructure to the percept.
 boolean containsLink(ExtendedId id)
          Contains link.
 boolean containsLink(Link link)
          Returns true if this PAM contains specified PamLink.
 boolean containsNode(ExtendedId id)
          Contains node.
 boolean containsNode(Node node)
          Returns true if this PAM contains specified PamNode.
 double getDownscaleFactor()
          Gets downscaleFactor
 Link getLink(ExtendedId id)
           
 java.util.Collection<LinkCategory> getLinkCategories()
          Returns all categories in this Pam
 LinkCategory getLinkCategory(int id)
          Returns LinkCategory with specified id.
 java.util.Collection<Link> getLinks()
          Returns an unmodifiable collection of the PamLinks in this PAM as Links.
 Node getNode(ExtendedId id)
          Returns the PamNode with specified ExtendedId or null
 Node getNode(int id)
          Returns the PamNode with specified id from this PAM or null.
 Node getNode(java.lang.String label)
          Returns the PamNode with specified label or null.
 java.util.Collection<Node> getNodes()
          Returns an unmodifiable collection of the PamNodes in this PAM as Nodes.
 PropagationStrategy getPropagationStrategy()
          Gets PropagationStrategy governing how activation is propagated in this PAM.
 double getUpscaleFactor()
          Gets upscaleFactor
 boolean isOverPerceptThreshold(PamLinkable l)
          Returns whether PamLinkable is above percept threshold.
 void propagateActivationToParents(PamNode pamNode)
          Propagates activation from a PamNode to its parents.
 void receiveExcitation(PamLinkable linkable, double amount)
          Excites specified PamLinkable an amount of activation.
 void receiveExcitation(java.util.Set<PamLinkable> linkables, double amount)
          Excites PamLinkable with an amount of activation.
 void setDownscaleFactor(double f)
          Sets downscaleFactor
 void setPerceptThreshold(double t)
          Sets perceptThreshold
 void setPropagationStrategy(PropagationStrategy strategy)
          Sets PropagationStrategy governing how activation is propagated in this PAM.
 void setUpscaleFactor(double f)
          Sets upscaleFactor
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.FrameworkModule
addListener, addSubModule, containsSubmodule, containsSubmodule, decayModule, getAssistingTaskSpawner, getModuleContent, getModuleName, getSubmodule, getSubmodule, getSubmodules, setAssistingTaskSpawner, setModuleName, taskManagerDecayModule
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.FullyInitializable
setAssociatedModule
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable
containsParameter, getParam, getParameters, init, init
 

Method Detail

addDefaultNode

PamNode addDefaultNode(java.lang.String label)
Adds a new PamNode of default type to PAM with specified label. Label must be unique. If not, existing node with specified label is returned.

Parameters:
label - the label of the new PamNode
Returns:
the new PamNode added to PAM, the existing Node with specified label or null

addNode

PamNode addNode(java.lang.String type,
                java.lang.String label)
Adds a new PamNode of specified type to PAM with specified label. Type should refer to a subclass of PamNodeImpl. Label must be unique. If not, existing node with specified label is returned.

Parameters:
type - the type of the new PamNode
label - the label of the new PamNode
Returns:
the new PamNode added to PAM, the existing Node with specified label or null

addDefaultLink

PamLink addDefaultLink(Node src,
                       Linkable snk,
                       LinkCategory cat)
Adds a new PamLink of default type to PAM. If a link with the same attributes already exists the existing link will be returned instead.

Parameters:
src - the link's source
snk - the link's sink
cat - the link's category
Returns:
the new PamLink, the existing PamLink, or null

addLink

PamLink addLink(java.lang.String type,
                Node src,
                Linkable snk,
                LinkCategory cat)
Adds a new PamLink of specified type to PAM. Type should refer to a subclass of PamLinkImpl. If a link with the same attributes already exists the existing link will be returned instead.

Parameters:
type - link's type
src - the link's source
snk - the link's sink
cat - the link's category
Returns:
the new PamLink, the existing PamLink, or null

addDefaultNode

@Deprecated
PamNode addDefaultNode(Node node)
Deprecated. Use either addNode(String, String) or addDefaultNode(String) instead.

Adds a COPY of specified node to this PerceptualAssociativeMemory. Node will be of Pam's default type.

Parameters:
node - PamNode
Returns:
Copied PamNode actually stored in this PAM.

addDefaultNodes

@Deprecated
java.util.Set<PamNode> addDefaultNodes(java.util.Set<? extends Node> nodes)
Deprecated. Use either addNode(String, String) or addDefaultNode(String) instead.

Adds a COPY of a collection of Nodes to this PAM. Nodes will be of Pam's default type.

Parameters:
nodes - nodes to add
Returns:
Copied PamNodes actually stored in this PAM

addDefaultLink

@Deprecated
PamLink addDefaultLink(Link link)
Deprecated. Use either addLink(String, Node, Linkable, LinkCategory) or addDefaultLink(Node, Linkable, LinkCategory) instead.

Adds a COPY of specified link to this PAM. Link will be of Pam's default type.

Parameters:
link - PamLink to add
Returns:
Copied PamLink actually stored in this PAM

addDefaultLinks

@Deprecated
java.util.Set<PamLink> addDefaultLinks(java.util.Set<? extends Link> links)
Deprecated. Use either addLink(String, Node, Linkable, LinkCategory) or addDefaultLink(Node, Linkable, LinkCategory) instead.

Adds a COPY of specified collection of PamLinks to this PAM. Links will be of Pam's default type.

Parameters:
links - PamLinks to add
Returns:
Copied PamLinks actually stored in this PAM

addDetectionAlgorithm

void addDetectionAlgorithm(DetectionAlgorithm fd)
Adds specified DetectionAlgorithm to be run.

Parameters:
fd - DetectionAlgorithm

addPamListener

void addPamListener(PamListener pl)
Adds PamListener.

Parameters:
pl - listener

setPropagationStrategy

void setPropagationStrategy(PropagationStrategy strategy)
Sets PropagationStrategy governing how activation is propagated in this PAM.

Parameters:
strategy - PropagationStrategy

getPropagationStrategy

PropagationStrategy getPropagationStrategy()
Gets PropagationStrategy governing how activation is propagated in this PAM.

Returns:
this Pam's PropagationStrategy

receiveExcitation

void receiveExcitation(PamLinkable linkable,
                       double amount)
Excites specified PamLinkable an amount of activation.

Parameters:
linkable - Id of the PamLinkable receiving the activation
amount - amount of activation to excite
See Also:
{@link BasicDetectionAlgorithm}

receiveExcitation

void receiveExcitation(java.util.Set<PamLinkable> linkables,
                       double amount)
Excites PamLinkable with an amount of activation.

Parameters:
linkables - Ids of PamLinkable to be excited
amount - amount of activation

propagateActivationToParents

void propagateActivationToParents(PamNode pamNode)
Propagates activation from a PamNode to its parents.

Parameters:
pamNode - The PamNode to propagate activation from.
See Also:
ExcitationTask, PropagationTask

addToPercept

void addToPercept(NodeStructure ns)
Adds a NodeStructure to the percept.

Parameters:
ns - NodeStructure

addToPercept

void addToPercept(Node n)
Adds Node to the percept.

Parameters:
n - Node to add

addToPercept

void addToPercept(Link l)
Adds Link to the percept.

Parameters:
l - Link to add

getLinkCategory

LinkCategory getLinkCategory(int id)
Returns LinkCategory with specified id.

Parameters:
id - id of LinkCategory sought
Returns:
LinkCategory or null if category does not exist in PAM.

getLinkCategories

java.util.Collection<LinkCategory> getLinkCategories()
Returns all categories in this Pam

Returns:
Collection of all LinkCategory

addLinkCategory

LinkCategory addLinkCategory(LinkCategory cat)
Adds a COPY of specified LinkCategory to this PerceptualAssociativeMemory. Category must also be a node in order to be added. Node will be of Pam's default type.

Parameters:
cat - LinkCategory
Returns:
Copied LinkCategory actually stored in this PAM.

containsNode

boolean containsNode(Node node)
Returns true if this PAM contains specified PamNode.

Parameters:
node - the node
Returns:
true, if successful

containsNode

boolean containsNode(ExtendedId id)
Contains node.

Parameters:
id - ExtendedId of sought node
Returns:
true if PAM contains the node with this id.

containsLink

boolean containsLink(Link link)
Returns true if this PAM contains specified PamLink.

Parameters:
link - the link
Returns:
true, if successful

containsLink

boolean containsLink(ExtendedId id)
Contains link.

Parameters:
id - ExtendedId of sought link
Returns:
true if PAM contains the link with this id.

setPerceptThreshold

void setPerceptThreshold(double t)
Sets perceptThreshold

Parameters:
t - threshold for a Linkable to become part of the percept

setUpscaleFactor

void setUpscaleFactor(double f)
Sets upscaleFactor

Parameters:
f - scale factor for feed-forward activation propagation

getUpscaleFactor

double getUpscaleFactor()
Gets upscaleFactor

Returns:
scale factor for feed-forward activation propagation

setDownscaleFactor

void setDownscaleFactor(double f)
Sets downscaleFactor

Parameters:
f - scale factor for top-down activation propagation

getDownscaleFactor

double getDownscaleFactor()
Gets downscaleFactor

Returns:
scale factor for top-down activation propagation

isOverPerceptThreshold

boolean isOverPerceptThreshold(PamLinkable l)
Returns whether PamLinkable is above percept threshold.

Parameters:
l - a PamLinkable
Returns:
true if PamLinkable's total activation is above percept threshold

getNode

Node getNode(int id)
Returns the PamNode with specified id from this PAM or null.

Parameters:
id - the id
Returns:
the pam node

getNode

Node getNode(ExtendedId id)
Returns the PamNode with specified ExtendedId or null

Parameters:
id - sought ExtendedId
Returns:
PamNode the actual Node

getNode

Node getNode(java.lang.String label)
Returns the PamNode with specified label or null. This method is intended to be used only during initialization.

Parameters:
label - sought
Returns:
PamNode the actual Node

getLink

Link getLink(ExtendedId id)
Parameters:
id - link's eid
Returns:
the PamLink with specified id from this PAM or null.

getNodes

java.util.Collection<Node> getNodes()
Returns an unmodifiable collection of the PamNodes in this PAM as Nodes.

Returns:
the PamNodes of this PAM

getLinks

java.util.Collection<Link> getLinks()
Returns an unmodifiable collection of the PamLinks in this PAM as Links.

Returns:
the PamLink of this PAM