|
||||||||||
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.framework.mockclasses.MockPAM
public class MockPAM
Field Summary | |
---|---|
Link |
linkPercept
|
Node |
nodePercept
|
NodeStructure |
nsPercept
|
PamNode |
pmNode
|
double |
upscaleFactor
|
Fields inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl |
---|
taskSpawner |
Constructor Summary | |
---|---|
MockPAM()
|
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 node)
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 fd)
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 listener)
Generic way to add various kinds of listeners. |
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 |
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 PamLink s in this PAM as Link s. |
java.lang.Object |
getModuleContent(java.lang.Object... params)
Returns module content specified by params. |
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 PamNode s in this PAM as Node s. |
PropagationStrategy |
getPropagationStrategy()
Gets PropagationStrategy governing how activation is propagated in this PAM. |
FrameworkModule |
getSubmodule(java.lang.String name)
Gets specified submodule. |
double |
getUpscaleFactor()
Gets upscaleFactor |
void |
init()
Implementations should only perform initialization of variables or objects that depend on parameters in the parameter map specified in FrameworkModuleImpl.init(Map) . |
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 nodeId,
double amount)
Excites specified PamLinkable an amount of activation. |
void |
receiveExcitation(java.util.Set<PamLinkable> nodeIds,
double amount)
Excites PamLinkable with an amount of activation. |
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, 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, 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 |
---|
public PamNode pmNode
public NodeStructure nsPercept
public double upscaleFactor
public Link linkPercept
public Node nodePercept
Constructor Detail |
---|
public MockPAM()
Method Detail |
---|
public java.lang.Object getModuleContent(java.lang.Object... params)
FrameworkModule
getModuleContent
in interface FrameworkModule
getModuleContent
in class FrameworkModuleImpl
params
- - specifies what content will be returned.
public void decayModule(long ticks)
FrameworkModule
decayModule
in interface FrameworkModule
ticks
- number of ticks to decay.public void addListener(ModuleListener listener)
FrameworkModule
addListener
in interface FrameworkModule
listener
- - listener of this FrameworkModulepublic void init()
FrameworkModuleImpl
FrameworkModuleImpl.init(Map)
.
Furthermore they should not try to access modules added via FrameworkModuleImpl.setAssociatedModule(FrameworkModule, String)
as this method will not have run yet at the time this method is called.
init
in interface Initializable
init
in class FrameworkModuleImpl
public PamNode addDefaultNode(Node node)
PerceptualAssociativeMemory
PerceptualAssociativeMemory
.
Node will be of Pam's default type.
addDefaultNode
in interface PerceptualAssociativeMemory
node
- PamNode
public java.util.Set<PamNode> addDefaultNodes(java.util.Set<? extends Node> nodes)
PerceptualAssociativeMemory
addDefaultNodes
in interface PerceptualAssociativeMemory
nodes
- nodes to add
public java.util.Set<PamLink> addDefaultLinks(java.util.Set<? extends Link> links)
PerceptualAssociativeMemory
addDefaultLinks
in interface PerceptualAssociativeMemory
links
- PamLinks to add
public void addDetectionAlgorithm(DetectionAlgorithm fd)
PerceptualAssociativeMemory
DetectionAlgorithm
to be run.
addDetectionAlgorithm
in interface PerceptualAssociativeMemory
fd
- DetectionAlgorithm
public void addPamListener(PamListener pl)
PerceptualAssociativeMemory
PamListener
.
addPamListener
in interface PerceptualAssociativeMemory
pl
- listenerpublic void setPropagationStrategy(PropagationStrategy b)
PerceptualAssociativeMemory
PropagationStrategy
governing how activation is propagated in this PAM.
setPropagationStrategy
in interface PerceptualAssociativeMemory
b
- PropagationStrategy
public void propagateActivationToParents(PamNode pamNode)
PerceptualAssociativeMemory
PamNode
to its parents.
propagateActivationToParents
in interface PerceptualAssociativeMemory
pamNode
- The PamNode
to propagate activation from.ExcitationTask
,
PropagationTask
public void addNodeStructureToPercept(NodeStructure ns)
PerceptualAssociativeMemory
addNodeStructureToPercept
in interface PerceptualAssociativeMemory
ns
- NodeStructurepublic 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 void setPerceptThreshold(double t)
PerceptualAssociativeMemory
setPerceptThreshold
in interface PerceptualAssociativeMemory
t
- threshold for a Linkable
to become part of the perceptpublic void setUpscaleFactor(double f)
PerceptualAssociativeMemory
setUpscaleFactor
in interface PerceptualAssociativeMemory
f
- scale factor for feed-forward activation propagationpublic double getUpscaleFactor()
PerceptualAssociativeMemory
getUpscaleFactor
in interface PerceptualAssociativeMemory
public void setDownscaleFactor(double f)
PerceptualAssociativeMemory
setDownscaleFactor
in interface PerceptualAssociativeMemory
f
- scale factor for top-down activation propagationpublic double getDownscaleFactor()
PerceptualAssociativeMemory
getDownscaleFactor
in interface PerceptualAssociativeMemory
public boolean isOverPerceptThreshold(PamLinkable l)
PerceptualAssociativeMemory
isOverPerceptThreshold
in interface PerceptualAssociativeMemory
l
- a PamLinkable
public Node getNode(int id)
PerceptualAssociativeMemory
PamNode
with specified id from this PAM or null.
getNode
in interface PerceptualAssociativeMemory
id
- the id
public Node getNode(ExtendedId id)
PerceptualAssociativeMemory
PamNode
with specified ExtendedId
or null
getNode
in interface PerceptualAssociativeMemory
id
- sought ExtendedId
public Link getLink(ExtendedId id)
getLink
in interface PerceptualAssociativeMemory
id
- link's eid
PamLink
with specified id from this PAM or null.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 FrameworkModule getSubmodule(java.lang.String name)
FrameworkModule
getSubmodule
in interface FrameworkModule
getSubmodule
in class FrameworkModuleImpl
name
- name of the desired submodule.
public PamLink addDefaultLink(Link link)
PerceptualAssociativeMemory
addDefaultLink
in interface PerceptualAssociativeMemory
link
- PamLink to add
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 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 void receiveExcitation(PamLinkable nodeId, double amount)
PerceptualAssociativeMemory
PamLinkable
an amount of activation.
receiveExcitation
in interface PerceptualAssociativeMemory
nodeId
- Id of the PamLinkable receiving the activationamount
- amount of activation to excite{@link BasicDetectionAlgorithm}
public void receiveExcitation(java.util.Set<PamLinkable> nodeIds, double amount)
PerceptualAssociativeMemory
PamLinkable
with an amount of activation.
receiveExcitation
in interface PerceptualAssociativeMemory
nodeIds
- Ids of PamLinkable to be excitedamount
- amount of activationpublic PropagationStrategy getPropagationStrategy()
PerceptualAssociativeMemory
PropagationStrategy
governing how activation is propagated in this PAM.
getPropagationStrategy
in interface PerceptualAssociativeMemory
PropagationStrategy
public 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 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 |