|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclarion.common.Chunk
clarion.nacs.GKSChunk
Field Summary |
Fields inherited from class clarion.common.Chunk |
BLA, c, chunkBlaOption, chunkLabel, chunkType, d, featList, iBLA, MAX_USAGE_NUM, strength, usageNum, usageRecords |
Constructor Summary | |
GKSChunk(int cId,
int type,
java.lang.String label,
Chunk[] chunks,
int idnIdx,
int amnIdx,
Global g)
new constructor for a combined chunk. |
|
GKSChunk(int cId,
int type,
java.lang.String label,
Feature[] features,
int idnIdx,
int amnIdx,
Global g)
new constructor. |
Method Summary | |
boolean |
activateChunk(Feature[] cue,
int whichLevel)
Checks if this chunk is activated or not and computes the chunk strength. |
void |
calcRetrievalTime()
Computes the retrieval time. |
void |
calculateStrength(java.util.Vector con)
Calculates the support from the associative rules pointing to this chunk. |
java.lang.Object |
clone()
methods from class Object |
short[][] |
getActiveRuleConditions()
Returns the conditions of the activated rules with this chunk as conclusion. |
int |
getAge()
Returns the chunk age. |
int |
getAmnIdx()
Returns the index to an AMN this chunk is from. |
int |
getAssocRuleAppTime()
Returns the associated rule application time. |
boolean |
getAvailableFlag()
not used any more. |
Feature |
getConclusion()
Deprecated. it is not used any more. |
int |
getConclusionDimIdx()
Deprecated. it is not used any more. |
int |
getIdnIdx()
Returns the index to an IDN this chunk is from. |
int |
getRetrievalTime()
Returns the retrieval time. |
short[][] |
getRuleConditions()
Returns the conditions of the rules with this chunk as conclusion. |
int |
getRuleNum()
Returns the number of rules with this chunk as conclusion. |
AssocRuleGrp |
getRules()
Returns the rules with this chunk as conclusion. |
void |
increaseUsage()
Updates the usage. |
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 |
isInEmOn()
Returns if chunk is in EM or not. |
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. |
void |
resetAge()
reset the chunk age. |
boolean |
searchRule(short[] conditions)
Search a rule in this chunk with the specific condition in terms of chunk indices on the chunk list in GKS. |
void |
setAvailableFlag(boolean flag)
not used any more. |
void |
setConclusionDimIdx(short idx)
Deprecated. it is not used any more. |
void |
setCurrentTime(long curTime)
Sets current time. |
void |
setInEmOn(boolean flag)
Sets flag indicating this chunk is in EM or not. |
void |
setReasoningMethod(int method)
Sets GKS reasoning method. |
void |
setRules(AssocRuleGrp ruleGrp)
Sets the assoicated rules. |
java.lang.String |
toString()
methods from class Object |
boolean |
update()
Update routine. |
Methods inherited from class clarion.common.Chunk |
append, calcBLA, equals, getBLA, getBlaOption, getChunkType, getContent, getContent, getDimNum, getFeature, getFeatureNum, getFeatures, getFeatures, getLabel, getLength, getStrength, getUsageNum, getUsageRecords, getUsageRecords, hashCode, increaseUsage, isEqual, reinit, resetUsage, searchFeature, setBLA_C, setBLA_D, setBLA_INIT, setBla, setBlaOption, setBlaParams, setLabel, setStrength, setUsageNum, setUsageRecords |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GKSChunk(int cId, int type, java.lang.String label, Feature[] features, int idnIdx, int amnIdx, Global g)
cId
- chunk ID.type
- chunk type.label
- chunk label.features
- chunk features.idnIdx
- the index to an IDN this chunk is from.amnIdx
- the index to an AMN this chunk is from.g
- the global settings.public GKSChunk(int cId, int type, java.lang.String label, Chunk[] chunks, int idnIdx, int amnIdx, Global g)
cId
- chunk ID.type
- chunk type.label
- chunk label.chunks
- chunks to compose this chunk.idnIdx
- the index to an IDN this chunk is from.amnIdx
- the index to an AMN this chunk is from.g
- the global settings.Method Detail |
public int getIdnIdx()
public int getAmnIdx()
public int getAge()
public int getRuleNum()
public AssocRuleGrp getRules()
public short[][] getRuleConditions()
public short[][] getActiveRuleConditions()
public int getConclusionDimIdx()
public boolean getAvailableFlag()
public boolean isInEmOn()
public Feature getConclusion()
public int getRetrievalTime()
public int getAssocRuleAppTime()
public void resetAge()
public void setReasoningMethod(int method)
method
- the reasoning method to set.public void setCurrentTime(long curTime)
curTime
- the time to set.public void setRules(AssocRuleGrp ruleGrp)
ruleGrp
- the rule group to set.public void setAvailableFlag(boolean flag)
public void setInEmOn(boolean flag)
flag
- the value to set.public void setConclusionDimIdx(short idx)
idx
- the index to set.public boolean activateChunk(Feature[] cue, int whichLevel)
cue
- the cue to activate the reasoning.whichLevel
- the level (GKS or AMN) this reasoning process is in.
public void calculateStrength(java.util.Vector con)
con
- the vector of chunks to trigger the proccess of computing rule support.public boolean searchRule(short[] conditions)
public void increaseUsage()
public void calcRetrievalTime()
public boolean insertRule(short[] condition, short conclusion)
condition
- the rule condition.conclusion
- the rule conclusion.public boolean removeRule(short[] condition, short conclusion)
condition
- the rule condition.conclusion
- the rule conclusion.public boolean removeCondition(int chunkIdx)
chunkIdx
- the chunk index.
public boolean update()
public java.lang.String toString()
toString
in class Chunk
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class Chunk
java.lang.CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |