|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclarion.common.Chunk
Field Summary | |
protected double |
BLA
base level activation. |
protected double |
c
the three parameters for calculating BLA: c, d, iBLA. |
protected int |
chunkBlaOption
the chunk BLA option. |
protected java.lang.String |
chunkLabel
the chunk label. |
protected int |
chunkType
the chunk type. |
protected double |
d
the three parameters for calculating BLA: c, d, iBLA. |
protected Feature[] |
featList
the feature list composing the chunk. |
protected Global |
global
gloabl settings. |
protected double |
iBLA
the three parameters for calculating BLA: c, d, iBLA. |
protected int |
MAX_USAGE_NUM
maximum number of usages of a chunk. |
protected double |
strength
chunk strength used for conclusion chunks. |
protected int |
usageNum
the number of usages of a chunk. |
protected long[] |
usageRecords
used for recording the times when the chunk was used. |
Constructor Summary | |
Chunk(int type,
java.lang.String label,
Chunk[] chunks,
Global g)
|
|
Chunk(int type,
java.lang.String label,
Feature[] list,
Global g)
|
Method Summary | |
void |
append(int type,
java.lang.String label,
Chunk[] chunks)
appends an array of chunks into one chunk. |
void |
calcBLA(long currentTime)
calculate chunk BLA. |
java.lang.Object |
clone()
methods from class Object |
boolean |
equals(java.lang.Object other)
methods from class Object |
double |
getBLA()
returns the chunk BLA . |
int |
getBlaOption()
returns the chunk BLA option: constant or variable. |
int |
getChunkType()
returns the chunk type. |
void |
getContent(double[] arr)
returns the content of this chunk in term of activations. |
void |
getContent(short[] arr)
returns the content of this chunk in term of active values. |
int |
getDimNum()
returns the number of dimesnions in this chunk. |
Feature |
getFeature(int idx)
returns a specified feasure in this chunk. |
int |
getFeatureNum()
returns the number of feasures in this chunk. |
Feature[] |
getFeatures()
returns the list of feasures in this chunk. |
void |
getFeatures(Feature[] other)
returns the list of feasures in this chunk. |
java.lang.String |
getLabel()
returns the chunk label. |
int |
getLength()
returns the chunk length in term of the sum of the lengths of the features in list. |
double |
getStrength()
returns the chunk strength. |
int |
getUsageNum()
returns the number of usages of this chunk. |
long[] |
getUsageRecords()
returns the info of usages of this chunk. |
void |
getUsageRecords(long[] arr)
return the info of usages of this chunk. |
int |
hashCode()
methods from class Object |
void |
increaseUsage(long currentTime)
increase number of chunk usages. |
boolean |
isEqual(Feature[] features)
compare two feature list is equal or not. |
void |
reinit()
reinit the chunk |
void |
resetUsage()
reset the usage of this chunk. |
int |
searchFeature(java.lang.String label)
search a specified feature labeled label in this chunk. |
void |
setBLA_C(double val)
set chunk BLA parameter. |
void |
setBLA_D(double val)
set chunk BLA parameter. |
void |
setBLA_INIT(double val)
set chunk BLA parameter. |
void |
setBla(double bla)
set chunk BLA. |
void |
setBlaOption(int option)
set chunk BLA option. |
void |
setBlaParams(double[] blaParams)
set chunk BLA parameters. |
void |
setLabel(java.lang.String str)
set chunk label. |
void |
setStrength(double val)
set chunk strength. |
void |
setUsageNum(int num)
set number of chunk usages. |
void |
setUsageRecords(long[] records)
set the info of chunk usages. |
java.lang.String |
toString()
methods from class Object |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Global global
protected Feature[] featList
protected int chunkType
protected java.lang.String chunkLabel
protected int chunkBlaOption
protected int MAX_USAGE_NUM
protected int usageNum
protected long[] usageRecords
protected double c
protected double d
protected double iBLA
protected double BLA
protected double strength
Constructor Detail |
public Chunk(int type, java.lang.String label, Feature[] list, Global g)
public Chunk(int type, java.lang.String label, Chunk[] chunks, Global g)
Method Detail |
public void append(int type, java.lang.String label, Chunk[] chunks)
type
- the chunk type.label
- the chunk label.chunks
- the array of chunks to form a new chunk.public void reinit()
public int getChunkType()
public int getDimNum()
public java.lang.String getLabel()
public int getLength()
public int getBlaOption()
public int getUsageNum()
public long[] getUsageRecords()
public void getUsageRecords(long[] arr)
arr
- the array to store the usage info.public double getBLA()
public double getStrength()
public int getFeatureNum()
public Feature[] getFeatures()
public void getFeatures(Feature[] other)
other
- the feature array to store the feature list of this chunk.public Feature getFeature(int idx)
public void getContent(short[] arr)
arr
- the array to store the content of this chunk.public void getContent(double[] arr)
arr
- the array to store the content of this chunk.public void setLabel(java.lang.String str)
str
- the label to set.public void setBlaOption(int option)
option
- the option to set.public void setBla(double bla)
bla
- the BLA to set.public void setBLA_C(double val)
val
- the value to set.public void setBLA_D(double val)
val
- the value to set.public void setBLA_INIT(double val)
val
- the value to set.public void setBlaParams(double[] blaParams)
blaParams
- the parameters to set.public void setUsageNum(int num)
num
- the value to set.public void setUsageRecords(long[] records)
records
- the value to set.public void setStrength(double val)
val
- the value to set.public void increaseUsage(long currentTime)
currentTime
- current time to record as one time of this chunk is used.public void resetUsage()
public void calcBLA(long currentTime)
public int searchFeature(java.lang.String label)
label
- the label of the feasure to search.public boolean isEqual(Feature[] features)
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object other)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |