clarion.nacs
Class AssocRuleGrp

java.lang.Object
  extended byclarion.nacs.AssocRuleGrp

public class AssocRuleGrp
extends java.lang.Object


Constructor Summary
AssocRuleGrp(int id, Global g)
          constructor.
 
Method Summary
 java.lang.Object clone()
          methods from class Object
 double drawConclusion(java.util.Vector con)
          Draws conclusion triggered by the specific list of chunk indices as condition.
 short[][] getActiveRuleConditions()
          Returns the conditions of the active rules.
 int getAssocRuleAppTime()
          Returns the rule application time.
 int getGroupID()
          Returns the group ID.
 short[][] getRuleConditions()
          Returns the conditions of the rules.
 int getRuleNum()
          Returns the number of the rules.
 List getRules()
          Returns the rule list.
 boolean insertRule(short[] condition, short conclusion)
          insert a rule with the specific condition and conclusion in terms of the chunk indices on the chunk list in GKS.
 boolean removeCondition(int chunkIdx)
          Removes any rule which condition contains the specific chunk index.
 boolean removeRule(short[] condition, short conclusion)
          Remove a rule with the specific condition and conclusion in terms of the chunk indices on the chunk list in GKS.
 boolean searchRule(short[] condition)
          Searches a rule with the specific condition in terms fo an array of chunk indices.
 void setCurrentTime(long curTime)
          Sets the current time.
 void setMaxRuleAge(int age)
          Sets the maximal age of a rule.
 void setReasoningMethod(int method)
          Sets GKS reasoning method.
 void setRules(LinkedList list)
          Sets the rule list.
 java.lang.String toString()
          methods from class Object
 void update()
          update routine.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssocRuleGrp

public AssocRuleGrp(int id,
                    Global g)
constructor.

Parameters:
id - the group ID.
g - the associated global settings.
Method Detail

getGroupID

public int getGroupID()
Returns the group ID.

Returns:
the group ID.

getRuleNum

public int getRuleNum()
Returns the number of the rules.

Returns:
the number of the rules.

getRules

public List getRules()
Returns the rule list.

Returns:
the rule list.

getRuleConditions

public short[][] getRuleConditions()
Returns the conditions of the rules.

Returns:
the conditions of the rules.

getActiveRuleConditions

public short[][] getActiveRuleConditions()
Returns the conditions of the active rules.

Returns:
the conditions of the active rules.

getAssocRuleAppTime

public int getAssocRuleAppTime()
Returns the rule application time.

Returns:
the rule application time.

setReasoningMethod

public void setReasoningMethod(int method)
Sets GKS reasoning method.

Parameters:
method - the reasoning method to set.

setMaxRuleAge

public void setMaxRuleAge(int age)
Sets the maximal age of a rule.

Parameters:
age - the age to set.

setCurrentTime

public void setCurrentTime(long curTime)
Sets the current time.

Parameters:
curTime - current time.

setRules

public void setRules(LinkedList list)
Sets the rule list.

Parameters:
list - the rule list to set.

insertRule

public boolean insertRule(short[] condition,
                          short conclusion)
insert a rule with the specific condition and conclusion in terms of the chunk indices on the chunk list in GKS.

Parameters:
condition - the rule condition.
conclusion - the rule conclusion.

removeRule

public boolean removeRule(short[] condition,
                          short conclusion)
Remove a rule with the specific condition and conclusion in terms of the chunk indices on the chunk list in GKS.

Parameters:
condition - the rule condition.
conclusion - the rule conclusion.

removeCondition

public boolean removeCondition(int chunkIdx)
Removes any rule which condition contains the specific chunk index.

Parameters:
chunkIdx - the chunk index.
Returns:
true if such rules exist, false otherwise.

drawConclusion

public double drawConclusion(java.util.Vector con)
Draws conclusion triggered by the specific list of chunk indices as condition.


searchRule

public boolean searchRule(short[] condition)
Searches a rule with the specific condition in terms fo an array of chunk indices.

Parameters:
condition - the rule condition.

update

public void update()
update routine.


toString

public java.lang.String toString()
methods from class Object


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
methods from class Object

Throws:
java.lang.CloneNotSupportedException