|
||||||||||
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<java.lang.Object,java.util.HashMap<java.lang.Integer,AbstractRule>>
clarion.system.HiddenRuleCollection
public class HiddenRuleCollection
This class implements a hidden rule collection within CLARION. It extends the HashMap class. This class is used exclusively within a rule collection for tracking child rules and rule variations.
Usage:
The hidden rule collection acts as a container for rules that are not explicitly accessible by a CLARION agent. That is, the rules contained within a hidden rule collection can't be used for action decision making.
Rules that are normally stored in the hidden rule collection include:
The hidden rule collection itself is a somewhat more simplified version of a rule collection in that it does not need to track (or generate) things like rule variations, child rules, or collection-wide match statistics. In addition, it doesn't have to worry about correctly placing newly added rules within the collection by determining if the rule should be in the collection or within the child collection.
Conceptually speaking, rules contained within a hidden rule collection really only exist "abstractly." It is important to reiterate that rules contained within this collection are NOT accessible to the CLARION agent for any purposes other than rule refinement.
Field Summary | |
---|---|
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
HiddenRuleCollection()
Initializes a rule collection. |
|
HiddenRuleCollection(java.util.Collection<? extends AbstractRule> rules)
Initializes a rule collection with the collection of rules specified. |
Method Summary | |
---|---|
boolean |
contains(AbstractRule rule)
Checks to see if the collection contains the specified rule. |
void |
discountMatchStatistics(double Discount)
Discounts the positive and negative match statistics for all rules in the rule collection. |
AbstractRule |
get(GeneralizedConditionChunk cond,
AbstractAction act)
Gets a rule in the collection that matches the specified condition and action. |
java.util.Collection<AbstractRule> |
getRules()
Gets all of the rules in the rule collection. |
void |
put(AbstractRule R)
Puts a rule into the rule collection. |
java.util.HashMap<java.lang.Integer,AbstractRule> |
put(java.lang.Object key,
java.util.HashMap<java.lang.Integer,AbstractRule> map)
This method does nothing. |
void |
putAll(java.util.Collection<? extends AbstractRule> R)
Puts a collection of rules into the rule collection. |
void |
putAll(java.util.Map<? extends java.lang.Object,? extends java.util.HashMap<java.lang.Integer,AbstractRule>> map)
This method does nothing. |
AbstractRule |
remove(GeneralizedConditionChunk cond,
AbstractAction act)
Removes the rule from this rule collection with the specified condition and action. |
java.util.HashMap<java.lang.Integer,AbstractRule> |
remove(java.lang.Object key)
This method does nothing. |
int |
size()
Returns the number of rules in the rule collection. |
java.lang.String |
toString()
|
void |
updateMatchStatistics(DimensionValueCollection CurrentInput,
AbstractAction ChosenAction,
double feedback,
AbstractMatchCalculator MatchCalculator,
long TimeStamp)
Updates the positive or negative match statistics based on the information specified. |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
private static final long serialVersionUID
Constructor Detail |
---|
public HiddenRuleCollection()
public HiddenRuleCollection(java.util.Collection<? extends AbstractRule> rules)
rules
- The rules for the collection.Method Detail |
---|
public AbstractRule get(GeneralizedConditionChunk cond, AbstractAction act)
cond
- The condition of the rule to get.act
- The action of the rules to get.
public boolean contains(AbstractRule rule)
rule
- The rule object you wish to check for within this collection.
public java.util.HashMap<java.lang.Integer,AbstractRule> put(java.lang.Object key, java.util.HashMap<java.lang.Integer,AbstractRule> map)
put
in interface java.util.Map<java.lang.Object,java.util.HashMap<java.lang.Integer,AbstractRule>>
put
in class java.util.HashMap<java.lang.Object,java.util.HashMap<java.lang.Integer,AbstractRule>>
key
- map
-
public void putAll(java.util.Map<? extends java.lang.Object,? extends java.util.HashMap<java.lang.Integer,AbstractRule>> map)
putAll
in interface java.util.Map<java.lang.Object,java.util.HashMap<java.lang.Integer,AbstractRule>>
putAll
in class java.util.HashMap<java.lang.Object,java.util.HashMap<java.lang.Integer,AbstractRule>>
map
- public java.util.HashMap<java.lang.Integer,AbstractRule> remove(java.lang.Object key)
remove
in interface java.util.Map<java.lang.Object,java.util.HashMap<java.lang.Integer,AbstractRule>>
remove
in class java.util.HashMap<java.lang.Object,java.util.HashMap<java.lang.Integer,AbstractRule>>
key
-
public void put(AbstractRule R)
R
- The rule to add.public void putAll(java.util.Collection<? extends AbstractRule> R)
R
- The rules to put in the collection.public AbstractRule remove(GeneralizedConditionChunk cond, AbstractAction act)
cond
- The condition of the rule you want to remove.act
- The action of the rule you want to remove.
public java.util.Collection<AbstractRule> getRules()
public void discountMatchStatistics(double Discount)
Discount
- The discount factor to be applied to the match statistics of the rules.public void updateMatchStatistics(DimensionValueCollection CurrentInput, AbstractAction ChosenAction, double feedback, AbstractMatchCalculator MatchCalculator, long TimeStamp)
CurrentInput
- The current input.ChosenAction
- The chosen action.feedback
- The feedback.TimeStamp
- The current time stamp.public int size()
size
in interface java.util.Map<java.lang.Object,java.util.HashMap<java.lang.Integer,AbstractRule>>
size
in class java.util.HashMap<java.lang.Object,java.util.HashMap<java.lang.Integer,AbstractRule>>
public java.lang.String toString()
toString
in class java.util.AbstractMap<java.lang.Object,java.util.HashMap<java.lang.Integer,AbstractRule>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |