|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
jchrest.architecture.Node
public class Node
Represents a node within the model's long-term memory discrimination network. Methods support learning and also display.
Constructor Summary | |
---|---|
Node(Chrest model,
int reference,
ListPattern type)
Constructor to construct a new root node for the model. |
|
Node(Chrest model,
ListPattern contents,
ListPattern image)
When constructing non-root nodes in the network, the new contents and image must be defined. |
Method Summary | |
---|---|
void |
addActionLink(Node node)
Add a node to the list of action links for this node. |
double |
averageDepth()
Compute the average depth of nodes below this point. |
double |
averageImageSize()
Compute the average size of the images in nodes below this point. |
boolean |
canFormTemplate()
Return true if template conditions are met: 1. |
void |
clearFilledSlots()
|
void |
clearTemplate()
Clear out the template slots. |
void |
constructTemplates()
Converts this node into a template, if appropriate, and repeats for all child nodes. |
int |
countTemplates()
Count templates in part of network rooted at this node. |
void |
fillSlots(ListPattern pattern)
Attempt to fill some of the slots using the items in the given pattern. |
java.util.List<Node> |
getActionLinks()
|
Node |
getAssociatedNode()
Accessor to node that is associated with this node. |
java.util.List<Link> |
getChildren()
Accessor to children of node. |
protected void |
getContentCounts(java.util.Map<java.lang.Integer,java.lang.Integer> size)
Add to a map of content sizes to node counts for this node and its children. |
ListPattern |
getContents()
Accessor to contents of node. |
java.util.List<ItemSquarePattern> |
getFilledItemSlots()
|
java.util.List<ItemSquarePattern> |
getFilledPositionSlots()
|
ListPattern |
getImage()
Accessor to image of node. |
protected void |
getImageCounts(java.util.Map<java.lang.Integer,java.lang.Integer> size)
Add to a map of image sizes to node counts for this node and its children. |
Node |
getNamedBy()
Accessor to node that names this node. |
int |
getReference()
Accessor to reference number of node. |
protected void |
getSemanticLinkCounts(java.util.Map<java.lang.Integer,java.lang.Integer> size)
Add to a map from number of semantic links to frequency, for this node and its children. |
java.util.List<Node> |
getSemanticLinks()
Accessor to list of semantic links. |
int |
information()
Compute the amount of information in current node. |
boolean |
isTemplate()
Returns true if this node is a template. |
Node |
learnPrimitive(ListPattern pattern)
LearnPrimitive is used to construct a test link and node containing precisely the given pattern. |
Node |
searchSemanticLinks(int maximumSemanticDistance)
Search this node's semantic links for a more informative node, and return one if found. |
void |
setAssociatedNode(Node node)
Modify node that is associated with this node. |
void |
setImage(ListPattern image)
Change the node's image. |
void |
setNamedBy(Node node)
Modify node that names this node. |
int |
size()
Compute the size of the network below the current node. |
void |
writeLinksAsVna(java.io.Writer writer)
|
void |
writeNodeAsVna(java.io.Writer writer)
Write node information in VNA format. |
void |
writeSemanticLinksAsVna(java.io.Writer writer)
|
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Node(Chrest model, int reference, ListPattern type)
public Node(Chrest model, ListPattern contents, ListPattern image)
Method Detail |
---|
public int getReference()
public ListPattern getContents()
public ListPattern getImage()
public void setImage(ListPattern image)
public java.util.List<Link> getChildren()
public java.util.List<Node> getSemanticLinks()
public Node getAssociatedNode()
public void setAssociatedNode(Node node)
public Node getNamedBy()
public void setNamedBy(Node node)
public void addActionLink(Node node)
public java.util.List<Node> getActionLinks()
public int size()
public int information()
protected void getContentCounts(java.util.Map<java.lang.Integer,java.lang.Integer> size)
protected void getImageCounts(java.util.Map<java.lang.Integer,java.lang.Integer> size)
protected void getSemanticLinkCounts(java.util.Map<java.lang.Integer,java.lang.Integer> size)
public double averageDepth()
public double averageImageSize()
public int countTemplates()
public java.util.List<ItemSquarePattern> getFilledItemSlots()
public java.util.List<ItemSquarePattern> getFilledPositionSlots()
public boolean isTemplate()
public void clearTemplate()
public void fillSlots(ListPattern pattern)
public void clearFilledSlots()
public void constructTemplates()
public boolean canFormTemplate()
public Node learnPrimitive(ListPattern pattern)
public Node searchSemanticLinks(int maximumSemanticDistance)
public void writeNodeAsVna(java.io.Writer writer) throws java.io.IOException
java.io.IOException
public void writeLinksAsVna(java.io.Writer writer) throws java.io.IOException
java.io.IOException
public void writeSemanticLinksAsVna(java.io.Writer writer) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |