|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<java.lang.Object,Dimension>
clarion.system.DimensionValueCollection
clarion.system.GeneralizedConditionChunk
public class GeneralizedConditionChunk
This class implements a generalized condition chunk within CLARION. It extends the DimensionValueCollection class.
Usage:
A condition usually contains the same dimension-value pairs as (or a same set of) the input nodes of an implicit module and generally has the same structure as the bottom level to which it is related (or from which it was extracted).
Values within a dimension in a condition are OR linked; whereas dimensions themselves are AND linked. This means that multiple values within the same dimension can have activations greater than 0. This is different than the sensory input (or a dimension-value collection in general), which can only have at most 1 activated value for any dimension.
Note that while we refer to the condition of a rule as a "chunk", it is not the same as a chunk as defined by the CLARION theory (as well as the AbstractChunk class within this library). The condition chunk is a specialized kind of chunk in that it does not have an ID, and it has special methods for calculating its strength when compared to another dimension-value collection (usually the current input).
Field Summary | |
---|---|
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
GeneralizedConditionChunk()
Initializes a condition. |
|
GeneralizedConditionChunk(java.util.Collection<? extends Dimension> dims)
Initializes a condition with the collection of dimensions specified. |
|
GeneralizedConditionChunk(java.util.Map<? extends java.lang.Object,? extends Dimension> map)
Initializes the condition with the map of dimensions. |
Method Summary | |
---|---|
boolean |
checkMatchAll()
|
GeneralizedConditionChunk |
clone()
Clones the condition (including all of it's dimensions). |
boolean |
covers(GeneralizedConditionChunk cond)
Checks to see if the specified condition is covered by this condition. |
double |
getStrength(java.util.Collection<? extends Dimension> CurrentInput)
Gets the strength of the condition based on the current input. |
double |
getWeight()
Gets the weight of the condition. |
int |
hashCode()
This method uses a special hash function based on the activations of the values within the condition. |
Methods inherited from class clarion.system.DimensionValueCollection |
---|
containsKeys, equals, getNumDVPairs, getValueCollection, put, putAll, size, toString |
Methods inherited from class java.util.LinkedHashMap |
---|
clear, containsValue, get, removeEldestEntry |
Methods inherited from class java.util.HashMap |
---|
containsKey, entrySet, isEmpty, keySet, remove, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
containsKey, entrySet, isEmpty, keySet, remove, values |
Field Detail |
---|
private static final long serialVersionUID
Constructor Detail |
---|
public GeneralizedConditionChunk()
public GeneralizedConditionChunk(java.util.Collection<? extends Dimension> dims)
dims
- The dimensions for the collection.public GeneralizedConditionChunk(java.util.Map<? extends java.lang.Object,? extends Dimension> map)
map
- The map of dimensions for the collection.Method Detail |
---|
public double getWeight()
public double getStrength(java.util.Collection<? extends Dimension> CurrentInput)
CurrentInput
- The current input.
public boolean covers(GeneralizedConditionChunk cond)
cond
- The condition to check against this condition.
public boolean checkMatchAll()
public int hashCode()
If the condition is empty (i.e. it has no dimension-value pairs, which is an option in fixed rules), this method will return the default system hash code.
hashCode
in interface java.util.Map<java.lang.Object,Dimension>
hashCode
in class DimensionValueCollection
public GeneralizedConditionChunk clone()
clone
in class DimensionValueCollection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |