|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.memphis.ccrg.lida.framework.FrameworkModuleImpl
edu.memphis.ccrg.lida.pam.PerceptualAssociativeMemoryImpl
public class PerceptualAssociativeMemoryImpl
Default implementation of PerceptualAssociativeMemory
. Module
essentially concerned with PamNode and PamLinks, source of meaning in LIDA,
how they are activated and how they pass activation among themselves.
Nested Class Summary | |
---|---|
protected static class |
PerceptualAssociativeMemoryImpl.PamNodeStructure
Internal implementation of NodeStructureImpl . |
Field Summary | |
---|---|
static LinkCategory |
FEATURE
Primitive LinkCategory FEATURE |
static LinkCategory |
LATERAL
Primitive LinkCategory LATERAL |
protected java.util.Map<java.lang.String,PamNode> |
nodesByLabel
Pam's pamnode indexed by label |
static LinkCategory |
NONE
Primitive LinkCategory NONE |
protected PerceptualAssociativeMemoryImpl.PamNodeStructure |
pamNodeStructure
A PerceptualAssociativeMemoryImpl.PamNodeStructure which contains all of the PamNode ,
PamLink and their connections. |
static LinkCategory |
PARENT
Primitive LinkCategory PARENT |
Fields inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl |
---|
taskSpawner |
Constructor Summary | |
---|---|
PerceptualAssociativeMemoryImpl()
Default constructor. |
Method Summary | |
---|---|
PamLink |
addDefaultLink(Link link)
Adds a COPY of specified link to this PAM. |
java.util.Set<PamLink> |
addDefaultLinks(java.util.Set<? extends Link> links)
Adds a COPY of specified collection of PamLinks to this PAM. |
PamNode |
addDefaultNode(Node n)
Adds a COPY of specified node to this PerceptualAssociativeMemory . |
java.util.Set<PamNode> |
addDefaultNodes(java.util.Set<? extends Node> nodes)
Adds a COPY of a collection of Nodes to this PAM. |
void |
addDetectionAlgorithm(DetectionAlgorithm detector)
Adds specified DetectionAlgorithm to be run. |
LinkCategory |
addLinkCategory(LinkCategory cat)
Adds a COPY of specified LinkCategory to this PerceptualAssociativeMemory . |
void |
addLinkToPercept(Link l)
Adds Link to the percept. |
void |
addListener(ModuleListener l)
Override this method to add a listener to the module |
void |
addNodeStructureToPercept(NodeStructure ns)
Adds a NodeStructure to the percept. |
void |
addNodeToPercept(Node n)
Adds Node to the percept. |
void |
addPamListener(PamListener pl)
Adds PamListener . |
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. |
void |
decayModule(long ticks)
Decay only this Module. |
double |
getDownscaleFactor()
Gets downscaleFactor |
int |
getExcitationTaskTicksPerRun()
|
Link |
getLink(ExtendedId eid)
|
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 PamLink s in this PAM as Link s. |
java.lang.Object |
getModuleContent(java.lang.Object... params)
Intended to be called from the GUI. |
Node |
getNode(ExtendedId eid)
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 PamNode s in this PAM as Node s. |
static double |
getPerceptThreshold()
Returns the perceptThreshold |
PropagationStrategy |
getPropagationStrategy()
Gets PropagationStrategy governing how activation is propagated in this PAM. |
int |
getPropagationTaskTicksPerRun()
|
double |
getUpscaleFactor()
Gets upscaleFactor |
void |
init()
Will set parameters with the following names: pam.Upscale pam.Downscale pam.Selectivity pam.excitationTicksPerRun pam.propagationTicksPerRun |
boolean |
isOverPerceptThreshold(PamLinkable l)
Returns whether PamLinkable is above percept threshold. |
void |
learn(BroadcastContent bc)
This is a placeholder method to remind implementing classes that they should implement learning. |
void |
propagateActivationToParents(PamNode pn)
Propagates activation from a PamNode to its parents. |
void |
receiveBroadcast(BroadcastContent bc)
This method should return as possible in order to not delay the rest of the broadcasting. |
void |
receiveExcitation(PamLinkable pl,
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 |
receivePreafference(NodeStructure addList,
NodeStructure deleteList)
Listener receives preafference. |
void |
receiveWorkspaceContent(ModuleName originatingBuffer,
WorkspaceContent content)
Receive NodeStructure content from ModuleType originatingBuffer |
void |
setDownscaleFactor(double f)
Sets downscaleFactor |
void |
setPerceptThreshold(double t)
Sets perceptThreshold |
void |
setPropagationStrategy(PropagationStrategy b)
Sets PropagationStrategy governing how activation is propagated in this PAM. |
void |
setUpscaleFactor(double f)
Sets upscaleFactor |
Methods inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl |
---|
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getParam, getSubmodule, getSubmodule, getSubmodules, init, setAssistingTaskSpawner, setAssociatedModule, setModuleName, taskManagerDecayModule, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.memphis.ccrg.lida.framework.FrameworkModule |
---|
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, 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 |
---|
getParam, init |
Field Detail |
---|
protected PerceptualAssociativeMemoryImpl.PamNodeStructure pamNodeStructure
PerceptualAssociativeMemoryImpl.PamNodeStructure
which contains all of the PamNode
,
PamLink
and their connections.
protected java.util.Map<java.lang.String,PamNode> nodesByLabel
public static LinkCategory NONE
LinkCategory
NONE
public static LinkCategory LATERAL
LinkCategory
LATERAL
public static LinkCategory PARENT
LinkCategory
PARENT
public static LinkCategory FEATURE
LinkCategory
FEATURE
Constructor Detail |
---|
public PerceptualAssociativeMemoryImpl()
Method Detail |
---|
public void init()
init
in interface Initializable
init
in class FrameworkModuleImpl
FrameworkModuleImpl.init()
public void setPropagationStrategy(PropagationStrategy b)
PerceptualAssociativeMemory
PropagationStrategy
governing how activation is propagated in this PAM.
setPropagationStrategy
in interface PerceptualAssociativeMemory
b
- PropagationStrategy
public PropagationStrategy getPropagationStrategy()
PerceptualAssociativeMemory
PropagationStrategy
governing how activation is propagated in this PAM.
getPropagationStrategy
in interface PerceptualAssociativeMemory
PropagationStrategy
public int getExcitationTaskTicksPerRun()
public int getPropagationTaskTicksPerRun()
public java.util.Set<PamNode> addDefaultNodes(java.util.Set<? extends Node> nodes)
PerceptualAssociativeMemory
addDefaultNodes
in interface PerceptualAssociativeMemory
nodes
- nodes to add
public PamNode addDefaultNode(Node n)
PerceptualAssociativeMemory
PerceptualAssociativeMemory
.
Node will be of Pam's default type.
addDefaultNode
in interface PerceptualAssociativeMemory
n
- PamNode
public java.util.Set<PamLink> addDefaultLinks(java.util.Set<? extends Link> links)
PerceptualAssociativeMemory
addDefaultLinks
in interface PerceptualAssociativeMemory
links
- PamLinks to add
public PamLink addDefaultLink(Link link)
PerceptualAssociativeMemory
addDefaultLink
in interface PerceptualAssociativeMemory
link
- PamLink to add
public void addDetectionAlgorithm(DetectionAlgorithm detector)
PerceptualAssociativeMemory
DetectionAlgorithm
to be run.
addDetectionAlgorithm
in interface PerceptualAssociativeMemory
detector
- DetectionAlgorithm
public void addPamListener(PamListener pl)
PerceptualAssociativeMemory
PamListener
.
addPamListener
in interface PerceptualAssociativeMemory
pl
- listenerpublic void receiveBroadcast(BroadcastContent bc)
BroadcastListener
receiveBroadcast
in interface BroadcastListener
bc
- the Content of the Broadcastpublic void receiveWorkspaceContent(ModuleName originatingBuffer, WorkspaceContent content)
WorkspaceListener
receiveWorkspaceContent
in interface WorkspaceListener
originatingBuffer
- source of contentcontent
- sent contentpublic void receivePreafference(NodeStructure addList, NodeStructure deleteList)
PreafferenceListener
receivePreafference
in interface PreafferenceListener
addList
- expected additions in future perceptsdeleteList
- expected deletions in future perceptspublic void learn(BroadcastContent bc)
BroadcastListener
GlobalWorkspace
but should be managed by the receiving module.
learn
in interface BroadcastListener
bc
- contentpublic void decayModule(long ticks)
FrameworkModule
decayModule
in interface FrameworkModule
ticks
- number of ticks to decay.public void receiveExcitation(PamLinkable pl, double amount)
PerceptualAssociativeMemory
PamLinkable
an amount of activation.
receiveExcitation
in interface PerceptualAssociativeMemory
pl
- Id of the PamLinkable receiving the activationamount
- amount of activation to excite{@link BasicDetectionAlgorithm}
public void receiveExcitation(java.util.Set<PamLinkable> linkables, double amount)
PerceptualAssociativeMemory
PamLinkable
with an amount of activation.
receiveExcitation
in interface PerceptualAssociativeMemory
linkables
- Ids of PamLinkable to be excitedamount
- amount of activationpublic void propagateActivationToParents(PamNode pn)
PerceptualAssociativeMemory
PamNode
to its parents.
propagateActivationToParents
in interface PerceptualAssociativeMemory
pn
- The PamNode
to propagate activation from.ExcitationTask
,
PropagationTask
public void addNodeStructureToPercept(NodeStructure ns)
PerceptualAssociativeMemory
addNodeStructureToPercept
in interface PerceptualAssociativeMemory
ns
- NodeStructurepublic void addLinkToPercept(Link l)
PerceptualAssociativeMemory
Link
to the percept.
addLinkToPercept
in interface PerceptualAssociativeMemory
l
- Link to addpublic void addNodeToPercept(Node n)
PerceptualAssociativeMemory
Node
to the percept.
addNodeToPercept
in interface PerceptualAssociativeMemory
n
- Node to addpublic boolean containsNode(Node node)
PerceptualAssociativeMemory
containsNode
in interface PerceptualAssociativeMemory
node
- the node
public boolean containsNode(ExtendedId id)
PerceptualAssociativeMemory
containsNode
in interface PerceptualAssociativeMemory
id
- ExtendedId of sought node
public boolean containsLink(Link link)
PerceptualAssociativeMemory
containsLink
in interface PerceptualAssociativeMemory
link
- the link
public boolean containsLink(ExtendedId id)
PerceptualAssociativeMemory
containsLink
in interface PerceptualAssociativeMemory
id
- ExtendedId of sought link
public java.util.Collection<Node> getNodes()
PerceptualAssociativeMemory
PamNode
s in this PAM as Node
s.
getNodes
in interface PerceptualAssociativeMemory
public java.util.Collection<Link> getLinks()
PerceptualAssociativeMemory
PamLink
s in this PAM as Link
s.
getLinks
in interface PerceptualAssociativeMemory
public java.lang.Object getModuleContent(java.lang.Object... params)
FrameworkModuleImpl
getModuleContent
in interface FrameworkModule
getModuleContent
in class FrameworkModuleImpl
params
- - specifies what content will be returned.
public void addListener(ModuleListener l)
FrameworkModuleImpl
addListener
in interface FrameworkModule
addListener
in class FrameworkModuleImpl
l
- - listener of this FrameworkModulepublic static double getPerceptThreshold()
PamLinkable
to be instantiated into a
perceptpublic void setPerceptThreshold(double t)
PerceptualAssociativeMemory
setPerceptThreshold
in interface PerceptualAssociativeMemory
t
- threshold for a Linkable
to become part of the perceptpublic boolean isOverPerceptThreshold(PamLinkable l)
PerceptualAssociativeMemory
isOverPerceptThreshold
in interface PerceptualAssociativeMemory
l
- a PamLinkable
public double getUpscaleFactor()
PerceptualAssociativeMemory
getUpscaleFactor
in interface PerceptualAssociativeMemory
public void setUpscaleFactor(double f)
PerceptualAssociativeMemory
setUpscaleFactor
in interface PerceptualAssociativeMemory
f
- scale factor for feed-forward activation propagationpublic double getDownscaleFactor()
PerceptualAssociativeMemory
getDownscaleFactor
in interface PerceptualAssociativeMemory
public void setDownscaleFactor(double f)
PerceptualAssociativeMemory
setDownscaleFactor
in interface PerceptualAssociativeMemory
f
- scale factor for top-down activation propagationpublic Link getLink(ExtendedId eid)
getLink
in interface PerceptualAssociativeMemory
eid
- link's eid
PamLink
with specified id from this PAM or null.public Node getNode(ExtendedId eid)
PerceptualAssociativeMemory
PamNode
with specified ExtendedId
or null
getNode
in interface PerceptualAssociativeMemory
eid
- sought ExtendedId
public Node getNode(int id)
PerceptualAssociativeMemory
PamNode
with specified id from this PAM or null.
getNode
in interface PerceptualAssociativeMemory
id
- the id
public java.util.Collection<LinkCategory> getLinkCategories()
PerceptualAssociativeMemory
getLinkCategories
in interface PerceptualAssociativeMemory
LinkCategory
public LinkCategory getLinkCategory(int id)
PerceptualAssociativeMemory
getLinkCategory
in interface PerceptualAssociativeMemory
id
- id of LinkCategory sought
public LinkCategory addLinkCategory(LinkCategory cat)
PerceptualAssociativeMemory
PerceptualAssociativeMemory
.
Category must also be a node in order to be added. Node will be of Pam's default type.
addLinkCategory
in interface PerceptualAssociativeMemory
cat
- LinkCategory
public Node getNode(java.lang.String label)
PerceptualAssociativeMemory
PamNode
with specified label or null.
This method is intended to be used only during initialization.
getNode
in interface PerceptualAssociativeMemory
label
- sought
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |